proper looping style

Hello LAMMPS Users,

What is the proper looping style?

I’ve seen a couple different methods in the documentation.

The first style uses labels

variable a loop 10
label loop
dump 1 all atom 100 file.$a
run 10000
undump 1
next a
jump in.lj loop 

While the second style does not use labels

variable i loop 3
  variable j loop 5
  clear
  ...
  read_data data.polymer.$i$j
  print Running simulation $i.$j
  run 10000
  next j
  jump in.script
next i
jump in.script 

Why does one use labels and the other does not?  My 1st thought is that the labels allow you to skip the initialization commands and continue the simulation using the same starting data file but continuing where the last run finished.  

If I wanted to loop over several temperatures without having to explicitly define/type the parameters, I could do something like:

label tempLoop
variable t index 500 450 400
    fix 1 all nvt $t $t 100.0
    run 10000
next t
jump in.tempSweep tempLoop

If this did not have the label, would it start from the beginning of "in.tempSweep", read in the data (read_data), run the simulation and write over the previously saved data?

Thanks for the help.

Hello LAMMPS Users,

What is the proper looping style?

I've seen a couple different methods in the documentation.

but apparently you have neither read the documentation
to the "jump" nor the "label" command. please do so
and you will be able to answer your questions by yourself.

axel.