git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13984 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
sjplimp
2015-09-02 20:41:02 +00:00
parent 047be536bc
commit a6b9148a1e
5 changed files with 59 additions and 5 deletions

View File

@ -49,7 +49,7 @@
<I>python</I> arg = function
<I>equal</I> or <I>atom</I> args = one formula containing numbers, thermo keywords, math operations, group functions, atom values and vectors, compute/fix/variable references
numbers = 0.0, 100, -5.4, 2.8e-4, etc
constants = PI
constants = PI, version
thermo keywords = vol, ke, press, etc from <A HREF = "thermo_style.html">thermo_style</A>
math operators = (), -x, x+y, x-y, x*y, x/y, x^y, x%y,
x == y, x != y, x &lt y, x &lt= y, x &gt y, x &gt= y, x && y, x || y, !x
@ -422,7 +422,7 @@ references to other variables.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR><TD >Number</TD><TD > 0.2, 100, 1.0e20, -15.4, etc</TD></TR>
<TR><TD >Constant</TD><TD > PI</TD></TR>
<TR><TD >Constant</TD><TD > PI, version</TD></TR>
<TR><TD >Thermo keywords</TD><TD > vol, pe, ebond, etc</TD></TR>
<TR><TD >Math operators</TD><TD > (), -x, x+y, x-y, x*y, x/y, x^y, x%y, </TD></TR>
<TR><TD >Math operators</TD><TD > (), -x, x+y, x-y, x*y, x/y, x^y, x%y, x == y, x != y, x &lt y, x &lt= y, x &gt y, x &gt= y, x && y, x || y, !x</TD></TR>
@ -457,6 +457,16 @@ When they invoke the atom-style variable, only atoms in the group are
inlcuded in the formula evaluation. The variable evaluates to 0.0 for
atoms not in the group.
</P>
<P>Constants are set at compile time and cannot be changed. <I>PI</I> will
return the number 3.14159265358979323846, <I>version</I> will return a
numeric version code of the current LAMMPS version (e.g. version
2 Sep 2015 will return the number 20150902). The corresponding value
for newer versions of LAMMPS will be larger, for older versions of
LAMMPS will be smaller. This can be used to make input scripts adapt
automatically to LAMMPS versions, for example:
</P>
<PRE>if $(version<20140513) then "communicate vel yes" else "comm_modify vel yes"
</PRE>
<P>The thermo keywords allowed in a formula are those defined by the
<A HREF = "thermo_style.html">thermo_style custom</A> command. Thermo keywords that
require a <A HREF = "compute.html">compute</A> to calculate their values such as