Doubt in LAMMPS: Loops and incrementing variables

Hi

I am simulating Evaporating Sodium Droplet ( I am basically trying to reproduce results of attached paper). I am having dificulty in executing the counting algorithm which will basically count the number of atoms in vapor phase, liquid phase and in surface. The crieterion for phase is defined by the number of neighbors (specified in the research paper). There is some error in the loop. Please help me out

PFA the code attached

Yours Sincerely
Ankur Agrawal
Fourth____Year Dual Degree Student
Department of Chemical Engineering
Indian Institute of Technology, kanpur, India

Mobile-7753058907
Alternate Email:ankurag@…71…

INPUT_In_Reduced_Units (2.77 KB)

MD_sodium.pdf (739 KB)

Hi
I am simulating Evaporating Sodium Droplet ( I am basically trying to
reproduce results of attached paper). I am having dificulty in executing the
counting algorithm which will basically count the number of atoms in vapor
phase, liquid phase and in surface. The crieterion for phase is defined by
the number of neighbors (specified in the research paper). There is some
error in the loop. Please help me out

you are not very likely to have somebody read and debug your input and
provide you with a corrected version that matches your reference.
figuring out how to do your research, is *your* job. if you have
difficulties, you should first discuss with your adviser, too.

if you have a particular issue and ask a specific question about a
specific command, people may be willing to provide you with an answer,
but "there is some error" is *far* too vague.

axel.

Okay I understand. I am sorry for not being consise. So, my problem is that I want to calculate the number of vapor atoms in my simulation. Vapor atoms are defined as those in the paer, that have between 1 to 3 neighbors. Can you please guide me for this.

PS- I tried using compute coord/atom and then loops in lammps for doing so, but I am not sure whether this is the right way to go about it.

Okay I understand. I am sorry for not being consise. So, my problem is that
I want to calculate the number of vapor atoms in my simulation. Vapor atoms
are defined as those in the paer, that have between 1 to 3 neighbors. Can
you please guide me for this.

you can define an atom style variable that has conditionals based on
the per-atom compute data. conditionals evaluate to either 1 (if true)
or 0 (if false).
with compute reduce using the sum flag, you can efficiently and
conveniently count the atoms for which a certain condition is true.
for details, please refer to the LAMMPS manual.

axel.