LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Variable in loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Variable in loop


From: Giacomo Fiorin <giacomo.fiorin@...24...>
Date: Thu, 5 Oct 2017 13:40:11 -0400

Have you tried nesting the two loops?

Giacomo

On Thu, Oct 5, 2017 at 1:34 PM, Asadollahzadeh <niliasadollahzadeh@...24...> wrote:
Thanks for your guide...
I know loop command, but I don't know whether this command can cover m*n positions or not?

I want to apply tension to my simulation box in x & y direction concurrent. I have 5% for x & 5% fr y, so I will have 25 status! Can I cover all of them with just one loop?

Sincerely;
Nili

On Thu, Oct 5, 2017 at 8:49 PM, Giacomo Fiorin <giacomo.fiorin@...24...> wrote:
The syntax is not exactly the same, but you have a "loop" option for the variable command:
http://lammps.sandia.gov/doc/variable.html

In addition, you can also run individual LAMMPS commands from Python, within which you can use yet more kinds of loops.

Giacomo

On Thu, Oct 5, 2017 at 1:14 PM, Asadollahzadeh <niliasadollahzadeh@...24...> wrote:
Hi every one!
Can we have variables in loop such as matlab ?
I mean is,for example i=1:n and j=1:m.Can LAMMPS command cover every 15 positions by loop?

So thanks;
Nili

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




--
Giacomo Fiorin
Associate Professor of Research, Temple University, Philadelphia, PA
Contractor, National Institutes of Health, Bethesda, MD




--
Giacomo Fiorin
Associate Professor of Research, Temple University, Philadelphia, PA
Contractor, National Institutes of Health, Bethesda, MD