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: Fri, 22 Sep 2017 19:25:17 +0200

Hey Steve,
thanks for your suggestion.

This revealed that my molecules are created
with molecule ids 9260, 9261, 9262.
Now the question would be: If I know how
many molecules I'm creating, how would I
get the first index, e.g. 9260 by the
LAMMPS library?

Best regards,
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>
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature