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: Thu, 21 Sep 2017 22:15:31 +0200

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
> https://lists.sourceforge.net/lists/listinfo/lammps-users
> 

Attachment: signature.asc
Description: OpenPGP digital signature