6.15.5. Fixes that write output files
Several fixes take various quantities as input and can write output
-files: fix ave/time, fix ave/spatial, fix ave/histo,
+files: fix ave/time, fix ave/chunk, fix ave/histo,
fix ave/correlate, and fix print.
The fix ave/time command enables direct output to
a file and/or time-averaging of global scalars or vectors. The user
@@ -1459,29 +1459,29 @@ or more scalar values, then the fix generate a global scalar or vector
of output. If the inputs are one or more vector values, then the fix
generates a global vector or array of output. The time-averaged
output of this fix can also be used as input to other output commands.
-
The fix ave/spatial command enables direct
-output to a file of spatial-averaged per-atom quantities like those
-output in dump files, within 1d layers of the simulation box. The
-per-atom quantities can be atom density (mass or number) or atom
-attributes such as position, velocity, force. They can also be
-per-atom quantities calculated by a compute, by a
-fix, or by an atom-style variable. The
-spatial-averaged output of this fix can also be used as input to other
-output commands.
+
The fix ave/chunk command enables direct output
+to a file of chunk-averaged per-atom quantities like those output in
+dump files. Chunks can represent spatial bins or other collections of
+atoms, e.g. individual molecules. The per-atom quantities can be atom
+density (mass or number) or atom attributes such as position,
+velocity, force. They can also be per-atom quantities calculated by a
+compute, by a fix, or by an atom-style
+variable. The chunk-averaged output of this fix can
+also be used as input to other output commands.
The fix ave/histo command enables direct output
to a file of histogrammed quantities, which can be global or per-atom
or local quantities. The histogram output of this fix can also be
used as input to other output commands.
The fix ave/correlate command enables direct
output to a file of time-correlated quantities, which can be global
-scalars. The correlation matrix output of this fix can also be used
-as input to other output commands.
+values. The correlation matrix output of this fix can also be used as
+input to other output commands.
The fix print command can generate a line of output
written to the screen and log file or to a separate file, periodically
during a running simulation. The line can contain one or more
-variable values for any style variable except the atom
-style). As explained above, variables themselves can contain
-references to global values generated by thermodynamic keywords, computes,
+variable values for any style variable except the
+vector or atom styles). As explained above, variables themselves can
+contain references to global values generated by thermodynamic keywords, computes,
fixes, or other variables, or to per-atom
values for a specific atom. Thus the fix print
command is a means to output a wide variety of quantities separate
@@ -1549,13 +1549,15 @@ describes them.
6.15.10. Variables that generate values to output
-
Every variables defined in an input script generates
-either a global scalar value or a per-atom vector (only atom-style
-variables) when it is accessed. The formulas used to define equal-
-and atom-style variables can contain references to the thermodynamic
-keywords and to global and per-atom data generated by computes, fixes,
-and other variables. The values generated by variables can be output
-using the other commands described in this section.
+
Variables defined in an input script can store one or
+more strings. But equal-style, vector-style, and atom-style or
+atomfile-style variables generate a global scalar value, global vector
+or values, or a per-atom vector, resepctively, when accessed. The
+formulas used to define these variables can contain references to the
+thermodynamic keywords and to global and per-atom data generated by
+computes, fixes, and other variables. The values generated by
+variables can be used as input to and thus output by the other
+commands described in this section.
6.15.11. Summary table of output options and data flow between commands
@@ -1574,115 +1576,89 @@ vector input could be a column of an array.
+
-
-
| Command |
Input |
Output |
- |
| thermo_style custom |
global scalars |
screen, log file |
- |
| dump custom |
per-atom vectors |
dump file |
- |
| dump local |
local vectors |
dump file |
- |
| fix print |
global scalar from variable |
screen, file |
- |
| print |
global scalar from variable |
screen |
- |
| computes |
N/A |
global/per-atom/local scalar/vector/array |
- |
| fixes |
N/A |
global/per-atom/local scalar/vector/array |
- |
| variables |
-global scalars, per-atom vectors |
-global scalar, per-atom vector |
- |
+global scalars and vectors, per-atom vectors |
+global scalar and vector, per-atom vector |
| compute reduce |
per-atom/local vectors |
global scalar/vector |
- |
| compute slice |
global vectors/arrays |
global vector/array |
- |
| compute property/atom |
per-atom vectors |
per-atom vector/array |
- |
| compute property/local |
local vectors |
local vector/array |
- |
| fix vector |
global scalars |
global vector |
- |
| fix ave/atom |
per-atom vectors |
per-atom vector/array |
- |
| fix ave/time |
global scalars/vectors |
global scalar/vector/array, file |
- |
-| fix ave/spatial |
+
| fix ave/chunk |
per-atom vectors |
global array, file |
- |
| fix ave/histo |
global/per-atom/local scalars and vectors |
global array, file |
- |
| fix ave/correlate |
global scalars |
global array, file |
- |
| fix store/state |
per-atom vectors |
per-atom vector/array |
- |
-
-| |
- |
- |
- |
diff --git a/doc/Section_howto.txt b/doc/Section_howto.txt
index b9b68c876b..8049d56484 100644
--- a/doc/Section_howto.txt
+++ b/doc/Section_howto.txt
@@ -1281,7 +1281,7 @@ per-atom values and are written at a specified frequency. :l
Certain fixes can output user-specified quantities to files: "fix
ave/time"_fix_ave_time.html for time averaging, "fix
-ave/spatial"_fix_ave_spatial.html for spatial averaging, and "fix
+ave/chunk"_fix_ave_chunk.html for spatial or other averaging, and "fix
print"_fix_print.html for single-line output of
"variables"_variable.html. Fix print can also output to the
screen. :l
@@ -1401,7 +1401,7 @@ Fixes that write output files :h5,link(fixoutput)
Several fixes take various quantities as input and can write output
files: "fix ave/time"_fix_ave_time.html, "fix
-ave/spatial"_fix_ave_spatial.html, "fix ave/histo"_fix_ave_histo.html,
+ave/chunk"_fix_ave_chunk.html, "fix ave/histo"_fix_ave_histo.html,
"fix ave/correlate"_fix_ave_correlate.html, and "fix
print"_fix_print.html.
@@ -1419,15 +1419,15 @@ of output. If the inputs are one or more vector values, then the fix
generates a global vector or array of output. The time-averaged
output of this fix can also be used as input to other output commands.
-The "fix ave/spatial"_fix_ave_spatial.html command enables direct
-output to a file of spatial-averaged per-atom quantities like those
-output in dump files, within 1d layers of the simulation box. The
-per-atom quantities can be atom density (mass or number) or atom
-attributes such as position, velocity, force. They can also be
-per-atom quantities calculated by a "compute"_compute.html, by a
-"fix"_fix.html, or by an atom-style "variable"_variable.html. The
-spatial-averaged output of this fix can also be used as input to other
-output commands.
+The "fix ave/chunk"_fix_ave_chunk.html command enables direct output
+to a file of chunk-averaged per-atom quantities like those output in
+dump files. Chunks can represent spatial bins or other collections of
+atoms, e.g. individual molecules. The per-atom quantities can be atom
+density (mass or number) or atom attributes such as position,
+velocity, force. They can also be per-atom quantities calculated by a
+"compute"_compute.html, by a "fix"_fix.html, or by an atom-style
+"variable"_variable.html. The chunk-averaged output of this fix can
+also be used as input to other output commands.
The "fix ave/histo"_fix_ave_histo.html command enables direct output
to a file of histogrammed quantities, which can be global or per-atom
@@ -1436,15 +1436,15 @@ used as input to other output commands.
The "fix ave/correlate"_fix_ave_correlate.html command enables direct
output to a file of time-correlated quantities, which can be global
-scalars. The correlation matrix output of this fix can also be used
-as input to other output commands.
+values. The correlation matrix output of this fix can also be used as
+input to other output commands.
The "fix print"_fix_print.html command can generate a line of output
written to the screen and log file or to a separate file, periodically
during a running simulation. The line can contain one or more
-"variable"_variable.html values for any style variable except the atom
-style). As explained above, variables themselves can contain
-references to global values generated by "thermodynamic
+"variable"_variable.html values for any style variable except the
+vector or atom styles). As explained above, variables themselves can
+contain references to global values generated by "thermodynamic
keywords"_thermo_style.html, "computes"_compute.html,
"fixes"_fix.html, or other "variables"_variable.html, or to per-atom
values for a specific atom. Thus the "fix print"_fix_print.html
@@ -1520,13 +1520,15 @@ describes them.
Variables that generate values to output :h5,link(variable)
-Every "variables"_variable.html defined in an input script generates
-either a global scalar value or a per-atom vector (only atom-style
-variables) when it is accessed. The formulas used to define equal-
-and atom-style variables can contain references to the thermodynamic
-keywords and to global and per-atom data generated by computes, fixes,
-and other variables. The values generated by variables can be output
-using the other commands described in this section.
+"Variables"_variable.html defined in an input script can store one or
+more strings. But equal-style, vector-style, and atom-style or
+atomfile-style variables generate a global scalar value, global vector
+or values, or a per-atom vector, resepctively, when accessed. The
+formulas used to define these variables can contain references to the
+thermodynamic keywords and to global and per-atom data generated by
+computes, fixes, and other variables. The values generated by
+variables can be used as input to and thus output by the other
+commands described in this section.
Summary table of output options and data flow between commands :h5,link(table)
@@ -1552,7 +1554,7 @@ Command: Input: Output:
"print"_print.html: global scalar from variable: screen:
"computes"_compute.html: N/A: global/per-atom/local scalar/vector/array:
"fixes"_fix.html: N/A: global/per-atom/local scalar/vector/array:
-"variables"_variable.html: global scalars, per-atom vectors: global scalar, per-atom vector:
+"variables"_variable.html: global scalars and vectors, per-atom vectors: global scalar and vector, per-atom vector:
"compute reduce"_compute_reduce.html: per-atom/local vectors: global scalar/vector:
"compute slice"_compute_slice.html: global vectors/arrays: global vector/array:
"compute property/atom"_compute_property_atom.html: per-atom vectors: per-atom vector/array:
@@ -1560,11 +1562,10 @@ Command: Input: Output:
"fix vector"_fix_vector.html: global scalars: global vector:
"fix ave/atom"_fix_ave_atom.html: per-atom vectors: per-atom vector/array:
"fix ave/time"_fix_ave_time.html: global scalars/vectors: global scalar/vector/array, file:
-"fix ave/spatial"_fix_ave_spatial.html: per-atom vectors: global array, file:
+"fix ave/chunk"_fix_ave_chunk.html: per-atom vectors: global array, file:
"fix ave/histo"_fix_ave_histo.html: global/per-atom/local scalars and vectors: global array, file:
"fix ave/correlate"_fix_ave_correlate.html: global scalars: global array, file:
-"fix store/state"_fix_store_state.html: per-atom vectors: per-atom vector/array:
-:tb(s=:)
+"fix store/state"_fix_store_state.html: per-atom vectors: per-atom vector/array :tb(c=3,s=:)
:line
diff --git a/doc/_images/pair_morse_smooth_linear.jpg b/doc/_images/pair_morse_smooth_linear.jpg
new file mode 100644
index 0000000000..b951023609
Binary files /dev/null and b/doc/_images/pair_morse_smooth_linear.jpg differ
diff --git a/doc/_sources/Manual.txt b/doc/_sources/Manual.txt
index 63ae9dbdc0..20bf18c041 100644
--- a/doc/_sources/Manual.txt
+++ b/doc/_sources/Manual.txt
@@ -5,8 +5,8 @@
LAMMPS Documentation
====================
-25 Feb 2016 version
--------------------
+1 Mar 2016 version
+------------------
Version info:
-------------
diff --git a/doc/_sources/Section_commands.txt b/doc/_sources/Section_commands.txt
index 5102a45d0c..f65a267094 100644
--- a/doc/_sources/Section_commands.txt
+++ b/doc/_sources/Section_commands.txt
@@ -644,31 +644,31 @@ KOKKOS, o = USER-OMP, t = OPT.
These are additional pair styles in USER packages, which can be used
if :ref:`LAMMPS is built with the appropriate package
`.
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`awpmd/cut ` | :doc:`buck/mdf ` | :doc:`coul/cut/soft (o) ` | :doc:`coul/diel (o) ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`coul/long/soft (o) ` | :doc:`dpd/conservative ` | :doc:`dpd/fdt ` | :doc:`dpd/fdt/energy ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`eam/cd (o) ` | :doc:`edip (o) ` | :doc:`eff/cut ` | :doc:`gauss/cut ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`lennard/mdf ` | :doc:`list ` | :doc:`lj/charmm/coul/long/soft (o) ` | :doc:`lj/cut/coul/cut/soft (o) ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`lj/cut/coul/long/soft (o) ` | :doc:`lj/cut/dipole/sf (go) ` | :doc:`lj/cut/soft (o) ` | :doc:`lj/cut/tip4p/long/soft (o) ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`lj/mdf ` | :doc:`lj/sdk (gko) ` | :doc:`lj/sdk/coul/long (go) ` | :doc:`lj/sdk/coul/msm (o) ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`lj/sf (o) ` | :doc:`meam/spline ` | :doc:`meam/sw/spline ` | :doc:`mgpt ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`quip ` | :doc:`reax/c ` | :doc:`smd/hertz ` | :doc:`smd/tlsph ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`smd/triangulated/surface ` | :doc:`smd/ulsph ` | :doc:`smtbq ` | :doc:`sph/heatconduction ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`sph/idealgas ` | :doc:`sph/lj ` | :doc:`sph/rhosum ` | :doc:`sph/taitwater ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`sph/taitwater/morris ` | :doc:`srp ` | :doc:`tersoff/table (o) ` | :doc:`thole ` |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
-| :doc:`tip4p/long/soft (o) ` | | | |
-+-----------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`awpmd/cut ` | :doc:`buck/mdf ` | :doc:`coul/cut/soft (o) ` | :doc:`coul/diel (o) ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`coul/long/soft (o) ` | :doc:`dpd/conservative ` | :doc:`dpd/fdt ` | :doc:`dpd/fdt/energy ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`eam/cd (o) ` | :doc:`edip (o) ` | :doc:`eff/cut ` | :doc:`gauss/cut ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`lennard/mdf ` | :doc:`list ` | :doc:`lj/charmm/coul/long/soft (o) ` | :doc:`lj/cut/coul/cut/soft (o) ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`lj/cut/coul/long/soft (o) ` | :doc:`lj/cut/dipole/sf (go) ` | :doc:`lj/cut/soft (o) ` | :doc:`lj/cut/tip4p/long/soft (o) ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`lj/mdf ` | :doc:`lj/sdk (gko) ` | :doc:`lj/sdk/coul/long (go) ` | :doc:`lj/sdk/coul/msm (o) ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`lj/sf (o) ` | :doc:`meam/spline ` | :doc:`meam/sw/spline ` | :doc:`mgpt ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`morse/smooth/linear ` | :doc:`quip ` | :doc:`reax/c ` | :doc:`smd/hertz ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`smd/tlsph ` | :doc:`smd/triangulated/surface ` | :doc:`smd/ulsph ` | :doc:`smtbq ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`sph/heatconduction ` | :doc:`sph/idealgas ` | :doc:`sph/lj ` | :doc:`sph/rhosum ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`sph/taitwater ` | :doc:`sph/taitwater/morris ` | :doc:`srp ` | :doc:`tersoff/table (o) ` |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
+| :doc:`thole ` | :doc:`tip4p/long/soft (o) ` | | |
++-----------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------+
----------
diff --git a/doc/_sources/Section_howto.txt b/doc/_sources/Section_howto.txt
index 283f131d3a..407755631e 100644
--- a/doc/_sources/Section_howto.txt
+++ b/doc/_sources/Section_howto.txt
@@ -1405,7 +1405,7 @@ There are four basic kinds of LAMMPS output:
of quantities printed every few timesteps to the screen and logfile.
* :doc:`Dump files `, which contain snapshots of atoms and various
per-atom values and are written at a specified frequency.
-* Certain fixes can output user-specified quantities to files: :doc:`fix ave/time ` for time averaging, :doc:`fix ave/spatial ` for spatial averaging, and :doc:`fix print ` for single-line output of
+* Certain fixes can output user-specified quantities to files: :doc:`fix ave/time ` for time averaging, :doc:`fix ave/chunk ` for spatial or other averaging, and :doc:`fix print ` for single-line output of
:doc:`variables `. Fix print can also output to the
screen.
* :doc:`Restart files `.
@@ -1538,7 +1538,7 @@ Fixes that write output files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Several fixes take various quantities as input and can write output
-files: :doc:`fix ave/time `, :doc:`fix ave/spatial `, :doc:`fix ave/histo `,
+files: :doc:`fix ave/time `, :doc:`fix ave/chunk `, :doc:`fix ave/histo `,
:doc:`fix ave/correlate `, and :doc:`fix print `.
The :doc:`fix ave/time ` command enables direct output to
@@ -1555,15 +1555,15 @@ of output. If the inputs are one or more vector values, then the fix
generates a global vector or array of output. The time-averaged
output of this fix can also be used as input to other output commands.
-The :doc:`fix ave/spatial ` command enables direct
-output to a file of spatial-averaged per-atom quantities like those
-output in dump files, within 1d layers of the simulation box. The
-per-atom quantities can be atom density (mass or number) or atom
-attributes such as position, velocity, force. They can also be
-per-atom quantities calculated by a :doc:`compute `, by a
-:doc:`fix `, or by an atom-style :doc:`variable `. The
-spatial-averaged output of this fix can also be used as input to other
-output commands.
+The :doc:`fix ave/chunk ` command enables direct output
+to a file of chunk-averaged per-atom quantities like those output in
+dump files. Chunks can represent spatial bins or other collections of
+atoms, e.g. individual molecules. The per-atom quantities can be atom
+density (mass or number) or atom attributes such as position,
+velocity, force. They can also be per-atom quantities calculated by a
+:doc:`compute `, by a :doc:`fix `, or by an atom-style
+:doc:`variable `. The chunk-averaged output of this fix can
+also be used as input to other output commands.
The :doc:`fix ave/histo ` command enables direct output
to a file of histogrammed quantities, which can be global or per-atom
@@ -1572,15 +1572,15 @@ used as input to other output commands.
The :doc:`fix ave/correlate ` command enables direct
output to a file of time-correlated quantities, which can be global
-scalars. The correlation matrix output of this fix can also be used
-as input to other output commands.
+values. The correlation matrix output of this fix can also be used as
+input to other output commands.
The :doc:`fix print ` command can generate a line of output
written to the screen and log file or to a separate file, periodically
during a running simulation. The line can contain one or more
-:doc:`variable ` values for any style variable except the atom
-style). As explained above, variables themselves can contain
-references to global values generated by :doc:`thermodynamic keywords `, :doc:`computes `,
+:doc:`variable ` values for any style variable except the
+vector or atom styles). As explained above, variables themselves can
+contain references to global values generated by :doc:`thermodynamic keywords `, :doc:`computes `,
:doc:`fixes `, or other :doc:`variables `, or to per-atom
values for a specific atom. Thus the :doc:`fix print `
command is a means to output a wide variety of quantities separate
@@ -1668,13 +1668,15 @@ describes them.
Variables that generate values to output
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Every :doc:`variables ` defined in an input script generates
-either a global scalar value or a per-atom vector (only atom-style
-variables) when it is accessed. The formulas used to define equal-
-and atom-style variables can contain references to the thermodynamic
-keywords and to global and per-atom data generated by computes, fixes,
-and other variables. The values generated by variables can be output
-using the other commands described in this section.
+:doc:`Variables ` defined in an input script can store one or
+more strings. But equal-style, vector-style, and atom-style or
+atomfile-style variables generate a global scalar value, global vector
+or values, or a per-atom vector, resepctively, when accessed. The
+formulas used to define these variables can contain references to the
+thermodynamic keywords and to global and per-atom data generated by
+computes, fixes, and other variables. The values generated by
+variables can be used as input to and thus output by the other
+commands described in this section.
.. _table:
@@ -1695,49 +1697,47 @@ Also note that, as described above, when a command takes a scalar as
input, that could be an element of a vector or array. Likewise a
vector input could be a column of an array.
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| Command | Input | Output | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`thermo_style custom ` | global scalars | screen, log file | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`dump custom ` | per-atom vectors | dump file | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`dump local ` | local vectors | dump file | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`fix print ` | global scalar from variable | screen, file | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`print ` | global scalar from variable | screen | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`computes ` | N/A | global/per-atom/local scalar/vector/array | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`fixes ` | N/A | global/per-atom/local scalar/vector/array | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`variables ` | global scalars, per-atom vectors | global scalar, per-atom vector | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`compute reduce ` | per-atom/local vectors | global scalar/vector | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`compute slice ` | global vectors/arrays | global vector/array | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`compute property/atom ` | per-atom vectors | per-atom vector/array | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`compute property/local ` | local vectors | local vector/array | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`fix vector ` | global scalars | global vector | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`fix ave/atom ` | per-atom vectors | per-atom vector/array | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`fix ave/time ` | global scalars/vectors | global scalar/vector/array, file | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`fix ave/spatial ` | per-atom vectors | global array, file | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`fix ave/histo ` | global/per-atom/local scalars and vectors | global array, file | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`fix ave/correlate ` | global scalars | global array, file | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| :doc:`fix store/state ` | per-atom vectors | per-atom vector/array | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
-| | | | |
-+--------------------------------------------------------+-------------------------------------------+-------------------------------------------+--+
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| Command | Input | Output |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`thermo_style custom ` | global scalars | screen, log file |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`dump custom ` | per-atom vectors | dump file |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`dump local ` | local vectors | dump file |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`fix print ` | global scalar from variable | screen, file |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`print ` | global scalar from variable | screen |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`computes ` | N/A | global/per-atom/local scalar/vector/array |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`fixes ` | N/A | global/per-atom/local scalar/vector/array |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`variables ` | global scalars and vectors, per-atom vectors | global scalar and vector, per-atom vector |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`compute reduce ` | per-atom/local vectors | global scalar/vector |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`compute slice ` | global vectors/arrays | global vector/array |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`compute property/atom ` | per-atom vectors | per-atom vector/array |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`compute property/local ` | local vectors | local vector/array |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`fix vector ` | global scalars | global vector |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`fix ave/atom ` | per-atom vectors | per-atom vector/array |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`fix ave/time ` | global scalars/vectors | global scalar/vector/array, file |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`fix ave/chunk ` | per-atom vectors | global array, file |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`fix ave/histo ` | global/per-atom/local scalars and vectors | global array, file |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`fix ave/correlate ` | global scalars | global array, file |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
+| :doc:`fix store/state ` | per-atom vectors | per-atom vector/array |
++--------------------------------------------------------+----------------------------------------------+-------------------------------------------+
----------
diff --git a/doc/_sources/compute_slice.txt b/doc/_sources/compute_slice.txt
index c4fe7b4708..2aa93bf0a5 100644
--- a/doc/_sources/compute_slice.txt
+++ b/doc/_sources/compute_slice.txt
@@ -22,6 +22,7 @@ Syntax
c_ID[I] = Ith column of global array calculated by a compute with ID
f_ID = global vector calculated by a fix with ID
f_ID[I] = Ith column of global array calculated by a fix with ID
+ v_name = vector calculated by an vector-style variable with name
@@ -31,7 +32,7 @@ Examples
.. parsed-literal::
compute 1 all slice 1 100 10 c_msdmol[4]
- compute 1 all slice 301 400 1 c_msdmol[4]
+ compute 1 all slice 301 400 1 c_msdmol[4] v_myVec
Description
"""""""""""
@@ -39,9 +40,9 @@ Description
Define a calculation that "slices" one or more vector inputs into
smaller vectors, one per listed input. The inputs can be global
quantities; they cannot be per-atom or local quantities.
-:doc:`Computes ` and :doc:`fixes ` may generate any of the
-three kinds of quantities. :doc:`Variables ` do not generate
-global vectors. The group specified with this command is ignored.
+:doc:`Computes ` and :doc:`fixes ` and vector-style
+:doc:`variables ` can generate such global quantities. The
+group specified with this command is ignored.
The values extracted from the input vector(s) are determined by the
*Nstart*, *Nstop*, and *Nskip* parameters. The elements of an input
@@ -73,6 +74,15 @@ appended, the vector calculated by the fix is used. If a bracketed
integer is appended, the Ith column of the array calculated by the fix
is used. Users can also write code for their own fix style and :doc:`add them to LAMMPS `.
+If an input value begins with "v_", a variable name must follow which
+has been previously defined in the input script. Only vector-style
+variables can be referenced. See the :doc:`variable ` command
+for details. Note that variables of style *vector* define a formula
+which can reference individual atom properties or thermodynamic
+keywords, or they can invoke other computes, fixes, or variables when
+they are evaluated, so this is a very general means of specifying
+quantities to slice.
+
If a single input is specified this compute produces a global vector,
even if the length of the vector is 1. If multiple inputs are
specified, then a global array of values is produced, with the number
@@ -93,15 +103,16 @@ array values from a compute as input. See :ref:`this section ` for an
options.
The vector or array values calculated by this compute are simply
-copies of values generated by computes or fixes that are input vectors
-to this compute. If there is a single input vector of intensive
-and/or extensive values, then each value in the vector of values
-calculated by this compute will be "intensive" or "extensive",
+copies of values generated by computes or fixes or variables that are
+input vectors to this compute. If there is a single input vector of
+intensive and/or extensive values, then each value in the vector of
+values calculated by this compute will be "intensive" or "extensive",
depending on the corresponding input value. If there are multiple
input vectors, and all the values in them are intensive, then the
array values calculated by this compute are "intensive". If there are
multiple input vectors, and any value in them is extensive, then the
-array values calculated by this compute are "extensive".
+array values calculated by this compute are "extensive". Values
+produced by a variable are treated as intensive.
The vector or array values will be in whatever :doc:`units ` the
input quantities are in.
diff --git a/doc/_sources/fix_ave_correlate.txt b/doc/_sources/fix_ave_correlate.txt
index 53e74246a7..08cc696e7b 100644
--- a/doc/_sources/fix_ave_correlate.txt
+++ b/doc/_sources/fix_ave_correlate.txt
@@ -24,6 +24,7 @@ Syntax
f_ID = global scalar calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID
v_name = global value calculated by an equal-style variable with name
+ v_name[I] = Ith component of a vector-style variable with name
* zero or more keyword/arg pairs may be appended
* keyword = *type* or *ave* or *start* or *prefactor* or *file* or *overwrite* or *title1* or *title2* or *title3*
@@ -82,21 +83,22 @@ specified values may represent calculations performed by computes and
fixes which store their own "group" definitions.
Each listed value can be the result of a :doc:`compute ` or
-:doc:`fix ` or the evaluation of an equal-style
+:doc:`fix ` or the evaluation of an equal-style or vector-style
:doc:`variable `. In each case, the compute, fix, or variable
must produce a global quantity, not a per-atom or local quantity. If
you wish to spatial- or time-average or histogram per-atom quantities
from a compute, fix, or variable, then see the :doc:`fix ave/spatial `, :doc:`fix ave/atom `,
-or :doc:`fix ave/histo ` commands. If you wish to sum a
-per-atom quantity into a single global quantity, see the :doc:`compute reduce ` command.
+or :doc:`fix ave/histo ` commands. If you wish to
+convert a per-atom quantity into a single global value, see the
+:doc:`compute reduce ` command.
:doc:`Computes ` that produce global quantities are those which
do not have the word *atom* in their style name. Only a few
:doc:`fixes ` produce global quantities. See the doc pages for
individual fixes for info on which ones produce such values.
-:doc:`Variables ` of style *equal* are the only ones that can
-be used with this fix. Variables of style *atom* cannot be used,
-since they produce per-atom values.
+:doc:`Variables ` of style *equal* and *vector* are the only
+ones that can be used with this fix. Variables of style *atom* cannot
+be used, since they produce per-atom values.
The input values must either be all scalars. What kinds of
correlations between input values are calculated is determined by the
@@ -172,9 +174,11 @@ which must be compatible with *Nevery*, else an error will result.
Users can also write code for their own fix styles and :doc:`add them to LAMMPS `.
If a value begins with "v_", a variable name must follow which has
-been previously defined in the input script. Only equal-style
-variables can be referenced. See the :doc:`variable ` command
-for details. Note that variables of style *equal* define a formula
+been previously defined in the input script. Only equal-style or
+vector-style variables can be referenced; the latter requires a
+bracketed term to specify the Ith element of the vector calculated by
+the variable. See the :doc:`variable ` command for details.
+Note that variables of style *equal* or *vector* define a formula
which can reference individual atom properties or thermodynamic
keywords, or they can invoke other computes, fixes, or variables when
they are evaluated, so this is a very general means of specifying
@@ -320,9 +324,9 @@ above.
* For *type* = *full*, the Npair = N^2 columns are ordered: C11, C12,
..., C1N, C21, C22, ..., C2N, C31, ..., C3N, ..., CN1, ..., CNN-1,
CNN.
-The array values calculated by this fix are treated as "intensive".
-If you need to divide them by the number of atoms, you must do this in
-a later processing step, e.g. when using them in a
+The array values calculated by this fix are treated as intensive. If
+you need to divide them by the number of atoms, you must do this in a
+later processing step, e.g. when using them in a
:doc:`variable `.
No parameter of this fix can be used with the *start/stop* keywords of
diff --git a/doc/_sources/fix_ave_histo.txt b/doc/_sources/fix_ave_histo.txt
index 9851fe22a2..40c93e21dc 100644
--- a/doc/_sources/fix_ave_histo.txt
+++ b/doc/_sources/fix_ave_histo.txt
@@ -29,7 +29,8 @@ Syntax
c_ID[I] = Ith component of vector or Ith column of array calculated by a compute with ID
f_ID = scalar or vector calculated by a fix with ID
f_ID[I] = Ith component of vector or Ith column of array calculated by a fix with ID
- v_name = value(s) calculated by an equal-style or atom-style variable with name
+ v_name = value(s) calculated by an equal-style or vector-style or atom-style variable with name
+ v_name[I] = value calculated by a vector-style variable with name
* zero or more keyword/arg pairs may be appended
* keyword = *mode* or *file* or *ave* or *start* or *beyond* or *overwrite* or *title1* or *title2* or *title3*
@@ -93,12 +94,13 @@ different ways; see the discussion of the *beyond* keyword below.
Each input value can be an atom attribute (position, velocity, force
component) or can be the result of a :doc:`compute ` or
-:doc:`fix ` or the evaluation of an equal-style or atom-style
-:doc:`variable `. The set of input values can be either all
-global, all per-atom, or all local quantities. Inputs of different
-kinds (e.g. global and per-atom) cannot be mixed. Atom attributes are
-per-atom vector values. See the doc page for individual "compute" and
-"fix" commands to see what kinds of quantities they generate.
+:doc:`fix ` or the evaluation of an equal-style or vector-style or
+atom-style :doc:`variable `. The set of input values can be
+either all global, all per-atom, or all local quantities. Inputs of
+different kinds (e.g. global and per-atom) cannot be mixed. Atom
+attributes are per-atom vector values. See the doc page for
+individual "compute" and "fix" commands to see what kinds of
+quantities they generate.
The input values must either be all scalars or all vectors (or
arrays), depending on the setting of the *mode* keyword.
@@ -195,10 +197,15 @@ Users can also write code for their own fix styles and :doc:`add them to LAMMPS
If a value begins with "v_", a variable name must follow which has
been previously defined in the input script. If *mode* = scalar, then
-only equal-style variables can be used, which produce a global value.
-If *mode* = vector, then only atom-style variables can be used, which
-produce a per-atom vector. See the :doc:`variable ` command
-for details. Note that variables of style *equal* and *atom* define a
+only equal-style or vector-style variables can be used, which both
+produce global values. In this mode, a vector-style variable requires
+a bracketed term to specify the Ith element of the vector calculated
+by the variable. If *mode* = vector, then only vector-style or
+atom-style variables can be used, which produce a global or per-atom
+vector respectively. The vector-style variable must be used without a
+bracketed term. See the :doc:`variable ` command for details.
+
+Note that variables of style *equal*, *vector*, and *atom* define a
formula which can reference individual atom properties or
thermodynamic keywords, or they can invoke other computes, fixes, or
variables when they are evaluated, so this is a very general means of
@@ -325,7 +332,7 @@ divided by the total count (not including missing counts), so that the
values in the 3rd column sum to 1.0.
The vector and array values calculated by this fix are all treated as
-"intensive". If this is not the case, e.g. due to histogramming
+intensive. If this is not the case, e.g. due to histogramming
per-atom input values, then you will need to account for that when
interpreting the values produced by this fix.
diff --git a/doc/_sources/fix_ave_time.txt b/doc/_sources/fix_ave_time.txt
index db8e9074cb..b69d17597c 100644
--- a/doc/_sources/fix_ave_time.txt
+++ b/doc/_sources/fix_ave_time.txt
@@ -23,7 +23,8 @@ Syntax
c_ID[I] = Ith component of global vector or Ith column of global array calculated by a compute with ID
f_ID = global scalar, vector, or array calculated by a fix with ID
f_ID[I] = Ith component of global vector or Ith column of global array calculated by a fix with ID
- v_name = global value calculated by an equal-style variable with name
+ v_name = value(s) calculated by an equal-style or vector-style variable with name
+ v_name[I] = value calculated by a vector-style variable with name
* zero or more keyword/arg pairs may be appended
* keyword = *mode* or *file* or *ave* or *start* or *off* or *overwrite* or *title1* or *title2* or *title3*
@@ -80,7 +81,7 @@ specified values may represent calculations performed by computes and
fixes which store their own "group" definitions.
Each listed value can be the result of a :doc:`compute ` or
-:doc:`fix ` or the evaluation of an equal-style
+:doc:`fix ` or the evaluation of an equal-style or vector-style
:doc:`variable `. In each case, the compute, fix, or variable
must produce a global quantity, not a per-atom or local quantity. If
you wish to spatial- or time-average or histogram per-atom quantities
@@ -92,9 +93,9 @@ per-atom quantity into a single global quantity, see the :doc:`compute reduce ` produce global quantities. See the doc pages for
individual fixes for info on which ones produce such values.
-:doc:`Variables ` of style *equal* are the only ones that can
-be used with this fix. Variables of style *atom* cannot be used,
-since they produce per-atom values.
+:doc:`Variables ` of style *equal* and *vector* are the only
+ones that can be used with this fix. Variables of style *atom* cannot
+be used, since they produce per-atom values.
The input values must either be all scalars or all vectors (or
arrays), depending on the setting of the *mode* keyword. In both
@@ -176,14 +177,19 @@ which must be compatible with *Nevery*, else an error will result.
Users can also write code for their own fix styles and :doc:`add them to LAMMPS `.
If a value begins with "v_", a variable name must follow which has
-been previously defined in the input script. Variables can only be
-used as input for *mode* = scalar. Only equal-style variables can be
-referenced. See the :doc:`variable ` command for details.
-Note that variables of style *equal* define a formula which can
-reference individual atom properties or thermodynamic keywords, or
-they can invoke other computes, fixes, or variables when they are
-evaluated, so this is a very general means of specifying quantities to
-time average.
+been previously defined in the input script. If *mode* = scalar, then
+only equal-style or vector-style variables can be used, which both
+produce global values. In this mode, a vector-style variable requires
+a bracketed term to specify the Ith element of the vector calculated
+by the variable. If *mode* = vector, then only a vector-style
+variable can be used, without a bracketed term. See the
+:doc:`variable ` command for details.
+
+Note that variables of style *equal* and *vector* define a formula
+which can reference individual atom properties or thermodynamic
+keywords, or they can invoke other computes, fixes, or variables when
+they are evaluated, so this is a very general means of specifying
+quantities to time average.
----------
diff --git a/doc/_sources/fix_vector.txt b/doc/_sources/fix_vector.txt
index 51c4d51798..697007d21d 100644
--- a/doc/_sources/fix_vector.txt
+++ b/doc/_sources/fix_vector.txt
@@ -21,7 +21,8 @@ Syntax
c_ID[I] = Ith component of global vector calculated by a compute with ID
f_ID = global scalar calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID
- v_name = global value calculated by an equal-style variable with name
+ v_name = value calculated by an equal-style variable with name
+ v_name[I] = Ith component of vector-style variable with name
@@ -60,18 +61,18 @@ specified values may represent calculations performed by computes and
fixes which store their own "group" definitions.
Each listed value can be the result of a :doc:`compute ` or
-:doc:`fix ` or the evaluation of an equal-style
+:doc:`fix ` or the evaluation of an equal-style or vector-style
:doc:`variable `. In each case, the compute, fix, or variable
-must produce a global quantity, not a per-atom or local quantity.
-And the global quantity must be a scalar, not a vector or array.
+must produce a global quantity, not a per-atom or local quantity. And
+the global quantity must be a scalar, not a vector or array.
:doc:`Computes ` that produce global quantities are those which
do not have the word *atom* in their style name. Only a few
:doc:`fixes ` produce global quantities. See the doc pages for
individual fixes for info on which ones produce such values.
-:doc:`Variables ` of style *equal* are the only ones that can
-be used with this fix. Variables of style *atom* cannot be used,
-since they produce per-atom values.
+:doc:`Variables ` of style *equal* or *vector* are the only
+ones that can be used with this fix. Variables of style *atom* cannot
+be used, since they produce per-atom values.
The *Nevery* argument specifies on what timesteps the input values
will be used in order to be stored. Only timesteps that are a
@@ -113,9 +114,11 @@ which must be compatible with *Nevery*, else an error will result.
Users can also write code for their own fix styles and :doc:`add them to LAMMPS `.
If a value begins with "v_", a variable name must follow which has
-been previously defined in the input script. Only equal-style
-variables can be referenced. See the :doc:`variable ` command
-for details. Note that variables of style *equal* define a formula
+been previously defined in the input script. An equal-style or
+vector-style variable can be referenced; the latter requires a
+bracketed term to specify the Ith element of the vector calculated by
+the variable. See the :doc:`variable ` command for details.
+Note that variables of style *equal* and *vector* define a formula
which can reference individual atom properties or thermodynamic
keywords, or they can invoke other computes, fixes, or variables when
they are evaluated, so this is a very general means of specifying
diff --git a/doc/_sources/pair_morse.txt b/doc/_sources/pair_morse.txt
index 6a5b276a22..60ce0b1129 100644
--- a/doc/_sources/pair_morse.txt
+++ b/doc/_sources/pair_morse.txt
@@ -15,6 +15,9 @@ pair_style morse/omp command
pair_style morse/opt command
============================
+pair_style morse/smooth/linear command
+======================================
+
Syntax
""""""
@@ -30,6 +33,7 @@ Examples
.. parsed-literal::
pair_style morse 2.5
+ pair_style morse/smooth/linear 2.5
pair_coeff * * 100.0 2.0 1.5
pair_coeff 1 1 100.0 2.0 1.5 3.0
@@ -54,8 +58,24 @@ commands:
* r0 (distance units)
* cutoff (distance units)
-The last coefficient is optional. If not specified, the global morse
-cutoff is used.
+* The last coefficient is optional. If not specified, the global morse
+* cutoff is used.
+
+
+----------
+
+
+The *smooth/linear* variant is similar to the lj/smooth/linear variant
+in that it adds to the potential a shift and a linear term to make both
+the potential energy and force go to zero at the cut-off:
+
+.. image:: Eqs/pair_morse_smooth_linear.jpg
+ :align: center
+
+The syntax of the pair_style and pair_coeff commands are the same for
+the *morse* and *morse/smooth/linear* styles.
+
+same
----------
@@ -112,7 +132,10 @@ These pair styles can only be used via the *pair* keyword of the
Restrictions
""""""""""""
- none
+
+
+The *morse/smooth/linear* pair style is only enabled if LAMMPS was
+built with the USER-MISC package. See the :ref:`Making LAMMPS ` section for more info.
Related commands
""""""""""""""""
diff --git a/doc/_sources/thermo_style.txt b/doc/_sources/thermo_style.txt
index 0fcaa1c360..ea5c5a8431 100644
--- a/doc/_sources/thermo_style.txt
+++ b/doc/_sources/thermo_style.txt
@@ -30,7 +30,7 @@ Syntax
cella, cellb, cellc, cellalpha, cellbeta, cellgamma,
c_ID, c_ID[I], c_ID[I][J],
f_ID, f_ID[I], f_ID[I][J],
- v_name
+ v_name, v_name[I]
step = timestep
elapsed = timesteps since start of this run
elaplong = timesteps since start of initial run in a series of runs
@@ -78,7 +78,8 @@ Syntax
f_ID = global scalar value calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID
f_ID[I][J] = I,J component of global array calculated by a fix with ID
- v_name = scalar value calculated by an equal-style variable with name
+ v_name = value calculated by an equal-style variable with name
+ v_name[I] = value calculated by a vector-style variable with name
@@ -348,16 +349,18 @@ option being used.
The *v_name* keyword allow the current value of a variable to be
output. The name in the keyword should be replaced by the variable
name that has been defined elsewhere in the input script. Only
-equal-style variables can be referenced. See the
-:doc:`variable ` command for details. Variables of style
-*equal* can reference per-atom properties or thermodynamic keywords,
-or they can invoke other computes, fixes, or variables when evaluated,
-so this is a very general means of creating thermodynamic output.
+equal-style and vector-style variables can be referenced; the latter
+requires a bracketed term to specify the Ith element of the vector
+calculated by the variable. See the :doc:`variable ` command
+for details. Variables of style *equal* and *vector* define a formula
+which can reference per-atom properties or thermodynamic keywords, or
+they can invoke other computes, fixes, or variables when evaluated, so
+this is a very general means of creating thermodynamic output.
-Note that equal-style variables are assumed to be "intensive" global
-quantities, which are thus printed as-is, without normalization by
-thermo_style custom. You can include a division by "natoms" in the
-variable formula if this is not the case.
+Note that equal-style and vector-style variables are assumed to
+produce "intensive" global quantities, which are thus printed as-is,
+without normalization by thermo_style custom. You can include a
+division by "natoms" in the variable formula if this is not the case.
----------
diff --git a/doc/_sources/variable.txt b/doc/_sources/variable.txt
index 24c4116437..86d55fb529 100644
--- a/doc/_sources/variable.txt
+++ b/doc/_sources/variable.txt
@@ -11,7 +11,7 @@ Syntax
variable name style args ...
* name = name of variable to define
-* style = *delete* or *index* or *loop* or *world* or *universe* or *uloop* or *string* or *format* or *getenv* or *file* or *atomfile* or *python* or *equal* or *atom*
+* style = *delete* or *index* or *loop* or *world* or *universe* or *uloop* or *string* or *format* or *getenv* or *file* or *atomfile* or *python* or *equal* or *vector* or *atom*
.. parsed-literal::
*delete* = no args
@@ -41,7 +41,7 @@ Syntax
*file* arg = filename
*atomfile* arg = filename
*python* arg = function
- *equal* or *atom* args = one formula containing numbers, thermo keywords, math operations, group functions, atom values and vectors, compute/fix/variable references
+ *equal* or *vector* 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
constants = PI, version, on, off, true, false, yes, no
thermo keywords = vol, ke, press, etc from :doc:`thermo_style `
@@ -67,8 +67,8 @@ Syntax
feature functions = is_active(category,feature,exact), is_defined(category,id,exact)
atom value = id[i], mass[i], type[i], mol[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i], q[i]
atom vector = id, mass, type, mol, x, y, z, vx, vy, vz, fx, fy, fz, q
- compute references = c_ID, c_ID[i], c_ID[i][j]
- fix references = f_ID, f_ID[i], f_ID[i][j]
+ compute references = c_ID, c_ID[i], c_ID[i][j], C_ID, C_ID[i]
+ fix references = f_ID, f_ID[i], f_ID[i][j], F_ID, F_ID[i]
variable references = v_name, v_name[i]
@@ -109,15 +109,19 @@ string is assigned to the variable. Variables of style *equal* store
a formula which when evaluated produces a single numeric value which
can be output either directly (see the :doc:`print `, :doc:`fix print `, and :doc:`run every ` commands) or as part
of thermodynamic output (see the :doc:`thermo_style `
-command), or used as input to an averaging fix (see the :doc:`fix ave/time ` command). Variables of style *atom* store
-a formula which when evaluated produces one numeric value per atom
-which can be output to a dump file (see the :doc:`dump custom `
-command) or used as input to an averaging fix (see the :doc:`fix ave/spatial ` and :doc:`fix ave/atom `
+command), or used as input to an averaging fix (see the :doc:`fix ave/time ` command). Variables of style *vector*
+store a formula which produces a vector of such values which can be
+used as input to various averaging fixes, or elements of which can be
+part of thermodynamic output. Variables of style *atom* store a
+formula which when evaluated produces one numeric value per atom which
+can be output to a dump file (see the :doc:`dump custom ` command)
+or used as input to an averaging fix (see the :doc:`fix ave/chunk ` and :doc:`fix ave/atom `
commands). Variables of style *atomfile* can be used anywhere in an
input script that atom-style variables are used; they get their
-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.
+per-atom values from a file rather than from a formula. Variables of
+style *python* can be hooked to Python functions using code you
+provide, so that the variable gets its value from the evaluation of
+the Python code.
.. note::
@@ -143,27 +147,27 @@ simulation.
.. note::
When the input script line is encountered that defines a
- variable of style *equal* or *atom* or *python* that contains a
- formula or Python code, the formula is NOT immediately evaluated. It
- will be evaluated every time when the variable is **used** 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
- *format* style variable since it evaluates another variable when it is
- invoked.
+ variable of style *equal* or *vector* or *atom* or *python* that
+ contains a formula or Python code, the formula is NOT immediately
+ evaluated. It will be evaluated every time when the variable is
+ **used** 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 *format* style variable since it evaluates another variable
+ when it is invoked.
.. note::
- Variables of style *equal* and *atom* can be used as inputs to
- various other LAMMPS commands which evaluate their formulas as needed,
- e.g. at different timesteps during a :doc:`run `. 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
- :doc:`python ` command, returns a numeric value. Thus any
- command that states it can use an equal-style variable as an argument,
- can also use such a python-style variable. This means that when the
- LAMMPS command evaluates the variable, the Python function will be
- executed.
+ Variables of style *equal* and *vector* and *atom* can be used
+ as inputs to various other LAMMPS commands which evaluate their
+ formulas as needed, e.g. at different timesteps during a
+ :doc:`run `. 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 :doc:`python ` command, returns a numeric value.
+ Thus any command that states it can use an equal-style variable as an
+ argument, can also use such a python-style variable. This means that
+ when the LAMMPS command evaluates the variable, the Python function
+ will be executed.
.. note::
@@ -178,12 +182,12 @@ simulation.
script.
There are two exceptions to this rule. First, variables of style
-*string*, *getenv*, *equal*, *atom*, and *python* ARE redefined each
-time the command is encountered. This allows these style of variables
-to be redefined multiple times in an input script. In a loop, this
-means the formula associated with an *equal* or *atom* style variable
-can change if it contains a substitution for another variable, e.g. $x
-or v_x.
+*string*, *getenv*, *equal*, *vector*, *atom*, and *python* ARE
+redefined each time the command is encountered. This allows these
+style of variables to be redefined multiple times in an input script.
+In a loop, this means the formula associated with an *equal* or *atom*
+style variable can change if it contains a substitution for another
+variable, e.g. $x or v_x.
Second, as described below, if a variable is iterated on to the end of
its list of strings via the :doc:`next ` command, it is removed
@@ -232,8 +236,8 @@ commands before the variable would become exhausted. For example,
This section describes how all the various variable styles are defined
-and what they store. Except for the *equal* and *atom* styles,
-which are explaine in the next section.
+and what they store. Except for the *equal* and *vector* and *atom*
+styles, which are explained in the next section.
Many of the styles store one or more strings. Note that a single
string can contain spaces (multiple words), if it is enclosed in
@@ -402,31 +406,39 @@ that allows for equal-style variables.
----------
-For the *equal* and *atom* styles, a single string is specified which
-represents a formula that will be evaluated afresh each time the
-variable is used. If you want spaces in the string, enclose it in
-double quotes so the parser will treat it as a single argument. For
-*equal* style variables the formula computes a scalar quantity, which
-becomes the value of the variable whenever it is evaluated. For
-*atom* style variables the formula computes one quantity for each
-atom whenever it is evaluated.
+For the *equal* and *vector* and *atom* styles, a single string is
+specified which represents a formula that will be evaluated afresh
+each time the variable is used. If you want spaces in the string,
+enclose it in double quotes so the parser will treat it as a single
+argument. For *equal*-style variables the formula computes a scalar
+quantity, which becomes the value of the variable whenever it is
+evaluated. For *vector*-style variables the formula must compute a
+vector of quantities, which becomes the value of the variable whenever
+it is evaluated. The calculated vector can be on length one, but it
+cannot be a simple scalar value like that produced by an equal-style
+compute. I.e. the formula for a vector-style variable must have at
+least one quantity in it that refers to a global vector produced by a
+compute, fix, or other vector-style variable. For *atom*-style
+variables the formula computes one quantity for each atom whenever it
+is evaluated.
-Note that *equal* and *atom* variables can produce different values at
-different stages of the input script or at different times during a
-run. For example, if an *equal* variable is used in a :doc:`fix print ` command, different values could be printed each
-timestep it was invoked. If you want a variable to be evaluated
-immediately, so that the result is stored by the variable instead of
-the string, see the section below on "Immediate Evaluation of
-Variables".
+Note that *equal*, *vector*, and *atom* variables can produce
+different values at different stages of the input script or at
+different times during a run. For example, if an *equal* variable is
+used in a :doc:`fix print ` command, different values could
+be printed each timestep it was invoked. If you want a variable to be
+evaluated immediately, so that the result is stored by the variable
+instead of the string, see the section below on "Immediate Evaluation
+of Variables".
-The next command cannot be used with *equal* or *atom* style
-variables, since there is only one string.
+The next command cannot be used with *equal* or *vector* or *atom*
+style variables, since there is only one string.
-The formula for an *equal* or *atom* variable can contain a variety
-of quantities. The syntax for each kind of quantity is simple, but
-multiple quantities can be nested and combined in various ways to
-build up formulas of arbitrary complexity. For example, this is a
-valid (though strange) variable formula:
+The formula for an *equal*, *vector*, or *atom* variable can contain a
+variety of quantities. The syntax for each kind of quantity is
+simple, but multiple quantities can be nested and combined in various
+ways to build up formulas of arbitrary complexity. For example, this
+is a valid (though strange) variable formula:
.. parsed-literal::
@@ -460,30 +472,36 @@ references, and references to other variables.
+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Atom vectors | id, mass, type, mol, x, y, z, vx, vy, vz, fx, fy, fz, q |
+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| Compute references | c_ID, c_ID[i], c_ID[i][j] |
+| Compute references | c_ID, c_ID[i], c_ID[i][j], C_ID, C_ID[i] |
+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| Fix references | f_ID, f_ID[i], f_ID[i][j] |
+| Fix references | f_ID, f_ID[i], f_ID[i][j], F_ID, F_ID[i] |
+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Other variables | v_name, v_name[i] |
+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-Most of the formula elements produce a scalar value. A few produce a
-per-atom vector of values. These are the atom vectors, compute
-references that represent a per-atom vector, fix references that
-represent a per-atom vector, and variables that are atom-style
-variables. Math functions that operate on scalar values produce a
-scalar value; math function that operate on per-atom vectors do so
-element-by-element and produce a per-atom vector.
+Most of the formula elements produce a scalar value. Some produce a
+global or per-atom vector of values. Global vectors can be produced
+by computes or fixes or by other vector-style variables. Per-atom
+vectors are produced by atom vectors, compute references that
+represent a per-atom vector, fix references that represent a per-atom
+vector, and variables that are atom-style variables. Math functions
+that operate on scalar values produce a scalar value; math function
+that operate on global or per-atom vectors do so element-by-element
+and produce a global or per-atom vector.
A formula for equal-style variables cannot use any formula element
-that produces a per-atom vector. A formula for an atom-style variable
-can use formula elements that produce either a scalar value or a
-per-atom vector. Atom-style variables are evaluated by other commands
-that define a :doc:`group