LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] How to distinguish between liquid and vapor atoms of the same type by means of each atom' s coordination number?

# Re: [lammps-users] How to distinguish between liquid and vapor atoms of the same type by means of each atom' s coordination number?

 From: saeed alborzi Date: Tue, 7 Nov 2017 23:38:57 +0330

Thanks Professor. It's done.
Math operators were the solution.

On Tue, Nov 7, 2017 at 11:06 PM, Axel Kohlmeyer wrote:

On Tue, Nov 7, 2017 at 1:39 PM, saeed alborzi wrote:
Sorry Dr.Kohlmeyer for this possibly elementary question , how can I write a conditional statement in variable definition command?

I have looked it up in the manual document but found nothing.

​look again, it is there.

axel.​

On Tue, Nov 7, 2017 at 5:52 PM, Axel Kohlmeyer wrote:

On Tue, Nov 7, 2017 at 5:49 AM, saeed alborzi wrote:
Hello all,

I am trying to count the number of liquid and vapor atoms in a unit simulation box every timestep. I have calculated each atom's coordination number using compute coord/atom. but I am confused how to define a conditional piece of commands to count the number of atoms with (coord. number > N) and atoms with (coord. number < N) . Could anyone please help me?

​create an atom style variable, that computes to either 1 or 0 ​depending on whether your atom meets your condition. then use compute reduce with the "sum" option to sum that variable over your system.
you can do this for multiple variables at the same time, if needed.

axel.

Thanks

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users

--
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.

--
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.