clear, label and jump

Dear users,

I'm trying to program a script like:

...
label loop_j
   ...define simulation box
   write_restart ...
   label loop_i
      clear
      read_restart ....
      ...
      displace atoms...
      ...
      next i
   jump SELF loop_i
   next j
jump SELF loop_j

But it seems that label's are cleared after "clear" command:

next i
jump SELF loop_i
ERROR: Label wasn't found in input script (input.cpp:160)

Is there a workaround to use loops/jumps but have "clear" inside?

Thank you in advnace,

Kind regards,
Denis

Dear users,

I'm trying to program a script like:

...
label loop_j
...define simulation box
write_restart ...
label loop_i
clear
read_restart ....
...
displace atoms...
...
next i
jump SELF loop_i
next j
jump SELF loop_j

But it seems that label's are cleared after "clear" command:

next i
jump SELF loop_i
ERROR: Label wasn't found in input script (input.cpp:160)

Is there a workaround to use loops/jumps but have "clear" inside?

putting "clear" inside this kind of nested
loop works fine for me with the current version
of lammps on linux x86_64.

please provide a complete and runnable input
that produces the bad behavior for you. the
most likely explanation would be a typo or
some non-printable character somewhere.

axel.

Labels should not be affected by a clear command.
The input file is just scanned, line by line, until
the label is found. So there is nothing really stored
for labels.

Steve