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

This commit is contained in:
sjplimp 2016-08-05 18:16:10 +00:00
parent 1780c86b86
commit 96a73d51cd
10 changed files with 89 additions and 87 deletions

View File

@ -39,9 +39,15 @@ subtracted to a group of atoms.
The compute takes three arguments which are IDs of other The compute takes three arguments which are IDs of other
:doc:`computes <compute>`. One calculates per-atom kinetic energy :doc:`computes <compute>`. One calculates per-atom kinetic energy
(\ *ke-ID*\ ), one calculates per-atom potential energy (\ *pe-ID)*\ , and the (\ *ke-ID*\ ), one calculates per-atom potential energy (\ *pe-ID)*\ , and the
third calcualtes per-atom stress (\ *stress-ID*\ ). These should be third calcualtes per-atom stress (\ *stress-ID*\ ).
defined for the same group used by compute heat/flux, though LAMMPS
does not check for this. .. note::
These other computes should provide values for all the atoms in
the group this compute specifies. That means the other computes could
use the same group as this compute, or they can just use group "all"
(or any group whose atoms are superset of the atoms in this compute's
group). LAMMPS does not check for this.
The Green-Kubo formulas relate the ensemble average of the The Green-Kubo formulas relate the ensemble average of the
auto-correlation of the heat flux J to the thermal conductivity kappa: auto-correlation of the heat flux J to the thermal conductivity kappa:

View File

@ -212,7 +212,7 @@ three variables which will store the x, y, or z coordinates of an atom
(one variable per coordinate). If used, these other variables must be (one variable per coordinate). If used, these other variables must be
:doc:`internal-style variables <variable>` defined in the input script; :doc:`internal-style variables <variable>` defined in the input script;
their initial numeric value can be anything. They must be their initial numeric value can be anything. They must be
internal-style variables, because this command updates their values internal-style variables, because this command resets their values
directly. The *set* keyword is used to identify the names of these directly. The *set* keyword is used to identify the names of these
other variables, one variable for the x-coordinate of a created atom, other variables, one variable for the x-coordinate of a created atom,
one for y, and one for z. one for y, and one for z.
@ -220,9 +220,7 @@ one for y, and one for z.
When an atom is created, its x,y,z coordinates become the values for When an atom is created, its x,y,z coordinates become the values for
any *set* variable that is defined. The *var* variable is then any *set* variable that is defined. The *var* variable is then
evaluated. If the returned value is 0.0, the atom is not created. If evaluated. If the returned value is 0.0, the atom is not created. If
it is non-zero, the atom is created. After all atoms are created, the it is non-zero, the atom is created.
formulas defined for all of the *set* variables are restored to their
original strings.
As an example, these commands can be used in a 2d simulation, to As an example, these commands can be used in a 2d simulation, to
create a sinusoidal surface. Note that the surface is "rough" due to create a sinusoidal surface. Note that the surface is "rough" due to

View File

@ -124,7 +124,7 @@ per-atom values from a file rather than from a formula. Variables of
style *python* can be hooked to Python functions using code you style *python* can be hooked to Python functions using code you
provide, so that the variable gets its value from the evaluation of provide, so that the variable gets its value from the evaluation of
the Python code. Variables of style *internal* are used by a few the Python code. Variables of style *internal* are used by a few
commands in LAMMPS which set their value directly. commands which set their value directly.
.. note:: .. note::
@ -149,29 +149,26 @@ simulation.
.. note:: .. note::
When the input script line is encountered that defines a When an input script line is encountered that defines a variable
variable of style *equal* or *vector* or *atom* or *python* that of style *equal* or *vector* or *atom* or *python* that contains a
contains a formula or Python code, the formula is NOT immediately formula or Python code, the formula is NOT immediately evaluated. It
evaluated. It will be evaluated every time when the variable is will be evaluated every time when the variable is **used** instead. If
**used** instead. If you simply want to evaluate a formula in place you you simply want to evaluate a formula in place you can use as
can use as so-called. See the section below about "Immediate so-called. See the section below about "Immediate Evaluation of
Evaluation of Variables" for more details on the topic. This is also Variables" for more details on the topic. This is also true of a
true of a *format* style variable since it evaluates another variable *format* style variable since it evaluates another variable when it is
when it is invoked. invoked.
.. note:: Variables of style *equal* and *vector* and *atom* can be used as
inputs to various other commands which evaluate their formulas as
Variables of style *equal* and *vector* and *atom* can be used needed, e.g. at different timesteps during a :doc:`run <run>`.
as inputs to various other LAMMPS commands which evaluate their
formulas as needed, e.g. at different timesteps during a
:doc:`run <run>`.
Variables of style *internal* can be used in place of an equal-style Variables of style *internal* can be used in place of an equal-style
variable, except by commands that set the value in the internal-style variable, except by commands that set the value stored by the
variable. Thus any command that states it can use an equal-style internal-style variable. Thus any command that states it can use an
variable as an argument, can also use an internal-style variable. equal-style variable as an argument, can also use an internal-style
This means that when the LAMMPS command evaluates the variable, it variable. This means that when the command evaluates the variable, it
will use the value set (internally) by another LAMMPS command. will use the value set (internally) by another command.
Variables of style *python* can be used in place of an equal-style Variables of style *python* can be used in place of an equal-style
variable so long as the associated Python function, as defined by the variable so long as the associated Python function, as defined by the
@ -194,7 +191,7 @@ executed.
script. script.
There are two exceptions to this rule. First, variables of style There are two exceptions to this rule. First, variables of style
*string*\ , *getenv*\ , *equal*\ , *vector*\ , *atom*\ , *internal*\ , and *string*\ , *getenv*\ , *internal*\ , *equal*\ , *vector*\ , *atom*\ , and
*python* ARE redefined each time the command is encountered. This *python* ARE redefined each time the command is encountered. This
allows these style of variables to be redefined multiple times in an allows these style of variables to be redefined multiple times in an
input script. In a loop, this means the formula associated with an input script. In a loop, this means the formula associated with an

View File

@ -158,9 +158,15 @@ subtracted to a group of atoms.</p>
<p>The compute takes three arguments which are IDs of other <p>The compute takes three arguments which are IDs of other
<a class="reference internal" href="compute.html"><span class="doc">computes</span></a>. One calculates per-atom kinetic energy <a class="reference internal" href="compute.html"><span class="doc">computes</span></a>. One calculates per-atom kinetic energy
(<em>ke-ID</em>), one calculates per-atom potential energy (<em>pe-ID)</em>, and the (<em>ke-ID</em>), one calculates per-atom potential energy (<em>pe-ID)</em>, and the
third calcualtes per-atom stress (<em>stress-ID</em>). These should be third calcualtes per-atom stress (<em>stress-ID</em>).</p>
defined for the same group used by compute heat/flux, though LAMMPS <div class="admonition note">
does not check for this.</p> <p class="first admonition-title">Note</p>
<p class="last">These other computes should provide values for all the atoms in
the group this compute specifies. That means the other computes could
use the same group as this compute, or they can just use group &#8220;all&#8221;
(or any group whose atoms are superset of the atoms in this compute&#8217;s
group). LAMMPS does not check for this.</p>
</div>
<p>The Green-Kubo formulas relate the ensemble average of the <p>The Green-Kubo formulas relate the ensemble average of the
auto-correlation of the heat flux J to the thermal conductivity kappa:</p> auto-correlation of the heat flux J to the thermal conductivity kappa:</p>
<img alt="_images/heat_flux_J.jpg" class="align-center" src="_images/heat_flux_J.jpg" /> <img alt="_images/heat_flux_J.jpg" class="align-center" src="_images/heat_flux_J.jpg" />

View File

@ -312,16 +312,14 @@ three variables which will store the x, y, or z coordinates of an atom
(one variable per coordinate). If used, these other variables must be (one variable per coordinate). If used, these other variables must be
<a class="reference internal" href="variable.html"><span class="doc">internal-style variables</span></a> defined in the input script; <a class="reference internal" href="variable.html"><span class="doc">internal-style variables</span></a> defined in the input script;
their initial numeric value can be anything. They must be their initial numeric value can be anything. They must be
internal-style variables, because this command updates their values internal-style variables, because this command resets their values
directly. The <em>set</em> keyword is used to identify the names of these directly. The <em>set</em> keyword is used to identify the names of these
other variables, one variable for the x-coordinate of a created atom, other variables, one variable for the x-coordinate of a created atom,
one for y, and one for z.</p> one for y, and one for z.</p>
<p>When an atom is created, its x,y,z coordinates become the values for <p>When an atom is created, its x,y,z coordinates become the values for
any <em>set</em> variable that is defined. The <em>var</em> variable is then any <em>set</em> variable that is defined. The <em>var</em> variable is then
evaluated. If the returned value is 0.0, the atom is not created. If evaluated. If the returned value is 0.0, the atom is not created. If
it is non-zero, the atom is created. After all atoms are created, the it is non-zero, the atom is created.</p>
formulas defined for all of the <em>set</em> variables are restored to their
original strings.</p>
<p>As an example, these commands can be used in a 2d simulation, to <p>As an example, these commands can be used in a 2d simulation, to
create a sinusoidal surface. Note that the surface is &#8220;rough&#8221; due to create a sinusoidal surface. Note that the surface is &#8220;rough&#8221; due to
individual lattice points being &#8220;above&#8221; or &#8220;below&#8221; the mathematical individual lattice points being &#8220;above&#8221; or &#8220;below&#8221; the mathematical

File diff suppressed because one or more lines are too long

View File

@ -242,7 +242,7 @@ per-atom values from a file rather than from a formula. Variables of
style <em>python</em> can be hooked to Python functions using code you style <em>python</em> can be hooked to Python functions using code you
provide, so that the variable gets its value from the evaluation of provide, so that the variable gets its value from the evaluation of
the Python code. Variables of style <em>internal</em> are used by a few the Python code. Variables of style <em>internal</em> are used by a few
commands in LAMMPS which set their value directly.</p> commands which set their value directly.</p>
<div class="admonition note"> <div class="admonition note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p class="last">As discussed in <a class="reference internal" href="Section_commands.html#cmd-2"><span class="std std-ref">Section 3.2</span></a> of the <p class="last">As discussed in <a class="reference internal" href="Section_commands.html#cmd-2"><span class="std std-ref">Section 3.2</span></a> of the
@ -265,29 +265,25 @@ different values when it is evaluated at different times during a
simulation.</p> simulation.</p>
<div class="admonition note"> <div class="admonition note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p class="last">When the input script line is encountered that defines a <p class="last">When an input script line is encountered that defines a variable
variable of style <em>equal</em> or <em>vector</em> or <em>atom</em> or <em>python</em> that of style <em>equal</em> or <em>vector</em> or <em>atom</em> or <em>python</em> that contains a
contains a formula or Python code, the formula is NOT immediately formula or Python code, the formula is NOT immediately evaluated. It
evaluated. It will be evaluated every time when the variable is will be evaluated every time when the variable is <strong>used</strong> instead. If
<strong>used</strong> instead. If you simply want to evaluate a formula in place you you simply want to evaluate a formula in place you can use as
can use as so-called. See the section below about &#8220;Immediate so-called. See the section below about &#8220;Immediate Evaluation of
Evaluation of Variables&#8221; for more details on the topic. This is also Variables&#8221; for more details on the topic. This is also true of a
true of a <em>format</em> style variable since it evaluates another variable <em>format</em> style variable since it evaluates another variable when it is
when it is invoked.</p> invoked.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Variables of style <em>equal</em> and <em>vector</em> and <em>atom</em> can be used
as inputs to various other LAMMPS commands which evaluate their
formulas as needed, e.g. at different timesteps during a
<a class="reference internal" href="run.html"><span class="doc">run</span></a>.</p>
</div> </div>
<p>Variables of style <em>equal</em> and <em>vector</em> and <em>atom</em> can be used as
inputs to various other commands which evaluate their formulas as
needed, e.g. at different timesteps during a <a class="reference internal" href="run.html"><span class="doc">run</span></a>.</p>
<p>Variables of style <em>internal</em> can be used in place of an equal-style <p>Variables of style <em>internal</em> can be used in place of an equal-style
variable, except by commands that set the value in the internal-style variable, except by commands that set the value stored by the
variable. Thus any command that states it can use an equal-style internal-style variable. Thus any command that states it can use an
variable as an argument, can also use an internal-style variable. equal-style variable as an argument, can also use an internal-style
This means that when the LAMMPS command evaluates the variable, it variable. This means that when the command evaluates the variable, it
will use the value set (internally) by another LAMMPS command.</p> will use the value set (internally) by another command.</p>
<p>Variables of style <em>python</em> can be used in place of an equal-style <p>Variables of style <em>python</em> can be used in place of an equal-style
variable so long as the associated Python function, as defined by the variable so long as the associated Python function, as defined by the
<a class="reference internal" href="python.html"><span class="doc">python</span></a> command, returns a numeric value. Thus any <a class="reference internal" href="python.html"><span class="doc">python</span></a> command, returns a numeric value. Thus any
@ -308,7 +304,7 @@ will override a corresponding index variable setting in the input
script.</p> script.</p>
</div> </div>
<p>There are two exceptions to this rule. First, variables of style <p>There are two exceptions to this rule. First, variables of style
<em>string</em>, <em>getenv</em>, <em>equal</em>, <em>vector</em>, <em>atom</em>, <em>internal</em>, and <em>string</em>, <em>getenv</em>, <em>internal</em>, <em>equal</em>, <em>vector</em>, <em>atom</em>, and
<em>python</em> ARE redefined each time the command is encountered. This <em>python</em> ARE redefined each time the command is encountered. This
allows these style of variables to be redefined multiple times in an allows these style of variables to be redefined multiple times in an
input script. In a loop, this means the formula associated with an input script. In a loop, this means the formula associated with an

View File

@ -38,9 +38,13 @@ subtracted to a group of atoms.
The compute takes three arguments which are IDs of other The compute takes three arguments which are IDs of other
"computes"_compute.html. One calculates per-atom kinetic energy "computes"_compute.html. One calculates per-atom kinetic energy
({ke-ID}), one calculates per-atom potential energy ({pe-ID)}, and the ({ke-ID}), one calculates per-atom potential energy ({pe-ID)}, and the
third calcualtes per-atom stress ({stress-ID}). These should be third calcualtes per-atom stress ({stress-ID}).
defined for the same group used by compute heat/flux, though LAMMPS
does not check for this. NOTE: These other computes should provide values for all the atoms in
the group this compute specifies. That means the other computes could
use the same group as this compute, or they can just use group "all"
(or any group whose atoms are superset of the atoms in this compute's
group). LAMMPS does not check for this.
The Green-Kubo formulas relate the ensemble average of the The Green-Kubo formulas relate the ensemble average of the
auto-correlation of the heat flux J to the thermal conductivity kappa: auto-correlation of the heat flux J to the thermal conductivity kappa:

View File

@ -197,7 +197,7 @@ three variables which will store the x, y, or z coordinates of an atom
(one variable per coordinate). If used, these other variables must be (one variable per coordinate). If used, these other variables must be
"internal-style variables"_variable.html defined in the input script; "internal-style variables"_variable.html defined in the input script;
their initial numeric value can be anything. They must be their initial numeric value can be anything. They must be
internal-style variables, because this command updates their values internal-style variables, because this command resets their values
directly. The {set} keyword is used to identify the names of these directly. The {set} keyword is used to identify the names of these
other variables, one variable for the x-coordinate of a created atom, other variables, one variable for the x-coordinate of a created atom,
one for y, and one for z. one for y, and one for z.
@ -205,9 +205,7 @@ one for y, and one for z.
When an atom is created, its x,y,z coordinates become the values for When an atom is created, its x,y,z coordinates become the values for
any {set} variable that is defined. The {var} variable is then any {set} variable that is defined. The {var} variable is then
evaluated. If the returned value is 0.0, the atom is not created. If evaluated. If the returned value is 0.0, the atom is not created. If
it is non-zero, the atom is created. After all atoms are created, the it is non-zero, the atom is created.
formulas defined for all of the {set} variables are restored to their
original strings.
As an example, these commands can be used in a 2d simulation, to As an example, these commands can be used in a 2d simulation, to
create a sinusoidal surface. Note that the surface is "rough" due to create a sinusoidal surface. Note that the surface is "rough" due to

View File

@ -122,7 +122,7 @@ per-atom values from a file rather than from a formula. Variables of
style {python} can be hooked to Python functions using code you style {python} can be hooked to Python functions using code you
provide, so that the variable gets its value from the evaluation of provide, so that the variable gets its value from the evaluation of
the Python code. Variables of style {internal} are used by a few the Python code. Variables of style {internal} are used by a few
commands in LAMMPS which set their value directly. commands which set their value directly.
NOTE: As discussed in "Section 3.2"_Section_commands.html#cmd_2 of the NOTE: As discussed in "Section 3.2"_Section_commands.html#cmd_2 of the
manual, an input script can use "immediate" variables, specified as manual, an input script can use "immediate" variables, specified as
@ -143,27 +143,26 @@ evaluation of the string. Note that the same string can generate
different values when it is evaluated at different times during a different values when it is evaluated at different times during a
simulation. simulation.
NOTE: When the input script line is encountered that defines a NOTE: When an input script line is encountered that defines a variable
variable of style {equal} or {vector} or {atom} or {python} that of style {equal} or {vector} or {atom} or {python} that contains a
contains a formula or Python code, the formula is NOT immediately formula or Python code, the formula is NOT immediately evaluated. It
evaluated. It will be evaluated every time when the variable is will be evaluated every time when the variable is [used] instead. If
[used] instead. If you simply want to evaluate a formula in place you you simply want to evaluate a formula in place you can use as
can use as so-called. See the section below about "Immediate so-called. See the section below about "Immediate Evaluation of
Evaluation of Variables" for more details on the topic. This is also Variables" for more details on the topic. This is also true of a
true of a {format} style variable since it evaluates another variable {format} style variable since it evaluates another variable when it is
when it is invoked. invoked.
NOTE: Variables of style {equal} and {vector} and {atom} can be used Variables of style {equal} and {vector} and {atom} can be used as
as inputs to various other LAMMPS commands which evaluate their inputs to various other commands which evaluate their formulas as
formulas as needed, e.g. at different timesteps during a needed, e.g. at different timesteps during a "run"_run.html.
"run"_run.html.
Variables of style {internal} can be used in place of an equal-style Variables of style {internal} can be used in place of an equal-style
variable, except by commands that set the value in the internal-style variable, except by commands that set the value stored by the
variable. Thus any command that states it can use an equal-style internal-style variable. Thus any command that states it can use an
variable as an argument, can also use an internal-style variable. equal-style variable as an argument, can also use an internal-style
This means that when the LAMMPS command evaluates the variable, it variable. This means that when the command evaluates the variable, it
will use the value set (internally) by another LAMMPS command. will use the value set (internally) by another command.
Variables of style {python} can be used in place of an equal-style Variables of style {python} can be used in place of an equal-style
variable so long as the associated Python function, as defined by the variable so long as the associated Python function, as defined by the
@ -184,7 +183,7 @@ 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
{string}, {getenv}, {equal}, {vector}, {atom}, {internal}, and {string}, {getenv}, {internal}, {equal}, {vector}, {atom}, and
{python} ARE redefined each time the command is encountered. This {python} ARE redefined each time the command is encountered. This
allows these style of variables to be redefined multiple times in an allows these style of variables to be redefined multiple times in an
input script. In a loop, this means the formula associated with an input script. In a loop, this means the formula associated with an