[lammps-users] For loop or multiline if in input file?

I was curious if there was anything akin to a ‘for’ loop for use in the input files.

For example, the effect I am going for is something like this

for i=1:N
velocity all create…
run N_steps

so that I can essentially ‘re-initialize’ the velocities of the system every N_steps, but for a possibly large N - such that I don’t want to use jump and a pile of input files.

Also - is there any way to do multiline commands in an if statement, or is the only option for that ‘jump’?



David E. Farrell

Graduate Student

Mechanical Engineering

Northwestern University

email: d-farrell2@…435…

Using the jump command with a variable loop is
like a for statement. You can jump back into the
same file to a label, see the label command.

There is no if,then,else with a bunch of commands
in between.


Ah, OK - I will check that out.