Hello lammps users. I am using 9th october version of lammps.
I have the following code at the end of in.lj script to count the number of atoms and get the types of each atom
variable allatom equal count(all)
print {allatom}
variable i loop {allatom}
label looping
variable gettype equal type[i]
print {gettype}
print $i
next i
jump in.lj looping
The error is: Indexed per-atom vector in variable formula without atom map (…/variable.cpp:3541)
Although each index has an atom map
The following piece of code gives an error in another input script of mine: Invalid variable in next command, Although I could not find any fault
variable a loop ${N_0}
label looping
variable x equal type[$a]
print $a
print $x
next a
jump in.test looping
Also I am experiencing weird behaviour with looping in this version of lammps especially when the keyword type is involved.
Can someone please have a look ?
Thanks
Arun
From: "S Arun Srikant Sridhar" <[email protected]...>
Date: Oct 29, 2014 11:53:18 AM
Subject: looping problems in recent version of lammps - ?
To: "[email protected]"
<[email protected]>
Hello lammps users. I am using 9th october version of lammps.
I have the following code at the end of in.lj script to count the number of
atoms and get the types of each atom
variable allatom equal count(all)
print \{allatom\}
variable i loop {allatom}
label looping
variable gettype equal type[i\]
print {gettype}
print $i
next i
jump in.lj looping
The error is: Indexed per-atom vector in variable formula without atom map
(../variable.cpp:3541)
Although each index has an atom map
how do you know that? there is no indication in this input that there is.
The following piece of code gives an error in another input script of mine:
Invalid variable in next command, Although I could not find any fault
variable a loop ${N_0}
label looping
variable x equal type[$a]
print $a
print $x
next a
jump in.test looping
Also I am experiencing weird behaviour with looping in this version of
lammps especially when the keyword type is involved.
no problem here either.