Re: [lammps-users] Fwd: Doubt in LAMMPS: Loops and incrementing variables
Axel Kohlmeyer <akohlmey@...24...>
Mon, 3 Jul 2017 09:18:08 -0400
On Mon, Jul 3, 2017 at 1:28 AM, ankur agrawal
> 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.
> 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.
> Yours Sincerely
> Ankur Agrawal
> FourthYear Dual Degree Student
> Department of Chemical Engineering
> Indian Institute of Technology, kanpur, India
> Alternate Email:ankurag@...71...
> On Mon, Jul 3, 2017 at 9:39 AM, Axel Kohlmeyer <akohlmey@...24...> wrote:
>> On Sun, Jul 2, 2017 at 9:56 AM, ankur agrawal
>> <ankur.agrawal1103@...24...> wrote:
>> > 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.
>> > PFA the code attached
>> > Yours Sincerely
>> > Ankur Agrawal
>> > FourthYear Dual Degree Student
>> > Department of Chemical Engineering
>> > Indian Institute of Technology, kanpur, India
>> > Mobile-7753058907
>> > Alternate Email:ankurag@...71...
>> > ------------------------------------------------------------------------------
>> > 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
>> > firstname.lastname@example.org
>> > 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.