looping problems in recent version of lammps - ? support information

Consider the following code in simulation of methane. The following runs without errors but each time the variable is not updated.

But it gives errors in in.lj script. I do not know why ?

variable allatom equal count(all)
variable j loop ${allatom}
label looping
variable gettype equal type[j] #print {gettype}
variable {gettype} equal {gettype}+100
print ${gettype}
next j
jump in.methane looping

Thanks
Arun

in.methane (1.06 KB)

data.methane (38.4 KB)

Consider the following code in simulation of methane. The following runs
without errors but each time the variable is not updated.
But it gives errors in in.lj script. I do not know why ?

that one is *very* obvious. just run with -echo scree and watch. you
try to redefine a variable called "2".

if i copy the other code into the input, it works fine for me. it is
not quite obvious to me, why you need to redefine the variable.

PEPCAC, i presume.

axel.