Lammps
Lammps
"C:\Program Files\Atomsk\atomsk.exe"
For the atomfile style, a filename is provided which contains one or more sets of
values, to assign on a per-atom basis
to the variable. The format of the file is described below.
For the file style, a filename is provided which contains a list of strings to
assign to the variable,
one per line. The strings can be numeric values if desired.
See the discussion of the next() function below for equal-style variables,
which will convert the string of a file-style variable into a numeric value in a
formula.
When a file-style variable is defined, the file is opened and the string on the
first line is
read and stored with the variable. This means the variable can then be evaluated as
many times
as desired and will return that string. There are two ways to cause the next string
from the file
to be read: use the next command or the next() function in an equal- or atom-style
variable,
as discussed below.
This enables the construction of simple loops in the input script that are iterated
over and then exited from.
For the index style, one or more strings are specified. Initially, the first string
is assigned to the
variable. Each time a next command is used with the variable name, the next string
is assigned.
All processors assign the same string to the variable.
label loop
variable file.lst loop 100
read_data variable
next
label loopa
variable a loop 5
label loopb
variable b loop 5
print "A,B = $a,$b"
run 10000
if $b > 2 then "jump in.script break"
next b
jump in.script loopb
label break
variable b delete
next a
jump in.script loopa
When an atomfile-style variable is defined, the file is opened and the first set of
per-atom values are read and
stored with the variable. This means the variable can then be evaluated as many
times as desired and will return
those values. There are two ways to cause the next set of per-atom values from the
file to be read:
use the next command or the next() function in an atom-style variable, as discussed
below