git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13617 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -123,13 +123,13 @@ per-atom values from a file rather than from a formula. Variables can
|
||||
be hooked to Python functions using code you provide, so that the
|
||||
variable gets its value from the evaluation of the Python code.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: As discussed in <A HREF = "Section_commands.html#cmd_2">Section
|
||||
3.2</A> of the manual, an input script can
|
||||
use "immediate" variables, specified as $(formula) with parenthesis,
|
||||
where the formula has the same syntax as equal-style variables
|
||||
described on this page. This is a way to evaluate a formula
|
||||
immediately without using the variable command to define a named
|
||||
variable.
|
||||
<P>IMPORTANT NOTE: As discussed in <A HREF = "Section_commands.html#cmd_2">Section 3.2</A>
|
||||
of the manual, an input script can use "immediate" variables, specified
|
||||
as $(formula) with parenthesis, where the formula has the same syntax
|
||||
as equal-style variables described on this page. This is a convenient
|
||||
way to evaluate a formula immediately without using the variable command
|
||||
to define a named variable and then evaluate that variable. See below
|
||||
for a more detailed discussion of this feature.
|
||||
</P>
|
||||
<P>In the discussion that follows, the "name" of the variable is the
|
||||
arbitrary string that is the 1st argument in the variable command.
|
||||
@ -144,10 +144,12 @@ simulation.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: When the input script line is encountered that defines
|
||||
a variable of style <I>equal</I> or <I>atom</I> or <I>python</I> that contains a
|
||||
formula or Python code, the formula is NOT immediately evaluated and
|
||||
the result stored. See the discussion below about "Immediate
|
||||
Evaluation of Variables" if you want to do this. This is also true of
|
||||
the <I>format</I> style variable since it evaluates another variable when
|
||||
formula or Python code, the formula is NOT immediately evaluated.
|
||||
It will be evaluated every time when the variable is <B>used</B> instead.
|
||||
If you simply want to evaluate a formula in place you can use as
|
||||
so-called. See the section below about "Immediate Evaluation
|
||||
of Variables" for more details on the topic. This is also true of
|
||||
a <I>format</I> style variable since it evaluates another variable when
|
||||
it is invoked.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: Variables of style <I>equal</I> and <I>atom</I> can be used as
|
||||
@ -161,14 +163,6 @@ can also use such a python-style variable. This means that when the
|
||||
LAMMPS command evaluates the variable, the Python function will be
|
||||
executed.
|
||||
</P>
|
||||
<P>When the input script line is encountered that defines
|
||||
a variable of style <I>equal</I> or <I>atom</I> or <I>python</I> that contains a
|
||||
formula or Python code, the formula is NOT immediately evaluated and
|
||||
the result stored. See the discussion below about "Immediate
|
||||
Evaluation of Variables" if you want to do this. This is also true of
|
||||
the <I>format</I> style variable since it evaluates another variable when
|
||||
it is invoked.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: When a variable command is encountered in the input
|
||||
script and the variable name has already been specified, the command
|
||||
is ignored. This means variables can NOT be re-defined in an input
|
||||
|
||||
Reference in New Issue
Block a user