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?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 <alborzi.saeed6@...24...>
Date: Tue, 7 Nov 2017 22:09:43 +0330

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.

On Tue, Nov 7, 2017 at 5:52 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:


On Tue, Nov 7, 2017 at 5:49 AM, saeed alborzi <alborzi.saeed6@...1125.....> 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
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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.