[lammps-users] loop a variable


I want to make a loop in an input script.
What I did is

you also need to put jump command after next.

like jump filename

This should work for you

Thank you, Vikas! It works. But it’s a little strange to me that the “next” command has to work with the help of a “jump” command.
I thought jump would work like a “goto” command and has nothing to do with a looping, but apparently they are tied closely.

"next" just increments the variable
You have to loop back to the beginning of the file (or the label)
using "jump" (which can also jump to another file), as Vikas


Understood. Thanks!