git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4121 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2010-05-11 20:04:33 +00:00
parent df7bd40ee0
commit 5b68d667e2
4 changed files with 26 additions and 16 deletions

View File

@ -41,9 +41,11 @@ letters, it can be used as ${myTemp}.
then all must be of the same variable style: <I>index</I>, <I>loop</I>, then all must be of the same variable style: <I>index</I>, <I>loop</I>,
<I>universe</I>, or <I>uloop</I>. An exception is that <I>universe</I>- and <I>universe</I>, or <I>uloop</I>. An exception is that <I>universe</I>- and
<I>uloop</I>-style variables can be mixed in the same <I>next</I> command. <I>uloop</I>-style variables can be mixed in the same <I>next</I> command.
<I>Atom</I>- or <I>equal</I>- or <I>world</I>-style variables cannot be incremented </P>
by a next command. All the variables specified are incremented by one <P>All the variables specified with the next command are incremented by
value from their respective lists. one value from their respective list or values. <I>String-</I> or <I>atom</I>-
or <I>equal</I>- or <I>world</I>-style variables cannot be used with the the
next command, since they only store a single value.
</P> </P>
<P>When any of the variables in the next command has no more values, a <P>When any of the variables in the next command has no more values, a
flag is set that causes the input script to skip the next flag is set that causes the input script to skip the next

View File

@ -38,9 +38,11 @@ If multiple variables are used as arguments to the {next} command,
then all must be of the same variable style: {index}, {loop}, then all must be of the same variable style: {index}, {loop},
{universe}, or {uloop}. An exception is that {universe}- and {universe}, or {uloop}. An exception is that {universe}- and
{uloop}-style variables can be mixed in the same {next} command. {uloop}-style variables can be mixed in the same {next} command.
{Atom}- or {equal}- or {world}-style variables cannot be incremented
by a next command. All the variables specified are incremented by one All the variables specified with the next command are incremented by
value from their respective lists. one value from their respective list or values. {String-} or {atom}-
or {equal}- or {world}-style variables cannot be used with the the
next command, since they only store a single value.
When any of the variables in the next command has no more values, a When any of the variables in the next command has no more values, a
flag is set that causes the input script to skip the next flag is set that causes the input script to skip the next

View File

@ -17,7 +17,7 @@
</PRE> </PRE>
<UL><LI>name = name of variable to define <UL><LI>name = name of variable to define
<LI>style = <I>delete</I> or <I>index</I> or <I>loop</I> or <I>world</I> or <I>universe</I> or <I>uloop</I> or <I>equal</I> or <I>atom</I> <LI>style = <I>delete</I> or <I>index</I> or <I>loop</I> or <I>world</I> or <I>universe</I> or <I>uloop</I> or <I>string</I> or <I>equal</I> or <I>atom</I>
<PRE> <I>delete</I> = no args <PRE> <I>delete</I> = no args
<I>index</I> args = one or more strings <I>index</I> args = one or more strings
@ -25,6 +25,7 @@
<I>world</I> args = one string for each partition of processors <I>world</I> args = one string for each partition of processors
<I>universe</I> args = one or more strings <I>universe</I> args = one or more strings
<I>uloop</I> args = N = integer size of loop <I>uloop</I> args = N = integer size of loop
<I>string</I> arg = one string
<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 <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 numbers = 0.0, 100, -5.4, 2.8e-4, etc
thermo keywords = vol, ke, press, etc from <A HREF = "thermo_style.html">thermo_style</A> thermo keywords = vol, ke, press, etc from <A HREF = "thermo_style.html">thermo_style</A>
@ -57,6 +58,7 @@ variable b1 equal "x[234] + 0.5*vol"
variable b equal xcm(mol1,x)/2.0 variable b equal xcm(mol1,x)/2.0
variable b equal c_myTemp variable b equal c_myTemp
variable b atom x*y/vol variable b atom x*y/vol
variable foo myfile
variable temp world 300.0 310.0 320.0 ${Tfinal} variable temp world 300.0 310.0 320.0 ${Tfinal}
variable x universe 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 variable x universe 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
variable x uloop 15 variable x uloop 15
@ -112,10 +114,11 @@ will override a corresponding index variable setting in the input
script. script.
</P> </P>
<P>There are two exceptions to this rule. First, variables of style <P>There are two exceptions to this rule. First, variables of style
<I>equal</I> and <I>atom</I> ARE redefined each time the command is encountered. <I>string</I> and <I>equal</I> and <I>atom</I> ARE redefined each time the command is
This only changes their associated formula if the formula contains a encountered. This allows these style of variables to be redefined
substitution for another variable, e.g. $x. But that can be useful, multiple times in an input script. In a loop, this means the formula
for example, in a loop. associated with an <I>equal</I> or <I>atom</I> style variable can change if it
contains a substitution for another variable, e.g. $x.
</P> </P>
<P>Second, as described below, if a variable is iterated on to the end of <P>Second, as described below, if a variable is iterated on to the end of
its list of strings via the <A HREF = "next.html">next</A> command, it is removed its list of strings via the <A HREF = "next.html">next</A> command, it is removed

View File

@ -13,13 +13,14 @@ variable command :h3
variable name style args ... :pre variable name style args ... :pre
name = name of variable to define :ulb,l name = name of variable to define :ulb,l
style = {delete} or {index} or {loop} or {world} or {universe} or {uloop} or {equal} or {atom} :l style = {delete} or {index} or {loop} or {world} or {universe} or {uloop} or {string} or {equal} or {atom} :l
{delete} = no args {delete} = no args
{index} args = one or more strings {index} args = one or more strings
{loop} args = N = integer size of loop {loop} args = N = integer size of loop
{world} args = one string for each partition of processors {world} args = one string for each partition of processors
{universe} args = one or more strings {universe} args = one or more strings
{uloop} args = N = integer size of loop {uloop} args = N = integer size of loop
{string} arg = one string
{equal} or {atom} args = one formula containing numbers, thermo keywords, math operations, group functions, atom values and vectors, compute/fix/variable references {equal} or {atom} 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 numbers = 0.0, 100, -5.4, 2.8e-4, etc
thermo keywords = vol, ke, press, etc from "thermo_style"_thermo_style.html thermo keywords = vol, ke, press, etc from "thermo_style"_thermo_style.html
@ -51,6 +52,7 @@ variable b1 equal "x\[234\] + 0.5*vol"
variable b equal xcm(mol1,x)/2.0 variable b equal xcm(mol1,x)/2.0
variable b equal c_myTemp variable b equal c_myTemp
variable b atom x*y/vol variable b atom x*y/vol
variable foo myfile
variable temp world 300.0 310.0 320.0 $\{Tfinal\} variable temp world 300.0 310.0 320.0 $\{Tfinal\}
variable x universe 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 variable x universe 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
variable x uloop 15 variable x uloop 15
@ -106,10 +108,11 @@ will override a corresponding index variable setting in the input
script. script.
There are two exceptions to this rule. First, variables of style There are two exceptions to this rule. First, variables of style
{equal} and {atom} ARE redefined each time the command is encountered. {string} and {equal} and {atom} ARE redefined each time the command is
This only changes their associated formula if the formula contains a encountered. This allows these style of variables to be redefined
substitution for another variable, e.g. $x. But that can be useful, multiple times in an input script. In a loop, this means the formula
for example, in a loop. associated with an {equal} or {atom} style variable can change if it
contains a substitution for another variable, e.g. $x.
Second, as described below, if a variable is iterated on to the end of Second, as described below, if a variable is iterated on to the end of
its list of strings via the "next"_next.html command, it is removed its list of strings via the "next"_next.html command, it is removed