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, 19 Sep 2017 23:45:35 +0200

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


Attachment: signature.asc
Description: OpenPGP digital signature