git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5257 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -114,11 +114,23 @@ underscores, or punctuation characters.
|
||||
line are arguments.
|
||||
</P>
|
||||
<P>(6) If you want text with spaces to be treated as a single argument,
|
||||
it can be enclosed in double quotes. The quotes are removed when the
|
||||
single argument is stored in its final form. See the <A HREF = "dump_modify.html">dump modify
|
||||
format</A> or <A HREF = "if.html">if</A> commands for examples. A "#"
|
||||
or "$" character that is between double quotes will not be treated as
|
||||
a comment indicator in (2) or substituted for as a variable in (3).
|
||||
it can be enclosed in either double or single quotes. E.g.
|
||||
</P>
|
||||
<PRE>print "Volume = $v"
|
||||
print 'Volume = $v'
|
||||
</PRE>
|
||||
<P>The quotes are removed when the single argument is stored internally.
|
||||
See the <A HREF = "dump_modify.html">dump modify format</A> or <A HREF = "if.html">if</A> commands
|
||||
for examples. A "#" or "$" character that is between quotes will not
|
||||
be treated as a comment indicator in (2) or substituted for as a
|
||||
variable in (3).
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: If the argument is itself a command that requires a
|
||||
quoted argument (e.g. using a <A HREF = "print.html">print</A> command as part of an
|
||||
<A HREF = "if.html">if</A> or <A HREF = "run.html">run every</A> command), then the double and
|
||||
single quotes can be nested in the usual manner. See the doc pages
|
||||
for those commands for examples. Only one of level of nesting is
|
||||
allowed, but that should be sufficient for most use cases.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
|
||||
@ -111,11 +111,23 @@ underscores, or punctuation characters.
|
||||
line are arguments.
|
||||
|
||||
(6) If you want text with spaces to be treated as a single argument,
|
||||
it can be enclosed in double quotes. The quotes are removed when the
|
||||
single argument is stored in its final form. See the "dump modify
|
||||
format"_dump_modify.html or "if"_if.html commands for examples. A "#"
|
||||
or "$" character that is between double quotes will not be treated as
|
||||
a comment indicator in (2) or substituted for as a variable in (3).
|
||||
it can be enclosed in either double or single quotes. E.g.
|
||||
|
||||
print "Volume = $v"
|
||||
print 'Volume = $v' :pre
|
||||
|
||||
The quotes are removed when the single argument is stored internally.
|
||||
See the "dump modify format"_dump_modify.html or "if"_if.html commands
|
||||
for examples. A "#" or "$" character that is between quotes will not
|
||||
be treated as a comment indicator in (2) or substituted for as a
|
||||
variable in (3).
|
||||
|
||||
IMPORTANT NOTE: If the argument is itself a command that requires a
|
||||
quoted argument (e.g. using a "print"_print.html command as part of an
|
||||
"if"_if.html or "run every"_run.html command), then the double and
|
||||
single quotes can be nested in the usual manner. See the doc pages
|
||||
for those commands for examples. Only one of level of nesting is
|
||||
allowed, but that should be sufficient for most use cases.
|
||||
|
||||
:line
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
<PRE>angle_style class2
|
||||
angle_coeff * 75.0
|
||||
angle_coeff 1 bb 10.5872 1.0119 1.5228
|
||||
angle_coeff * ba 3.6551 24.895 1.0119 1.5228
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
|
||||
@ -16,7 +16,8 @@ angle_style class2 :pre
|
||||
|
||||
angle_style class2
|
||||
angle_coeff * 75.0
|
||||
angle_coeff 1 bb 10.5872 1.0119 1.5228 :pre
|
||||
angle_coeff 1 bb 10.5872 1.0119 1.5228
|
||||
angle_coeff * ba 3.6551 24.895 1.0119 1.5228 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
|
||||
@ -19,6 +19,11 @@
|
||||
</P>
|
||||
<PRE>dihedral_style class2
|
||||
dihedral_coeff 1 100 75 100 70 80 60
|
||||
dihedral_coeff * mbt 3.5945 0.1704 -0.5490 1.5228
|
||||
dihedral_coeff * ebt 0.3417 0.3264 -0.9036 0.1368 0.0 -0.8080 1.0119 1.1010
|
||||
dihedral_coeff 2 at 0.0 -0.1850 -0.7963 -2.0220 0.0 -0.3991 110.2453 105.1270
|
||||
dihedral_coeff * aat -13.5271 110.2453 105.1270
|
||||
dihedral_coeff * bb13 0.0 1.0119 1.1010
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
|
||||
@ -15,7 +15,12 @@ dihedral_style class2 :pre
|
||||
[Examples:]
|
||||
|
||||
dihedral_style class2
|
||||
dihedral_coeff 1 100 75 100 70 80 60 :pre
|
||||
dihedral_coeff 1 100 75 100 70 80 60
|
||||
dihedral_coeff * mbt 3.5945 0.1704 -0.5490 1.5228
|
||||
dihedral_coeff * ebt 0.3417 0.3264 -0.9036 0.1368 0.0 -0.8080 1.0119 1.1010
|
||||
dihedral_coeff 2 at 0.0 -0.1850 -0.7963 -2.0220 0.0 -0.3991 110.2453 105.1270
|
||||
dihedral_coeff * aat -13.5271 110.2453 105.1270
|
||||
dihedral_coeff * bb13 0.0 1.0119 1.1010 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
|
||||
135
doc/if.html
135
doc/if.html
@ -13,64 +13,81 @@
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>if value1 operator value2 then t1 t2 ... else e1 e2 ...
|
||||
<PRE>if boolean then t1 t2 ... elif boolean f1 f2 ... elif boolean f1 f2 ... else e1 e2 ...
|
||||
</PRE>
|
||||
<UL><LI>value1 = 1st value
|
||||
<LI>operator = "<" or "<=" or ">" or ">=" or "==" or "!="
|
||||
<LI>value2 = 2nd value
|
||||
<UL><LI>boolean = a Boolean expression evaluated as TRUE or FALSE (see below)
|
||||
<LI>then = required word
|
||||
<LI>t1,t2,...,tN = one or more LAMMPS commands to execute if condition is met, each enclosed in quotes
|
||||
<LI>elif = optional word, can appear multiple times
|
||||
<LI>f1,f2,...,fN = one or more LAMMPS commands to execute if elif condition is met, each enclosed in quotes (optional arguments)
|
||||
<LI>else = optional argument
|
||||
<LI>e1,e2,...,eN = one or more LAMMPS commands to execute if condition is not met, each enclosed in quotes (optional arguments)
|
||||
<LI>e1,e2,...,eN = one or more LAMMPS commands to execute if no condition is met, each enclosed in quotes (optional arguments)
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>if ${steps} > 1000 then exit
|
||||
if $x <= $y then "print X is smaller = $x" else "print Y is smaller = $y"
|
||||
if ${eng} > 0.0 then "timestep 0.005"
|
||||
if ${eng} > ${eng_previous} then "jump file1" else "jump file2"
|
||||
<PRE>if "${steps} > 1000" then exit
|
||||
if "$x <= $y" then "print X is smaller = $x" else "print Y is smaller = $y"
|
||||
if "(${eng} > 0.0) || ($n < 1000)" then &
|
||||
"timestep 0.005" &
|
||||
elif $n<10000 &
|
||||
"timestep 0.01" &
|
||||
else &
|
||||
"timestep 0.02" &
|
||||
"print 'Max step reached'"
|
||||
if "${eng} > ${eng_previous}" then "jump file1" else "jump file2"
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>This command provides an in-then-else capability within an input
|
||||
script. Two values are numerically compared to each other and the
|
||||
result is TRUE or FALSE. Note that as in the examples above, either
|
||||
of the two values can be variables, as defined by the
|
||||
<A HREF = "variable.html">variable</A> command, so that when the if command is
|
||||
executed, the variable(s) will be evaluated, which could calculate a
|
||||
user-defined formula that reflects the current state of the
|
||||
simulation.
|
||||
script. A Boolean expression is evaluted and the result is TRUE or
|
||||
FALSE. Note that as in the examples above, the expression can contain
|
||||
variables, as defined by the <A HREF = "variable.html">variable</A> command, which
|
||||
will be evaluated as part of the expression. Thus a user-defined
|
||||
formula that reflects the current state of the simulation can be used
|
||||
to issue one or more new commands.
|
||||
</P>
|
||||
<P>If the result of the if test is TRUE, then one or more commands (t1,
|
||||
t2, ..., tN) are executed. If the result of the if test is FALSE and
|
||||
no optional "else" argument is included, then the if command does
|
||||
nothing. If the result of the if test is FALSE and the optional
|
||||
"else" argument is included, then one or more commands (e1,
|
||||
e2, ..., eN) are executed.
|
||||
<P>If the result of the Boolean expression is TRUE, then one or more
|
||||
commands (t1, t2, ..., tN) are executed. If it is FALSE, then Boolean
|
||||
expressions associated with successive elif keywords are evaluated
|
||||
until one is found to be true, in which case its commands (f1, f2,
|
||||
..., fN) are executed. If no Boolean expression is TRUE, then the
|
||||
commands associated witht the else keyword, namely (e1, e2, ..., eN),
|
||||
are executed. The elif and else keywords and their associated
|
||||
commands are optional. If they aren't specified and the initial
|
||||
Boolean expression is FALSE, then no commands are executed.
|
||||
</P>
|
||||
<P>Each then or else command (t1, e1, etc) can be any valid LAMMPS input
|
||||
script command. Each command should be enclosed in quotes, so it will
|
||||
be treated as a single argument, as in the examples above.
|
||||
<P>The allowed syntax for each Boolean expression is described below.
|
||||
</P>
|
||||
<P>Each command (t1, f1, e1, etc) can be any valid LAMMPS input script
|
||||
command. If the command is more than one word, it must enclosed in
|
||||
quotes, so it will be treated as a single argument, as in the examples
|
||||
above.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: If a command itself requires a quoted argument (e.g. a
|
||||
<A HREF = "print.html">print</A> command), then double and single quotes can be used
|
||||
and nested in the usual manner, as in the examples above and below.
|
||||
See <A HREF = "Section_commands.html#3_2">this section</A> of the manual for more
|
||||
details on using quotes in arguments. Only one of level of nesting is
|
||||
allowed, but that should be sufficient for most use cases.
|
||||
</P>
|
||||
<P>Note that by using the line continuation character "&", the if command
|
||||
can be spread across many lines, though it is still a single
|
||||
command:
|
||||
can be spread across many lines, though it is still a single command:
|
||||
</P>
|
||||
<PRE>if $a < $b then &
|
||||
"print Minimum value = $a" &
|
||||
<PRE>if "$a < $b" then &
|
||||
"print 'Minimum value = $a'" &
|
||||
"run 1000" &
|
||||
else &
|
||||
"print Minimum value = $b" &
|
||||
'print "Minimum value = $b"' &
|
||||
"minimize 0.001 0.001 1000 10000"
|
||||
</PRE>
|
||||
<P>Note that if any executed comand is a bogus LAMMPS command, such as
|
||||
"exit" in the first example above, then executing the command will
|
||||
cause LAMMPS to halt.
|
||||
<P>Note that if one of the commands to execute is an invalid LAMMPS
|
||||
command, such as "exit" in the first example above, then executing the
|
||||
command will cause LAMMPS to halt.
|
||||
</P>
|
||||
<P>Note that by jumping to a label in the same input script, the if
|
||||
command can be used to break out of a loop. See the <A HREF = "variable.html">variable
|
||||
delete</A> for info on how to delete the associated loop
|
||||
variable, so that it can be re-used later in the input script.
|
||||
delete</A> command for info on how to delete the associated
|
||||
loop variable, so that it can be re-used later in the input script.
|
||||
</P>
|
||||
<P>Here is an example of a double loop which uses the if and
|
||||
<A HREF = "jump.html">jump</A> commands to break out of the inner loop when a
|
||||
@ -82,7 +99,7 @@ variable a loop 5
|
||||
variable b loop 5
|
||||
print "A,B = $a,$b"
|
||||
run 10000
|
||||
if $b > 2 then "jump in.script break"
|
||||
if '$b > 2' then "print 'Jumping to another script'" "jump in.script break"
|
||||
next b
|
||||
jump in.script loopb
|
||||
label break
|
||||
@ -91,6 +108,52 @@ variable b delete
|
||||
<PRE>next a
|
||||
jump in.script loopa
|
||||
</PRE>
|
||||
<HR>
|
||||
|
||||
<P>The Boolean expressions for the if and elif keywords have a C-like
|
||||
syntax. Note that each expression is a single argument within the if
|
||||
command. Thus if you want to include spaces in the expression for
|
||||
clarity, you must enclose the entire expression in quotes.
|
||||
</P>
|
||||
<P>An expression is built out of numbers
|
||||
</P>
|
||||
<PRE>0.2, 100, 1.0e20, -15.4, etc
|
||||
</PRE>
|
||||
<P>and Boolean operators:
|
||||
</P>
|
||||
<PRE>A == B
|
||||
A != B
|
||||
A < B
|
||||
A <= B
|
||||
A > B
|
||||
A >= B
|
||||
A && B
|
||||
A || B
|
||||
</PRE>
|
||||
<P>Each A and B is a number or a variable reference like $a or ${abc},
|
||||
or another Boolean expression.
|
||||
</P>
|
||||
<P>If a variable is used it must produce a number when evaluated and
|
||||
substituted for in the expression.
|
||||
</P>
|
||||
<P>Expressions are evaluated left to right and have the usual C-style
|
||||
precedence: the 4 relational operators "<", "<=", ">", and ">=" have
|
||||
the highest precedence; those 4 relational operators before the
|
||||
remaining two relational operators "==" and "!="; those two relational
|
||||
operators before the logical AND operator "&&"; and the AND operator
|
||||
"&&" before the logical OR operator "||". Parenthesis can be used to
|
||||
group one or more portions of an expression and/or enforce a different
|
||||
order of evaluation than what would occur with the default precedence.
|
||||
</P>
|
||||
<P>The 6 relational operators return either a 1.0 or 0.0 depending on
|
||||
whether the relationship between x and y is true or false. The
|
||||
logical AND operator will return 1.0 of both its arguments are
|
||||
non-zero, else return a 0.0. The logical OR operator will return 1.0
|
||||
of either of its arguments is non-zero, else return a 0.0.
|
||||
</P>
|
||||
<P>The overall Boolean expression produces a TRUE result if the result is
|
||||
non-zero. If the result is zero, the expression result is FALSE.
|
||||
</P>
|
||||
<P><B>Restrictions:</B> none
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
|
||||
135
doc/if.txt
135
doc/if.txt
@ -10,64 +10,81 @@ if command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
if value1 operator value2 then t1 t2 ... else e1 e2 ... :pre
|
||||
if boolean then t1 t2 ... elif boolean f1 f2 ... elif boolean f1 f2 ... else e1 e2 ... :pre
|
||||
|
||||
value1 = 1st value
|
||||
operator = "<" or "<=" or ">" or ">=" or "==" or "!="
|
||||
value2 = 2nd value
|
||||
boolean = a Boolean expression evaluated as TRUE or FALSE (see below)
|
||||
then = required word
|
||||
t1,t2,...,tN = one or more LAMMPS commands to execute if condition is met, each enclosed in quotes
|
||||
elif = optional word, can appear multiple times
|
||||
f1,f2,...,fN = one or more LAMMPS commands to execute if elif condition is met, each enclosed in quotes (optional arguments)
|
||||
else = optional argument
|
||||
e1,e2,...,eN = one or more LAMMPS commands to execute if condition is not met, each enclosed in quotes (optional arguments) :ul
|
||||
e1,e2,...,eN = one or more LAMMPS commands to execute if no condition is met, each enclosed in quotes (optional arguments) :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
if $\{steps\} > 1000 then exit
|
||||
if $x <= $y then "print X is smaller = $x" else "print Y is smaller = $y"
|
||||
if $\{eng\} > 0.0 then "timestep 0.005"
|
||||
if $\{eng\} > $\{eng_previous\} then "jump file1" else "jump file2" :pre
|
||||
if "$\{steps\} > 1000" then exit
|
||||
if "$x <= $y" then "print X is smaller = $x" else "print Y is smaller = $y"
|
||||
if "($\{eng\} > 0.0) || ($n < 1000)" then &
|
||||
"timestep 0.005" &
|
||||
elif $n<10000 &
|
||||
"timestep 0.01" &
|
||||
else &
|
||||
"timestep 0.02" &
|
||||
"print 'Max step reached'"
|
||||
if "$\{eng\} > $\{eng_previous\}" then "jump file1" else "jump file2" :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
This command provides an in-then-else capability within an input
|
||||
script. Two values are numerically compared to each other and the
|
||||
result is TRUE or FALSE. Note that as in the examples above, either
|
||||
of the two values can be variables, as defined by the
|
||||
"variable"_variable.html command, so that when the if command is
|
||||
executed, the variable(s) will be evaluated, which could calculate a
|
||||
user-defined formula that reflects the current state of the
|
||||
simulation.
|
||||
script. A Boolean expression is evaluted and the result is TRUE or
|
||||
FALSE. Note that as in the examples above, the expression can contain
|
||||
variables, as defined by the "variable"_variable.html command, which
|
||||
will be evaluated as part of the expression. Thus a user-defined
|
||||
formula that reflects the current state of the simulation can be used
|
||||
to issue one or more new commands.
|
||||
|
||||
If the result of the if test is TRUE, then one or more commands (t1,
|
||||
t2, ..., tN) are executed. If the result of the if test is FALSE and
|
||||
no optional "else" argument is included, then the if command does
|
||||
nothing. If the result of the if test is FALSE and the optional
|
||||
"else" argument is included, then one or more commands (e1,
|
||||
e2, ..., eN) are executed.
|
||||
If the result of the Boolean expression is TRUE, then one or more
|
||||
commands (t1, t2, ..., tN) are executed. If it is FALSE, then Boolean
|
||||
expressions associated with successive elif keywords are evaluated
|
||||
until one is found to be true, in which case its commands (f1, f2,
|
||||
..., fN) are executed. If no Boolean expression is TRUE, then the
|
||||
commands associated witht the else keyword, namely (e1, e2, ..., eN),
|
||||
are executed. The elif and else keywords and their associated
|
||||
commands are optional. If they aren't specified and the initial
|
||||
Boolean expression is FALSE, then no commands are executed.
|
||||
|
||||
Each then or else command (t1, e1, etc) can be any valid LAMMPS input
|
||||
script command. Each command should be enclosed in quotes, so it will
|
||||
be treated as a single argument, as in the examples above.
|
||||
The syntax for Boolean expressions is described below.
|
||||
|
||||
Each command (t1, f1, e1, etc) can be any valid LAMMPS input script
|
||||
command. If the command is more than one word, it must enclosed in
|
||||
quotes, so it will be treated as a single argument, as in the examples
|
||||
above.
|
||||
|
||||
IMPORTANT NOTE: If a command itself requires a quoted argument (e.g. a
|
||||
"print"_print.html command), then double and single quotes can be used
|
||||
and nested in the usual manner, as in the examples above and below.
|
||||
See "this section"_Section_commands.html#3_2 of the manual for more
|
||||
details on using quotes in arguments. Only one of level of nesting is
|
||||
allowed, but that should be sufficient for most use cases.
|
||||
|
||||
Note that by using the line continuation character "&", the if command
|
||||
can be spread across many lines, though it is still a single
|
||||
command:
|
||||
can be spread across many lines, though it is still a single command:
|
||||
|
||||
if $a < $b then &
|
||||
"print Minimum value = $a" &
|
||||
if "$a < $b" then &
|
||||
"print 'Minimum value = $a'" &
|
||||
"run 1000" &
|
||||
else &
|
||||
"print Minimum value = $b" &
|
||||
'print "Minimum value = $b"' &
|
||||
"minimize 0.001 0.001 1000 10000" :pre
|
||||
|
||||
Note that if any executed comand is a bogus LAMMPS command, such as
|
||||
"exit" in the first example above, then executing the command will
|
||||
cause LAMMPS to halt.
|
||||
Note that if one of the commands to execute is an invalid LAMMPS
|
||||
command, such as "exit" in the first example above, then executing the
|
||||
command will cause LAMMPS to halt.
|
||||
|
||||
Note that by jumping to a label in the same input script, the if
|
||||
command can be used to break out of a loop. See the "variable
|
||||
delete"_variable.html for info on how to delete the associated loop
|
||||
variable, so that it can be re-used later in the input script.
|
||||
delete"_variable.html command for info on how to delete the associated
|
||||
loop variable, so that it can be re-used later in the input script.
|
||||
|
||||
Here is an example of a double loop which uses the if and
|
||||
"jump"_jump.html commands to break out of the inner loop when a
|
||||
@ -79,7 +96,7 @@ variable a loop 5
|
||||
variable b loop 5
|
||||
print "A,B = $a,$b"
|
||||
run 10000
|
||||
if $b > 2 then "jump in.script break"
|
||||
if '$b > 2' then "print 'Jumping to another script'" "jump in.script break"
|
||||
next b
|
||||
jump in.script loopb
|
||||
label break
|
||||
@ -87,6 +104,52 @@ variable b delete :pre
|
||||
next a
|
||||
jump in.script loopa :pre
|
||||
|
||||
:line
|
||||
|
||||
The Boolean expressions for the if and elif keywords have a C-like
|
||||
syntax. Note that each expression is a single argument within the if
|
||||
command. Thus if you want to include spaces in the expression for
|
||||
clarity, you must enclose the entire expression in quotes.
|
||||
|
||||
An expression is built out of numbers
|
||||
|
||||
0.2, 100, 1.0e20, -15.4, etc :pre
|
||||
|
||||
and Boolean operators:
|
||||
|
||||
A == B
|
||||
A != B
|
||||
A < B
|
||||
A <= B
|
||||
A > B
|
||||
A >= B
|
||||
A && B
|
||||
A || B :pre
|
||||
|
||||
Each A and B is a number or a variable reference like $a or $\{abc\},
|
||||
or another Boolean expression.
|
||||
|
||||
If a variable is used it must produce a number when evaluated and
|
||||
substituted for in the expression.
|
||||
|
||||
Expressions are evaluated left to right and have the usual C-style
|
||||
precedence: the 4 relational operators "<", "<=", ">", and ">=" have
|
||||
the highest precedence; those 4 relational operators before the
|
||||
remaining two relational operators "==" and "!="; those two relational
|
||||
operators before the logical AND operator "&&"; and the AND operator
|
||||
"&&" before the logical OR operator "||". Parenthesis can be used to
|
||||
group one or more portions of an expression and/or enforce a different
|
||||
order of evaluation than what would occur with the default precedence.
|
||||
|
||||
The 6 relational operators return either a 1.0 or 0.0 depending on
|
||||
whether the relationship between x and y is true or false. The
|
||||
logical AND operator will return 1.0 if both its arguments are
|
||||
non-zero, else return a 0.0. The logical OR operator will return 1.0
|
||||
if either of its arguments is non-zero, else return a 0.0.
|
||||
|
||||
The overall Boolean expression produces a TRUE result if the result is
|
||||
non-zero. If the result is zero, the expression result is FALSE.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
[Related commands:]
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
</P>
|
||||
<PRE>improper_style class2
|
||||
improper_coeff 1 100.0 0
|
||||
improper_coeff * aa 0.0 0.0 0.0 115.06 130.01 115.06
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
|
||||
@ -15,7 +15,8 @@ improper_style class2 :pre
|
||||
[Examples:]
|
||||
|
||||
improper_style class2
|
||||
improper_coeff 1 100.0 0 :pre
|
||||
improper_coeff 1 100.0 0
|
||||
improper_coeff * aa 0.0 0.0 0.0 115.06 130.01 115.06 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
|
||||
@ -13,23 +13,23 @@
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>print str1 str2 ...
|
||||
<PRE>print str
|
||||
</PRE>
|
||||
<UL><LI>str1,str2,...,strN = one or more text strings to print, which may contain variables
|
||||
<UL><LI>str1 = text string to print, which may contain variables
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>print Done with equilibration
|
||||
print The system volume is now $v
|
||||
<PRE>print "Done with equilibration"
|
||||
print Vol=$v
|
||||
print "The system volume is now $v"
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>Print one or more text strings to the screen and logfile. The
|
||||
individual text strings are effectively concatenated into a single
|
||||
string, and one line of output is generated. Thus the 2nd and 3rd
|
||||
examples above are equivalent. If variables are included in any of
|
||||
the strings, they will be evaluated and their current values printed.
|
||||
<P>Print a text string to the screen and logfile. One line of output is
|
||||
generated. If the string has white space in it (spaces, tabs, etc),
|
||||
then you must enclose it in single or double quotes so that it is
|
||||
treated as a single argument. If variables are included in the
|
||||
string, they will be evaluated and their current values printed.
|
||||
</P>
|
||||
<P>If you want the print command to be executed multiple times (with
|
||||
changing variable values), there are 3 options. First, consider using
|
||||
|
||||
@ -10,23 +10,23 @@ print command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
print str1 str2 ... :pre
|
||||
print str :pre
|
||||
|
||||
str1,str2,...,strN = one or more text strings to print, which may contain variables :ul
|
||||
str1 = text string to print, which may contain variables :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
print Done with equilibration
|
||||
print The system volume is now $v
|
||||
print "Done with equilibration"
|
||||
print Vol=$v
|
||||
print "The system volume is now $v" :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Print one or more text strings to the screen and logfile. The
|
||||
individual text strings are effectively concatenated into a single
|
||||
string, and one line of output is generated. Thus the 2nd and 3rd
|
||||
examples above are equivalent. If variables are included in any of
|
||||
the strings, they will be evaluated and their current values printed.
|
||||
Print a text string to the screen and logfile. One line of output is
|
||||
generated. If the string has white space in it (spaces, tabs, etc),
|
||||
then you must enclose it in single or double quotes so that it is
|
||||
treated as a single argument. If variables are included in the
|
||||
string, they will be evaluated and their current values printed.
|
||||
|
||||
If you want the print command to be executed multiple times (with
|
||||
changing variable values), there are 3 options. First, consider using
|
||||
|
||||
15
doc/run.html
15
doc/run.html
@ -41,7 +41,7 @@
|
||||
run 1000000 upto
|
||||
run 100 start 0 stop 1000
|
||||
run 1000 pre no post yes
|
||||
run 100000 start 0 stop 1000000 every 1000 "print Protein Rg = $r"
|
||||
run 100000 start 0 stop 1000000 every 1000 "print 'Protein Rg = $r'"
|
||||
run 100000 every 1000 NULL
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
@ -120,7 +120,10 @@ number of arguments. Each of the trailing arguments is a single
|
||||
LAMMPS command, and each command should be enclosed in quotes, so that
|
||||
the entire command will be treated as a single argument. This will
|
||||
also prevent any variables in the command from being evaluated until
|
||||
it is executed multiple times during the run.
|
||||
it is executed multiple times during the run. Note that if a command
|
||||
itself needs one of its arguments quoted (e.g. the <A HREF = "print.html">print</A>
|
||||
command), then you can use a combination of single and double quotes,
|
||||
as in the example above.
|
||||
</P>
|
||||
<P>The <I>every</I> keyword is a means to avoid listing a long series of runs
|
||||
and interleaving commands in your input script. For example, a
|
||||
@ -161,10 +164,10 @@ command can be spread across many lines, though it is still a single
|
||||
command:
|
||||
</P>
|
||||
<PRE>run 100000 every 1000 &
|
||||
"print Minimum value = $a" &
|
||||
"print Maximum value = $b" &
|
||||
"print Temp = $c" &
|
||||
"print Press = $d"
|
||||
"print 'Minimum value = $a'" &
|
||||
"print 'Maximum value = $b'" &
|
||||
"print 'Temp = $c'" &
|
||||
"print 'Press = $d'"
|
||||
</PRE>
|
||||
<P>If the <I>pre</I> and <I>post</I> options are set to "no" when used with the
|
||||
<I>every</I> keyword, then the 1st run will do the full setup and the last
|
||||
|
||||
15
doc/run.txt
15
doc/run.txt
@ -34,7 +34,7 @@ run 10000
|
||||
run 1000000 upto
|
||||
run 100 start 0 stop 1000
|
||||
run 1000 pre no post yes
|
||||
run 100000 start 0 stop 1000000 every 1000 "print Protein Rg = $r"
|
||||
run 100000 start 0 stop 1000000 every 1000 "print 'Protein Rg = $r'"
|
||||
run 100000 every 1000 NULL :pre
|
||||
|
||||
[Description:]
|
||||
@ -113,7 +113,10 @@ number of arguments. Each of the trailing arguments is a single
|
||||
LAMMPS command, and each command should be enclosed in quotes, so that
|
||||
the entire command will be treated as a single argument. This will
|
||||
also prevent any variables in the command from being evaluated until
|
||||
it is executed multiple times during the run.
|
||||
it is executed multiple times during the run. Note that if a command
|
||||
itself needs one of its arguments quoted (e.g. the "print"_print.html
|
||||
command), then you can use a combination of single and double quotes,
|
||||
as in the example above.
|
||||
|
||||
The {every} keyword is a means to avoid listing a long series of runs
|
||||
and interleaving commands in your input script. For example, a
|
||||
@ -154,10 +157,10 @@ command can be spread across many lines, though it is still a single
|
||||
command:
|
||||
|
||||
run 100000 every 1000 &
|
||||
"print Minimum value = $a" &
|
||||
"print Maximum value = $b" &
|
||||
"print Temp = $c" &
|
||||
"print Press = $d" :pre
|
||||
"print 'Minimum value = $a'" &
|
||||
"print 'Maximum value = $b'" &
|
||||
"print 'Temp = $c'" &
|
||||
"print 'Press = $d'" :pre
|
||||
|
||||
If the {pre} and {post} options are set to "no" when used with the
|
||||
{every} keyword, then the 1st run will do the full setup and the last
|
||||
|
||||
@ -332,9 +332,9 @@ relational operators "<", "<=", ">", and ">="; those 4 relational
|
||||
operators before the remaining two relational operators "==" and "!=";
|
||||
those two relational operators before the logical AND operator "&&";
|
||||
and the AND operator "&&" before the logical OR operator "||".
|
||||
Parenthesis can be used to group one or more portions of a formula and
|
||||
enforce a different order of evaluation than what would occur with the
|
||||
default precedence.
|
||||
Parenthesis can be used to group one or more portions of a formula
|
||||
and/or enforce a different order of evaluation than what would occur
|
||||
with the default precedence.
|
||||
</P>
|
||||
<P>The 6 relational operators return either a 1.0 or 0.0 depending on
|
||||
whether the relationship between x and y is true or false. For
|
||||
|
||||
@ -331,17 +331,17 @@ relational operators "<", "<=", ">", and ">="; those 4 relational
|
||||
operators before the remaining two relational operators "==" and "!=";
|
||||
those two relational operators before the logical AND operator "&&";
|
||||
and the AND operator "&&" before the logical OR operator "||".
|
||||
Parenthesis can be used to group one or more portions of a formula and
|
||||
enforce a different order of evaluation than what would occur with the
|
||||
default precedence.
|
||||
Parenthesis can be used to group one or more portions of a formula
|
||||
and/or enforce a different order of evaluation than what would occur
|
||||
with the default precedence.
|
||||
|
||||
The 6 relational operators return either a 1.0 or 0.0 depending on
|
||||
whether the relationship between x and y is true or false. For
|
||||
example the expression x<10.0 in an atom-style variable formula will
|
||||
return 1.0 for all atoms whose x-coordinate is less than 10.0, and 0.0
|
||||
for the others. The logical AND operator will return 1.0 of both its
|
||||
for the others. The logical AND operator will return 1.0 if both its
|
||||
arguments are non-zero, else return a 0.0. The logical OR operator
|
||||
will return 1.0 of either of its arguments is non-zero, else return a
|
||||
will return 1.0 if either of its arguments is non-zero, else return a
|
||||
0.0. These relational and logical operators can be used as a masking
|
||||
or selection operation in a formula. For example, the number of atoms
|
||||
whose properties satifsy one or more criteria could be calculated by
|
||||
|
||||
Reference in New Issue
Block a user