LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] LAMMPS library: Gather specific atoms and insert small molecules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] LAMMPS library: Gather specific atoms and insert small molecules


From: Stephan Grein <stephan.grein@...5733...>
Date: Tue, 26 Sep 2017 00:17:24 +0200

Addendum: I would also be willing to implement
a library function for that purposes.

Best wishes,
Stephan

Am 25/09/17 um 00:22 schrieb Stephan Grein:
> Hey Steve,
> 
> I'm defining my group as follows:
> Determine the first index (by looking at the dump) of
> my molecule of interest and calculate last index by:
> last index = first index + nMols.
> (nMols I know because I added e.g. nMols = 3 molecules).
> 
> Then I can form a group.
> I found out that this question has been asked
> on the mailing list (archive) but I could not
> find an answer. That's why I politely ask again:
> 
> How can I get the total number of molecules
> in my simulation box (Preferably by a call to
> lammps_command)? Thanks in advance.
> 
> Best wishes,
> Stephan
> 
> Am 22/09/17 um 16:51 schrieb Steve Plimpton:
>> I suggest you dump a snapshot and see what
>> the molecule IDs are of the atoms you added.
>>
>> Steve
>>
>> On Thu, Sep 21, 2017 at 2:15 PM, Stephan Grein
>> <stephan.grein@...5733...
>> <mailto:stephan.grein@...5733...>> wrote:
>>
>>     Dear LAMMPS users,
>>
>>     let me rephrase my previous post to be more precise.
>>     I read in a protein structure by and added
>>     after that three molecules randomly by:
>>     read_data       main_protein.data
>>     molecule        1 small_protein.data
>>     create_atoms    1 random 3 1506024437 NULL mol 1 91731
>>
>>     Then, I want to retrieve the atoms of the three inserted
>>     molecules (which have a total of 19 atoms each) by:
>>     group MYGRP molecule <> 1 3
>>
>>     This will however not give me 57 atoms (3*19 atoms):
>>     48 atoms in group MYGRP
>>
>>     I think I'm missing a piece of information
>>     (Or more likely doing something wrong...)
>>
>>     Thanks in advance.
>>
>>     Best regards,
>>     Stephan
>>
>>
>>     Am 19/09/17 um 23:45 schrieb Stephan Grein:
>>     > I think I will go with that...
>>     >
>>     > Am 19/09/17 um 19:22 schrieb Axel Kohlmeyer:
>>     >> but in my opinion, it is not worth the hassle. i would just set up
>>     >> everything assuming no overlap of types and then script that
>>     process. it
>>     >> seems much easier and simpler to me.
>>     >>
>>     >
>>     > I managed to set up my force field, though, now I
>>     > inserted by create_atoms my molecules randomly.
>>     >
>>     > Is it correct to use (if my molecule has ID 1)
>>     > "group MYGRP molecule 1" to get all the replicated
>>     > molecules in my box?
>>     >
>>     > Because then I could use the code you gave me
>>     > in a previous answer to extract all coordinates
>>     > from these molecules by:
>>     >
>>     > lammps_command(lmp,"variable MYCOORDSX atom x");
>>     >                                                                   
>>                                                                        
>>                                                                        
>>                            double *coordsX = (double
>>     > *)lammps_extract_variable(lmp, "MYCOORDSX","MYGRP");
>>     >
>>     > This seems not to give me all x-coordinates
>>     > (I replicated 3 molecules with 19 atoms but
>>     > I'm getting only 6 x-coordinates.)
>>     >
>>     > Thanks in advance.
>>     >
>>     > Best regards,
>>     > Stephan
>>     >
>>     >
>>     >
>>     >
>>     > ------------------------------------------------------------------------------
>>     > Check out the vibrant tech community on one of the world's most
>>     > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>     >
>>     >
>>     >
>>     > _______________________________________________
>>     > lammps-users mailing list
>>     > lammps-users@lists.sourceforge.net
>>     <mailto:lammps-users@lists.sourceforge.net>
>>     > https://lists.sourceforge.net/lists/listinfo/lammps-users
>>     <https://lists.sourceforge.net/lists/listinfo/lammps-users>
>>     >
>>
>>
>>     ------------------------------------------------------------------------------
>>     Check out the vibrant tech community on one of the world's most
>>     engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>     _______________________________________________
>>     lammps-users mailing list
>>     lammps-users@lists.sourceforge.net
>>     <mailto:lammps-users@lists.sourceforge.net>
>>     https://lists.sourceforge.net/lists/listinfo/lammps-users
>>     <https://lists.sourceforge.net/lists/listinfo/lammps-users>
>>
>>
> 
> -
> 
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> 
> 
> 
> _______________________________________________
> lammps-users mailing list
> lammps-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lammps-users
> 

Attachment: signature.asc
Description: OpenPGP digital signature