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: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 1 Sep 2017 19:36:36 -0400



On Fri, Sep 1, 2017 at 7:14 PM, Stephan Grein <stephan.grein@...5733...> wrote:
Dear Axel,

thanks for your excellent help!

I used gatoms in the for loop, not natoms.
Now the question is, how could I get only
the x coord of the three atoms in the group
without checking for inequality with 0.0?

​you could pull in another atom style variable that contains the output of ​gmask(GROUP), which is 1 for group members and 0 for other atoms, and then use this variable as selector.

axel.

 

Best regards,
Stephan


--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.