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

This commit is contained in:
sjplimp 2016-08-01 22:40:49 +00:00
parent 98aee05152
commit 69513a29ab
25 changed files with 942 additions and 326 deletions

View File

@ -28,9 +28,9 @@ Syntax
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (position, velocity, force component)
c_ID = per-atom or local vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom or local array calculated by a compute with ID
c_ID[I] = Ith column of per-atom or local array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom or local vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom or local array calculated by a fix with ID
f_ID[I] = Ith column of per-atom or local array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
* zero or more keyword/args pairs may be appended
@ -51,6 +51,7 @@ Examples
compute 1 all reduce sum c_force
compute 1 all reduce/region subbox sum c_force
compute 2 all reduce min c_press[2] f_ave v_myKE
compute 2 all reduce min c_press[*] f_ave v_myKE
compute 3 fluid reduce max c_index[1] c_index[2] c_dist replace 1 3 replace 2 3
Description
@ -91,6 +92,32 @@ component) or can be the result of a :doc:`compute <compute>` or
:doc:`fix <fix>` or the evaluation of an atom-style
:doc:`variable <variable>`.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for *mode* = scalar) or the
number of columns in the array (for *mode* = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual columns of the array
had been listed one by one. E.g. these 2 compute reduce commands are
equivalent, since the :doc:`compute stress/atom <compute_stress/atom>`
command creates a per-atom array with 6 columns:
.. parsed-literal::
compute myPress all stress/atom NULL
compute 2 all reduce min myPress[*]
compute 2 all reduce min myPress[1] myPress[2] myPress[3] &
myPress[4] myPress[5] myPress[6]
----------
The atom attribute values (x,y,z,vx,vy,vz,fx,fy,fz) are
self-explanatory. Note that other atom attributes can be used as
inputs to this fix by using the :doc:`compute property/atom <compute_property_atom>` command and then specifying
@ -103,7 +130,9 @@ per-atom or local quantities. See the individual
is appended, the vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the array calculated
by the compute is used. Users can also write code for their own
compute styles and :doc:`add them to LAMMPS <Section_modify>`.
compute styles and :doc:`add them to LAMMPS <Section_modify>`. See the
discussion above for how I can be specified with a wildcard asterisk
to effectively specify multiple values.
If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. Fixes can generate per-atom
@ -113,7 +142,9 @@ timesteps, which must be compatible with when compute reduce
references the values, else an error results. If no bracketed integer
is 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 <Section_modify>`.
is used. Users can also write code for their own fix style and :doc:`add them to LAMMPS <Section_modify>`. See the discussion above for how
I can be specified with a wildcard asterisk to effectively specify
multiple values.
If a value begins with "v_", a variable name must follow which has
been previously defined in the input script. It must be an

View File

@ -74,12 +74,12 @@ Syntax
.. parsed-literal::
*local* args = list of local attributes
possible attributes = index, c_ID, c_ID[N], f_ID, f_ID[N]
possible attributes = index, c_ID, c_ID[I], f_ID, f_ID[I]
index = enumeration of local values
c_ID = local vector calculated by a compute with ID
c_ID[N] = Nth column of local array calculated by a compute with ID
c_ID[I] = Ith column of local array calculated by a compute with ID, I can include wildcard (see below)
f_ID = local vector calculated by a fix with ID
f_ID[N] = Nth column of local array calculated by a fix with ID
f_ID[I] = Ith column of local array calculated by a fix with ID, I can include wildcard (see below)
.. parsed-literal::
@ -117,9 +117,9 @@ Syntax
angmomx,angmomy,angmomz = angular momentum of aspherical particle
tqx,tqy,tqz = torque on finite-size particles
c_ID = per-atom vector calculated by a compute with ID
c_ID[N] = Nth column of per-atom array calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID[N] = Nth column of per-atom array calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
d_name = per-atom floating point vector with name, managed by fix property/atom
i_name = per-atom integer vector with name, managed by fix property/atom
@ -138,6 +138,7 @@ Examples
dump 2 subgroup atom 50 dump.run.mpiio.bin
dump 4a all custom 100 dump.myforce.* id type x y vx fx
dump 4b flow custom 100 dump.%.myforce id type c_myF[3] v_ke
dump 4b flow custom 100 dump.%.myforce id type c_myF[*] v_ke
dump 2 inner cfg 10 dump.snap.*.cfg mass type xs ys zs vx vy vz
dump snap all cfg 100 dump.config.*.cfg mass type xs ys zs id type c_Stress[2]
dump 1 all xtc 1000 file.xtc
@ -467,6 +468,34 @@ styles.
----------
Note that in the discussion which follows, for styles which can
reference values from a compute or fix, like the *custom*\ , *cfg*\ , or
*local* styles, the bracketed index I can be specified using a
wildcard asterisk with the index to effectively specify multiple
values. This takes the form "*" or "*n" or "n*" or "m*n". If N = the
size of the vector (for *mode* = scalar) or the number of columns in
the array (for *mode* = vector), then an asterisk with no numeric
values means all indices from 1 to N. A leading asterisk means all
indices from 1 to n (inclusive). A trailing asterisk means all
indices from n to N (inclusive). A middle asterisk means all indices
from m to n (inclusive).
Using a wildcard is the same as if the individual columns of the array
had been listed one by one. E.g. these 2 dump commands are
equivalent, since the :doc:`compute stress/atom <compute_stress/atom>`
command creates a per-atom array with 6 columns:
.. parsed-literal::
compute myPress all stress/atom NULL
dump 2 all custom 100 tmp.dump id myPress[*]
dump 2 all custom 100 tmp.dump id myPress[1] myPress[2] myPress[3] &
myPress[4] myPress[5] myPress[6]
----------
This section explains the local attributes that can be specified as
part of the *local* style.
@ -479,7 +508,7 @@ between processor, there is no guarantee that the same index will be
used for the same info (e.g. a particular bond) in successive
snapshots.
The *c_ID* and *c_ID[N]* attributes allow local vectors or arrays
The *c_ID* and *c_ID[I]* attributes allow local vectors or arrays
calculated by a :doc:`compute <compute>` to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
@ -493,22 +522,26 @@ Instead, global quantities can be output by the :doc:`thermo_style custom <therm
output by the dump custom command.
If *c_ID* is used as a attribute, then the local vector calculated by
the compute is printed. If *c_ID[N]* is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the compute.
the compute is printed. If *c_ID[I]* is used, then I must be in the
range from 1-M, which will print the Ith column of the local array
with M columns calculated by the compute. See the discussion above
for how I can be specified with a wildcard asterisk to effectively
specify multiple values.
The *f_ID* and *f_ID[N]* attributes allow local vectors or arrays
The *f_ID* and *f_ID[I]* attributes allow local vectors or arrays
calculated by a :doc:`fix <fix>` to be output. The ID in the attribute
should be replaced by the actual ID of the fix that has been defined
previously in the input script.
If *f_ID* is used as a attribute, then the local vector calculated by
the fix is printed. If *f_ID[N]* is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the fix.
the fix is printed. If *f_ID[I]* is used, then I must be in the
range from 1-M, which will print the Ith column of the local with M
columns calculated by the fix. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
Here is an example of how to dump bond info for a system,
including the distance and energy of each bond:
Here is an example of how to dump bond info for a system, including
the distance and energy of each bond:
.. parsed-literal::
@ -587,7 +620,7 @@ The *tqx*\ , *tqy*\ , *tqz* attributes are for finite-size particles that
can sustain a rotational torque due to interactions with other
particles.
The *c_ID* and *c_ID[N]* attributes allow per-atom vectors or arrays
The *c_ID* and *c_ID[I]* attributes allow per-atom vectors or arrays
calculated by a :doc:`compute <compute>` to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
@ -602,11 +635,13 @@ command. Instead, global quantities can be output by the
can be output by the dump local command.
If *c_ID* is used as a attribute, then the per-atom vector calculated
by the compute is printed. If *c_ID[N]* is used, then N must be in
the range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the compute.
by the compute is printed. If *c_ID[I]* is used, then I must be in
the range from 1-M, which will print the Ith column of the per-atom
array with M columns calculated by the compute. See the discussion
above for how I can be specified with a wildcard asterisk to
effectively specify multiple values.
The *f_ID* and *f_ID[N]* attributes allow vector or array per-atom
The *f_ID* and *f_ID[I]* attributes allow vector or array per-atom
quantities calculated by a :doc:`fix <fix>` to be output. The ID in the
attribute should be replaced by the actual ID of the fix that has been
defined previously in the input script. The :doc:`fix ave/atom <fix_ave_atom>` command is one that calculates per-atom
@ -616,9 +651,11 @@ any :doc:`compute <compute>`, :doc:`fix <fix>`, or atom-style
be written to a dump file.
If *f_ID* is used as a attribute, then the per-atom vector calculated
by the fix is printed. If *f_ID[N]* is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the fix.
by the fix is printed. If *f_ID[I]* is used, then I must be in the
range from 1-M, which will print the Ith column of the per-atom array
with M columns calculated by the fix. See the discussion above for
how I can be specified with a wildcard asterisk to effectively specify
multiple values.
The *v_name* attribute allows per-atom vectors calculated by a
:doc:`variable <variable>` to be output. The name in the attribute

View File

@ -21,9 +21,9 @@ Syntax
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (position, velocity, force component)
c_ID = per-atom vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
@ -35,6 +35,7 @@ Examples
fix 1 all ave/atom 1 100 100 vx vy vz
fix 1 all ave/atom 10 20 1000 c_my_stress[1]
fix 1 all ave/atom 10 20 1000 c_my_stress[*]
Description
"""""""""""
@ -55,6 +56,8 @@ variable must produce a per-atom vector, not a global quantity or
local quantity. If you wish to time-average global quantities from a
compute, fix, or variable, then see the :doc:`fix ave/time <fix_ave_time>` command.
Each per-atom value of each input vector is averaged independently.
:doc:`Computes <compute>` that produce per-atom vectors or arrays are
those which have the word *atom* in their style name. See the doc
pages for individual :doc:`fixes <fix>` to determine which ones produce
@ -62,7 +65,28 @@ per-atom vectors or arrays. :doc:`Variables <variable>` of style *atom*
are the only ones that can be used with this fix since they produce
per-atom vectors.
Each per-atom value of each input vector is averaged independently.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for *mode* = scalar) or the
number of columns in the array (for *mode* = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual columns of the array
had been listed one by one. E.g. these 2 fix ave/atom commands are
equivalent, since the :doc:`compute stress/atom <compute_stress/atom>`
command creates a per-atom array with 6 columns:
.. parsed-literal::
compute my_stress all stress/atom NULL
fix 1 all ave/atom 10 20 1000 c_my_stress[*]
fix 1 all ave/atom 10 20 1000 c_my_stress[1] c_my_stress[1] &
c_my_stress[3] c_my_stress[4] &
c_my_stress[5] c_my_stress[6]
----------
@ -107,7 +131,9 @@ previously defined in the input script. If no bracketed term is
appended, the per-atom vector calculated by the compute is used. If a
bracketed term containing an index I is appended, the Ith column of
the per-atom array calculated by the compute is used. Users can also
write code for their own compute styles and :doc:`add them to LAMMPS <Section_modify>`.
write code for their own compute styles and :doc:`add them to LAMMPS <Section_modify>`. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed term is
@ -116,7 +142,9 @@ bracketed term containing an index I is appended, the Ith column of
the per-atom array calculated by the fix is used. Note that some
fixes only produce their values on certain timesteps, 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 <Section_modify>`.
write code for their own fix styles and :doc:`add them to LAMMPS <Section_modify>`. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
If a value begins with "v_", a variable name must follow which has
been previously defined in the input script as an :doc:`atom-style variable <variable>` Variables of style *atom* can reference

View File

@ -24,9 +24,9 @@ Syntax
density/number, density/mass = number or mass density
temp = temperature
c_ID = per-atom vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
* zero or more keyword/arg pairs may be appended
@ -121,6 +121,9 @@ any attribute defined and stored by atoms. If you wish to
time-average global quantities from a compute, fix, or variable, then
see the :doc:`fix ave/time <fix_ave_time>` command.
The per-atom values of each input vector are summed and averaged
independently of the per-atom values in other input vectors.
:doc:`Computes <compute>` that produce per-atom quantities are those
which have the word *atom* in their style name. See the doc pages for
individual :doc:`fixes <fix>` to determine which ones produce per-atom
@ -128,8 +131,26 @@ quantities. :doc:`Variables <variable>` of style *atom* are the only
ones that can be used with this fix since all other styles of variable
produce global quantities.
The per-atom values of each input vector are summed and averaged
independently of the per-atom values in other input vectors.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for *mode* = scalar) or the
number of columns in the array (for *mode* = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/chunk commands are equivalent, since the :doc:`compute property/atom <compute_property/atom>` command creates, in this
case, a per-atom array with 3 columns:
.. parsed-literal::
compute myAng all property/atom 50 angmomx angmomy angmomz
fix 1 all ave/chunk 100 1 100 cc1 c_myAng[*] file tmp.angmom
fix 2 all ave/chunk 100 1 100 cc1 c_myAng[1] c_myAng[2] c_myAng[3] file tmp.angmom
.. note::
@ -244,6 +265,8 @@ appended, the per-atom vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the compute is used. Users can also write code for
their own compute styles and :doc:`add them to LAMMPS <Section_modify>`.
See the discussion above for how I can be specified with a wildcard
asterisk to effectively specify multiple values.
If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed integer is
@ -252,7 +275,9 @@ bracketed integer is appended, the Ith column of the per-atom array
calculated by the fix is used. Note that some fixes only produce
their values on certain timesteps, which must be compatible with
*Nevery*\ , else an error results. Users can also write code for their
own fix styles and :doc:`add them to LAMMPS <Section_modify>`.
own fix styles and :doc:`add them to LAMMPS <Section_modify>`. See the
discussion above for how I can be specified with a wildcard asterisk
to effectively specify multiple values.
If a value begins with "v_", a variable name must follow which has
been previously defined in the input script. Variables of style

View File

@ -20,9 +20,9 @@ Syntax
.. parsed-literal::
c_ID = global scalar calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID, I can include wildcard (see below)
f_ID = global scalar calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below)
v_name = global value calculated by an equal-style variable with name
v_name[I] = Ith component of a vector-style variable with name
@ -66,6 +66,8 @@ Examples
c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] &
type upper ave running title1 "My correlation data"
fix 1 all ave/correlate 1 50 10000 c_thermo_press[*]
Description
"""""""""""
@ -91,6 +93,10 @@ from a compute, fix, or variable, then see the :doc:`fix ave/chunk <fix_ave_chun
:doc:`fix ave/histo <fix_ave_histo>` commands. If you wish to convert a
per-atom quantity into a single global value, see the :doc:`compute reduce <compute_reduce>` command.
The input values must either be all scalars. What kinds of
correlations between input values are calculated is determined by the
*type* keyword as discussed below.
:doc:`Computes <compute>` that produce global quantities are those which
do not have the word *atom* in their style name. Only a few
:doc:`fixes <fix>` produce global quantities. See the doc pages for
@ -99,9 +105,28 @@ individual fixes for info on which ones produce such values.
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
*type* keyword as discussed below.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for *mode* = scalar) or the
number of columns in the array (for *mode* = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector had been listed one by one. E.g. these 2 fix ave/correlate
commands are equivalent, since the :doc:`compute pressure <compute_pressure>` command creates a global vector with 6
values.
.. parsed-literal::
compute myPress all pressure NULL
fix 1 all ave/correlate 1 50 10000 c_myPress[*]
fix 1 all ave/correlate 1 50 10000 &
c_myPress[1] c_myPress[2] c_myPress[3] &
c_myPress[4] c_myPress[5] c_myPress[6]
----------
@ -152,7 +177,9 @@ If a value begins with "c_", a compute ID must follow which has been
previously defined in the input script. If no bracketed term is
appended, the global scalar calculated by the compute is used. If a
bracketed term is appended, the Ith element of the global vector
calculated by the compute is used.
calculated by the compute is used. See the discussion above for how I
can be specified with a wildcard asterisk to effectively specify
multiple values.
Note that there is a :doc:`compute reduce <compute_reduce>` command
which can sum per-atom quantities into a global scalar or vector which
@ -166,7 +193,9 @@ If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed term is
appended, the global scalar calculated by the fix is used. If a
bracketed term is appended, the Ith element of the global vector
calculated by the fix is used.
calculated by the fix is used. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
Note that some fixes only produce their values on certain timesteps,
which must be compatible with *Nevery*\ , else an error will result.

View File

@ -26,9 +26,9 @@ Syntax
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (position, velocity, force component)
c_ID = scalar or vector calculated by a compute with ID
c_ID[I] = Ith component of vector or Ith column of array calculated by a compute with ID
c_ID[I] = Ith component of vector or Ith column of array calculated by a compute with ID, I can include wildcard (see below)
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
f_ID[I] = Ith component of vector or Ith column of array calculated by a fix with ID, I can include wildcard (see below)
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
@ -68,15 +68,16 @@ Examples
fix 1 all ave/histo 100 5 1000 0.5 1.5 50 c_myTemp file temp.histo ave running
fix 1 all ave/histo 100 5 1000 -5 5 100 c_thermo_press[2] c_thermo_press[3] title1 "My output values"
fix 1 all ave/histo 100 5 1000 -5 5 100 c_thermo_press[*]
fix 1 all ave/histo 1 100 1000 -2.0 2.0 18 vx vy vz mode vector ave running beyond extra
fix 1 all ave/histo/weight 1 1 1 10 100 2000 c_XRD[1] c_XRD[2]
Description
"""""""""""
Use one or more values as inputs every few timesteps, histogram them,
and average the histogram over longer timescales. The resulting
histogram can be used by other :ref:`output commands <howto_15>`, and can also be written to a
Use one or more values as inputs every few timesteps to create a
single histogram. The histogram can then be averaged over longer
timescales. The resulting histogram can be used by other :ref:`output commands <howto_15>`, and can also be written to a
file. The fix ave/histo/weight command has identical syntax to fix
ave/histo, except that exactly two values must be specified. See
details below.
@ -102,23 +103,41 @@ 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.
Note that the output of this command is a single histogram for all
input values combined together, not one histogram per input value.
See below for details on the format of the output of this fix.
If *mode* = vector, then the input values may either be vectors or
arrays. If a global array is listed, then it is the same as if the
individual columns of the array had been listed one by one.
E.g. these 2 fix ave/histo commands are equivalent, since the :doc:`compute com/chunk <compute_com_chunk>` command creates a global array
with 3 columns:
The input values must either be all scalars or all vectors (or
arrays), depending on the setting of the *mode* keyword.
If *mode* = scalar, then the input values must be scalars, or vectors
with a bracketed term appended, indicating the Ith value of the vector
is used.
If *mode* = vector, then the input values must be vectors, or arrays
with a bracketed term appended, indicating the Ith column of the array
is used. All vectors must be the same length, which is the length of
the vector or number of rows in the array.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for *mode* = scalar) or the
number of columns in the array (for *mode* = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/histo commands are equivalent, since the :doc:`compute com/chunk <compute_com_chunk>` command creates a global array with
3 columns:
.. parsed-literal::
compute myCOM all com/chunk
fix 1 all ave/histo 100 1 100 c_myCOM file tmp1.com mode vector
fix 1 all ave/histo 100 1 100 c_myCOM[*] file tmp1.com mode vector
fix 2 all ave/histo 100 1 100 c_myCOM[1] c_myCOM[2] c_myCOM[3] file tmp2.com mode vector
If the fix ave/histo/weight command is used, exactly two values must
@ -166,11 +185,11 @@ no bracketed term is appended, the global scalar calculated by the
compute is used. If a bracketed term is appended, the Ith element of
the global vector calculated by the compute is used. If *mode* =
vector, then if no bracketed term is appended, the global or per-atom
or local vector calculated by the compute is used. Or if the compute
calculates an array, all of the columns of the array are used as if
they had been specified as individual vectors (see description above).
If a bracketed term is appended, the Ith column of the global or
per-atom or local array calculated by the compute is used.
or local vector calculated by the compute is used. If a bracketed
term is appended, the Ith column of the global or per-atom or local
array calculated by the compute is used. See the discussion above for
how I can be specified with a wildcard asterisk to effectively specify
multiple values.
Note that there is a :doc:`compute reduce <compute_reduce>` command
which can sum per-atom quantities into a global scalar or vector which
@ -185,11 +204,11 @@ no bracketed term is appended, the global scalar calculated by the fix
is used. If a bracketed term is appended, the Ith element of the
global vector calculated by the fix is used. If *mode* = vector, then
if no bracketed term is appended, the global or per-atom or local
vector calculated by the fix is used. Or if the fix calculates an
array, all of the columns of the array are used as if they had been
specified as individual vectors (see description above). If a
bracketed term is appended, the Ith column of the global or per-atom
or local array calculated by the fix is used.
vector calculated by the fix is used. If a bracketed term is
appended, the Ith column of the global or per-atom or local array
calculated by the fix is used. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
Note that some fixes only produce their values on certain timesteps,
which must be compatible with *Nevery*\ , else an error will result.

View File

@ -19,10 +19,10 @@ Syntax
* value = c_ID, c_ID[N], f_ID, f_ID[N], v_name
.. parsed-literal::
c_ID = global scalar, vector, or array calculated by a compute with ID
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
c_ID = global scalar or vector calculated by a compute with ID
c_ID[I] = Ith component of global vector or Ith column of global array calculated by a compute with ID, I can include wildcard (see below)
f_ID = global scalar or vector 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, I can include wildcard (see below)
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
@ -63,6 +63,7 @@ Examples
fix 1 all ave/time 100 5 1000 c_myTemp c_thermo_temp file temp.profile
fix 1 all ave/time 100 5 1000 c_thermo_press[2] ave window 20 &
title1 "My output values"
fix 1 all ave/time 100 5 1000 c_thermo_press[*]
fix 1 all ave/time 1 100 1000 f_indent f_indent[1] file temp.indent off 1
Description
@ -97,24 +98,40 @@ individual fixes for info on which ones produce such values.
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
cases, the averaging is performed independently on each input value.
I.e. each input scalar is averaged independently and each element of
each input vector (or array) is averaged independently.
The input values must either be all scalars or all vectors depending
on the setting of the *mode* keyword. In both cases, the averaging is
performed independently on each input value. I.e. each input scalar
is averaged independently or each element of each input vector is
averaged independently.
If *mode* = vector, then the input values may either be vectors or
arrays and all must be the same "length", which is the length of the
vector or number of rows in the array. If a global array is listed,
then it is the same as if the individual columns of the array had been
listed one by one. E.g. these 2 fix ave/time commands are equivalent,
since the :doc:`compute rdf <compute_rdf>` command creates, in this
case, a global array with 3 columns, each of length 50:
If *mode* = scalar, then the input values must be scalars, or vectors
with a bracketed term appended, indicating the Ith value of the vector
is used.
If *mode* = vector, then the input values must be vectors, or arrays
with a bracketed term appended, indicating the Ith column of the array
is used. All vectors must be the same length, which is the length of
the vector or number of rows in the array.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for *mode* = scalar) or the
number of columns in the array (for *mode* = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/time commands are equivalent, since the :doc:`compute rdf <compute_rdf>` command creates, in this case, a global array
with 3 columns, each of length 50:
.. parsed-literal::
compute myRDF all rdf 50 1 2
fix 1 all ave/time 100 1 100 c_myRDF file tmp1.rdf mode vector
fix 1 all ave/time 100 1 100 c_myRDF[*] file tmp1.rdf mode vector
fix 2 all ave/time 100 1 100 c_myRDF[1] c_myRDF[2] c_myRDF[3] file tmp2.rdf mode vector
@ -148,11 +165,10 @@ no bracketed term is appended, the global scalar calculated by the
compute is used. If a bracketed term is appended, the Ith element of
the global vector calculated by the compute is used. If *mode* =
vector, then if no bracketed term is appended, the global vector
calculated by the compute is used. Or if the compute calculates an
array, all of the columns of the global array are used as if they had
been specified as individual vectors (see description above). If a
bracketed term is appended, the Ith column of the global array
calculated by the compute is used.
calculated by the compute is used. If a bracketed term is appended,
the Ith column of the global array calculated by the compute is used.
See the discussion above for how I can be specified with a wildcard
asterisk to effectively specify multiple values.
Note that there is a :doc:`compute reduce <compute_reduce>` command
which can sum per-atom quantities into a global scalar or vector which
@ -167,10 +183,10 @@ no bracketed term is appended, the global scalar calculated by the fix
is used. If a bracketed term is appended, the Ith element of the
global vector calculated by the fix is used. If *mode* = vector, then
if no bracketed term is appended, the global vector calculated by the
fix is used. Or if the fix calculates an array, all of the columns of
the global array are used as if they had been specified as individual
vectors (see description above). If a bracketed term is appended, the
Ith column of the global array calculated by the fix is used.
fix is used. If a bracketed term is appended, the Ith column of the
global array calculated by the fix is used. See the discussion above
for how I can be specified with a wildcard asterisk to effectively
specify multiple values.
Note that some fixes only produce their values on certain timesteps,
which must be compatible with *Nevery*\ , else an error will result.

View File

@ -74,10 +74,10 @@ Syntax
cella,cellb,cellc = periodic cell lattice constants a,b,c
cellalpha, cellbeta, cellgamma = periodic cell angles alpha,beta,gamma
c_ID = global scalar value calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID, I can include wildcard (see below)
c_ID[I][J] = I,J component of global array calculated by a compute with ID
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] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below)
f_ID[I][J] = I,J component of global array calculated by a fix with ID
v_name = value calculated by an equal-style variable with name
v_name[I] = value calculated by a vector-style variable with name
@ -92,6 +92,7 @@ Examples
thermo_style multi
thermo_style custom step temp pe etotal press vol
thermo_style custom step temp etotal c_myTemp v_abc
thermo_style custom step temp etotal c_myTemp[*] v_abc
Description
"""""""""""
@ -146,6 +147,34 @@ atoms in the system), and the numeric precision of each printed value.
----------
Note that for values from a compute or fix, the bracketed index I used
to index a vector, as in *c_ID[I]* or *f_ID[I]*\ , can be specified
using a wildcard asterisk with the index to effectively specify
multiple values. This takes the form "*" or "*n" or "n*" or "m*n".
If N = the size of the vector (for *mode* = scalar) or the number of
columns in the array (for *mode* = vector), then an asterisk with no
numeric values means all indices from 1 to N. A leading asterisk
means all indices from 1 to n (inclusive). A trailing asterisk means
all indices from n to N (inclusive). A middle asterisk means all
indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector had been listed one by one. E.g. these 2 thermo_style commands
are equivalent, since the :doc:`compute temp <compute_temp>` command
creates a global vector with 6 values.
.. parsed-literal::
compute myTemp all temp
thermo_style custom step temp etotal c_myTemp[*]
thermo_style custom step temp etotal &
c_myTemp[1] c_myTemp[2] c_myTemp[3] &
c_myTemp[4] c_myTemp[5] c_myTemp[6]
----------
Several of the thermodynamic quantities require a temperature to be
computed: "temp", "press", "ke", "etotal", "enthalpy", "pxx", etc. By
default this is done by using a *temperature* compute which is created
@ -316,9 +345,12 @@ The *c_ID* and *c_ID[I]* and *c_ID[I][J]* keywords allow global
values calculated by a compute to be output. As discussed on the
:doc:`compute <compute>` doc page, computes can calculate global,
per-atom, or local values. Only global values can be referenced by
this command. However, per-atom compute values can be referenced in a
:doc:`variable <variable>` and the variable referenced by thermo_style
custom, as discussed below.
this command. However, per-atom compute values for an individual atom
can be referenced in a :doc:`variable <variable>` and the variable
referenced by thermo_style custom, as discussed below. See the
discussion above for how the I in *c_ID[I]* can be specified with a
wildcard asterisk to effectively specify multiple values from a global
compute vector.
The ID in the keyword should be replaced by the actual ID of a compute
that has been defined elsewhere in the input script. See the
@ -338,9 +370,11 @@ The *f_ID* and *f_ID[I]* and *f_ID[I][J]* keywords allow global
values calculated by a fix to be output. As discussed on the
:doc:`fix <fix>` doc page, fixes can calculate global, per-atom, or
local values. Only global values can be referenced by this command.
However, per-atom fix values can be referenced in a
:doc:`variable <variable>` and the variable referenced by thermo_style
custom, as discussed below.
However, per-atom fix values can be referenced for an individual atom
in a :doc:`variable <variable>` and the variable referenced by
thermo_style custom, as discussed below. See the discussion above for
how the I in *f_ID[I]* can be specified with a wildcard asterisk to
effectively specify multiple values from a global fix vector.
The ID in the keyword should be replaced by the actual ID of a fix
that has been defined elsewhere in the input script. See the
@ -362,11 +396,14 @@ 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 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 <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.
calculated by the variable. However, an atom-style variable can be
referenced for an individual atom by an equal-style variable and that
variable referenced. See the :doc:`variable <variable>` command for
details. Variables of style *equal* and *vector* and *atom* 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 and vector-style variables are assumed to
produce "intensive" global quantities, which are thus printed as-is,

View File

@ -150,9 +150,9 @@
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">,</span><span class="n">vx</span><span class="p">,</span><span class="n">vy</span><span class="p">,</span><span class="n">vz</span><span class="p">,</span><span class="n">fx</span><span class="p">,</span><span class="n">fy</span><span class="p">,</span><span class="n">fz</span> <span class="o">=</span> <span class="n">atom</span> <span class="n">attribute</span> <span class="p">(</span><span class="n">position</span><span class="p">,</span> <span class="n">velocity</span><span class="p">,</span> <span class="n">force</span> <span class="n">component</span><span class="p">)</span>
<span class="n">c_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">atom</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
@ -171,6 +171,7 @@
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">sum</span> <span class="n">c_force</span>
<span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">reduce</span><span class="o">/</span><span class="n">region</span> <span class="n">subbox</span> <span class="nb">sum</span> <span class="n">c_force</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">min</span> <span class="n">c_press</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">f_ave</span> <span class="n">v_myKE</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">min</span> <span class="n">c_press</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">f_ave</span> <span class="n">v_myKE</span>
<span class="n">compute</span> <span class="mi">3</span> <span class="n">fluid</span> <span class="n">reduce</span> <span class="nb">max</span> <span class="n">c_index</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_index</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_dist</span> <span class="n">replace</span> <span class="mi">1</span> <span class="mi">3</span> <span class="n">replace</span> <span class="mi">2</span> <span class="mi">3</span>
</pre></div>
</div>
@ -208,6 +209,26 @@ group specified for that compute.</p>
component) or can be the result of a <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> or
<a class="reference internal" href="fix.html"><span class="doc">fix</span></a> or the evaluation of an atom-style
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a>.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).</p>
<p>Using a wildcard is the same as if the individual columns of the array
had been listed one by one. E.g. these 2 compute reduce commands are
equivalent, since the <span class="xref doc">compute stress/atom</span>
command creates a per-atom array with 6 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myPress</span> <span class="nb">all</span> <span class="n">stress</span><span class="o">/</span><span class="n">atom</span> <span class="n">NULL</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">min</span> <span class="n">myPress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">min</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">myPress</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
</pre></div>
</div>
<hr class="docutils" />
<p>The atom attribute values (x,y,z,vx,vy,vz,fx,fy,fz) are
self-explanatory. Note that other atom attributes can be used as
inputs to this fix by using the <a class="reference internal" href="compute_property_atom.html"><span class="doc">compute property/atom</span></a> command and then specifying
@ -219,7 +240,9 @@ per-atom or local quantities. See the individual
is appended, the vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the array calculated
by the compute is used. Users can also write code for their own
compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the
discussion above for how I can be specified with a wildcard asterisk
to effectively specify multiple values.</p>
<p>If a value begins with &#8220;<a href="#id3"><span class="problematic" id="id4">f_</span></a>&#8221;, a fix ID must follow which has been
previously defined in the input script. Fixes can generate per-atom
or local quantities. See the individual <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> doc page for
@ -228,7 +251,9 @@ timesteps, which must be compatible with when compute reduce
references the values, else an error results. If no bracketed integer
is 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 <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
is used. Users can also write code for their own fix style and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the discussion above for how
I can be specified with a wildcard asterisk to effectively specify
multiple values.</p>
<p>If a value begins with &#8220;<a href="#id5"><span class="problematic" id="id6">v_</span></a>&#8221;, a variable name must follow which has
been previously defined in the input script. It must be an
<a class="reference internal" href="variable.html"><span class="doc">atom-style variable</span></a>. Atom-style variables can

View File

@ -188,12 +188,12 @@
</pre>
<pre class="literal-block">
<em>local</em> args = list of local attributes
possible attributes = index, c_ID, c_ID[N], f_ID, f_ID[N]
possible attributes = index, c_ID, c_ID[I], f_ID, f_ID[I]
index = enumeration of local values
c_ID = local vector calculated by a compute with ID
c_ID[N] = Nth column of local array calculated by a compute with ID
c_ID[I] = Ith column of local array calculated by a compute with ID, I can include wildcard (see below)
f_ID = local vector calculated by a fix with ID
f_ID[N] = Nth column of local array calculated by a fix with ID
f_ID[I] = Ith column of local array calculated by a fix with ID, I can include wildcard (see below)
</pre>
<pre class="literal-block">
<em>custom</em> or <em>custom/gz</em> or <em>custom/mpiio</em> args = list of atom attributes
@ -229,9 +229,9 @@ omegax,omegay,omegaz = angular velocity of spherical particle
angmomx,angmomy,angmomz = angular momentum of aspherical particle
tqx,tqy,tqz = torque on finite-size particles
c_ID = per-atom vector calculated by a compute with ID
c_ID[N] = Nth column of per-atom array calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID[N] = Nth column of per-atom array calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
d_name = per-atom floating point vector with name, managed by fix property/atom
i_name = per-atom integer vector with name, managed by fix property/atom
@ -246,6 +246,7 @@ i_name = per-atom integer vector with name, managed by fix property/atom
<span class="n">dump</span> <span class="mi">2</span> <span class="n">subgroup</span> <span class="n">atom</span> <span class="mi">50</span> <span class="n">dump</span><span class="o">.</span><span class="n">run</span><span class="o">.</span><span class="n">mpiio</span><span class="o">.</span><span class="n">bin</span>
<span class="n">dump</span> <span class="mi">4</span><span class="n">a</span> <span class="nb">all</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.</span><span class="n">myforce</span><span class="o">.*</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">x</span> <span class="n">y</span> <span class="n">vx</span> <span class="n">fx</span>
<span class="n">dump</span> <span class="mi">4</span><span class="n">b</span> <span class="n">flow</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.%.</span><span class="n">myforce</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">c_myF</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">v_ke</span>
<span class="n">dump</span> <span class="mi">4</span><span class="n">b</span> <span class="n">flow</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.%.</span><span class="n">myforce</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">c_myF</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">v_ke</span>
<span class="n">dump</span> <span class="mi">2</span> <span class="n">inner</span> <span class="n">cfg</span> <span class="mi">10</span> <span class="n">dump</span><span class="o">.</span><span class="n">snap</span><span class="o">.*.</span><span class="n">cfg</span> <span class="n">mass</span> <span class="nb">type</span> <span class="n">xs</span> <span class="n">ys</span> <span class="n">zs</span> <span class="n">vx</span> <span class="n">vy</span> <span class="n">vz</span>
<span class="n">dump</span> <span class="n">snap</span> <span class="nb">all</span> <span class="n">cfg</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.</span><span class="n">config</span><span class="o">.*.</span><span class="n">cfg</span> <span class="n">mass</span> <span class="nb">type</span> <span class="n">xs</span> <span class="n">ys</span> <span class="n">zs</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">c_Stress</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
<span class="n">dump</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">xtc</span> <span class="mi">1000</span> <span class="n">file</span><span class="o">.</span><span class="n">xtc</span>
@ -530,6 +531,28 @@ be about 3x smaller than the text version, but will also take longer
to write. This option is not available for the <em>dcd</em> and <em>xtc</em>
styles.</p>
<hr class="docutils" />
<p>Note that in the discussion which follows, for styles which can
reference values from a compute or fix, like the <em>custom</em>, <em>cfg</em>, or
<em>local</em> styles, the bracketed index I can be specified using a
wildcard asterisk with the index to effectively specify multiple
values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or &#8220;m*n&#8221;. If N = the
size of the vector (for <em>mode</em> = scalar) or the number of columns in
the array (for <em>mode</em> = vector), then an asterisk with no numeric
values means all indices from 1 to N. A leading asterisk means all
indices from 1 to n (inclusive). A trailing asterisk means all
indices from n to N (inclusive). A middle asterisk means all indices
from m to n (inclusive).</p>
<p>Using a wildcard is the same as if the individual columns of the array
had been listed one by one. E.g. these 2 dump commands are
equivalent, since the <span class="xref doc">compute stress/atom</span>
command creates a per-atom array with 6 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myPress</span> <span class="nb">all</span> <span class="n">stress</span><span class="o">/</span><span class="n">atom</span> <span class="n">NULL</span>
<span class="n">dump</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span> <span class="nb">id</span> <span class="n">myPress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">dump</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span> <span class="nb">id</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">myPress</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
</pre></div>
</div>
<hr class="docutils" />
<p>This section explains the local attributes that can be specified as
part of the <em>local</em> style.</p>
<p>The <em>index</em> attribute can be used to generate an index number from 1
@ -540,7 +563,7 @@ processors depend on what atoms they currently own, and atoms migrate
between processor, there is no guarantee that the same index will be
used for the same info (e.g. a particular bond) in successive
snapshots.</p>
<p>The <em>c_ID</em> and <em>c_ID[N]</em> attributes allow local vectors or arrays
<p>The <em>c_ID</em> and <em>c_ID[I]</em> attributes allow local vectors or arrays
calculated by a <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
@ -552,19 +575,23 @@ opposed to local quantities, cannot be output in a dump local command.
Instead, global quantities can be output by the <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style custom</span></a> command, and per-atom quantities can be
output by the dump custom command.</p>
<p>If <em>c_ID</em> is used as a attribute, then the local vector calculated by
the compute is printed. If <em>c_ID[N]</em> is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the compute.</p>
<p>The <em>f_ID</em> and <em>f_ID[N]</em> attributes allow local vectors or arrays
the compute is printed. If <em>c_ID[I]</em> is used, then I must be in the
range from 1-M, which will print the Ith column of the local array
with M columns calculated by the compute. See the discussion above
for how I can be specified with a wildcard asterisk to effectively
specify multiple values.</p>
<p>The <em>f_ID</em> and <em>f_ID[I]</em> attributes allow local vectors or arrays
calculated by a <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> to be output. The ID in the attribute
should be replaced by the actual ID of the fix that has been defined
previously in the input script.</p>
<p>If <em>f_ID</em> is used as a attribute, then the local vector calculated by
the fix is printed. If <em>f_ID[N]</em> is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the fix.</p>
<p>Here is an example of how to dump bond info for a system,
including the distance and energy of each bond:</p>
the fix is printed. If <em>f_ID[I]</em> is used, then I must be in the
range from 1-M, which will print the Ith column of the local with M
columns calculated by the fix. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.</p>
<p>Here is an example of how to dump bond info for a system, including
the distance and energy of each bond:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">local</span> <span class="n">batom1</span> <span class="n">batom2</span> <span class="n">btype</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">bond</span><span class="o">/</span><span class="n">local</span> <span class="n">dist</span> <span class="n">eng</span>
<span class="n">dump</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">local</span> <span class="mi">1000</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span> <span class="n">index</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">c_2</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_2</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
@ -627,7 +654,7 @@ the <em>ellipsoid</em> atom style defines this quantity.</p>
<p>The <em>tqx</em>, <em>tqy</em>, <em>tqz</em> attributes are for finite-size particles that
can sustain a rotational torque due to interactions with other
particles.</p>
<p>The <em>c_ID</em> and <em>c_ID[N]</em> attributes allow per-atom vectors or arrays
<p>The <em>c_ID</em> and <em>c_ID[I]</em> attributes allow per-atom vectors or arrays
calculated by a <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
@ -640,10 +667,12 @@ command. Instead, global quantities can be output by the
<a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style custom</span></a> command, and local quantities
can be output by the dump local command.</p>
<p>If <em>c_ID</em> is used as a attribute, then the per-atom vector calculated
by the compute is printed. If <em>c_ID[N]</em> is used, then N must be in
the range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the compute.</p>
<p>The <em>f_ID</em> and <em>f_ID[N]</em> attributes allow vector or array per-atom
by the compute is printed. If <em>c_ID[I]</em> is used, then I must be in
the range from 1-M, which will print the Ith column of the per-atom
array with M columns calculated by the compute. See the discussion
above for how I can be specified with a wildcard asterisk to
effectively specify multiple values.</p>
<p>The <em>f_ID</em> and <em>f_ID[I]</em> attributes allow vector or array per-atom
quantities calculated by a <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> to be output. The ID in the
attribute should be replaced by the actual ID of the fix that has been
defined previously in the input script. The <a class="reference internal" href="fix_ave_atom.html"><span class="doc">fix ave/atom</span></a> command is one that calculates per-atom
@ -652,9 +681,11 @@ any <a class="reference internal" href="compute.html"><span class="doc">compute<
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a>, this allows those time-averaged results to
be written to a dump file.</p>
<p>If <em>f_ID</em> is used as a attribute, then the per-atom vector calculated
by the fix is printed. If <em>f_ID[N]</em> is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the fix.</p>
by the fix is printed. If <em>f_ID[I]</em> is used, then I must be in the
range from 1-M, which will print the Ith column of the per-atom array
with M columns calculated by the fix. See the discussion above for
how I can be specified with a wildcard asterisk to effectively specify
multiple values.</p>
<p>The <em>v_name</em> attribute allows per-atom vectors calculated by a
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a> to be output. The name in the attribute
should be replaced by the actual name of the variable that has been

View File

@ -142,9 +142,9 @@ one or more input values can be listed</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">,</span><span class="n">vx</span><span class="p">,</span><span class="n">vy</span><span class="p">,</span><span class="n">vz</span><span class="p">,</span><span class="n">fx</span><span class="p">,</span><span class="n">fy</span><span class="p">,</span><span class="n">fz</span> <span class="o">=</span> <span class="n">atom</span> <span class="n">attribute</span> <span class="p">(</span><span class="n">position</span><span class="p">,</span> <span class="n">velocity</span><span class="p">,</span> <span class="n">force</span> <span class="n">component</span><span class="p">)</span>
<span class="n">c_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">atom</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
@ -153,6 +153,7 @@ one or more input values can be listed</li>
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">1</span> <span class="mi">100</span> <span class="mi">100</span> <span class="n">vx</span> <span class="n">vy</span> <span class="n">vz</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">10</span> <span class="mi">20</span> <span class="mi">1000</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">10</span> <span class="mi">20</span> <span class="mi">1000</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
</pre></div>
</div>
</div>
@ -171,13 +172,33 @@ component) or can be the result of a <a class="reference internal" href="compute
variable must produce a per-atom vector, not a global quantity or
local quantity. If you wish to time-average global quantities from a
compute, fix, or variable, then see the <a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a> command.</p>
<p>Each per-atom value of each input vector is averaged independently.</p>
<p><a class="reference internal" href="compute.html"><span class="doc">Computes</span></a> that produce per-atom vectors or arrays are
those which have the word <em>atom</em> in their style name. See the doc
pages for individual <a class="reference internal" href="fix.html"><span class="doc">fixes</span></a> to determine which ones produce
per-atom vectors or arrays. <a class="reference internal" href="variable.html"><span class="doc">Variables</span></a> of style <em>atom</em>
are the only ones that can be used with this fix since they produce
per-atom vectors.</p>
<p>Each per-atom value of each input vector is averaged independently.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).</p>
<p>Using a wildcard is the same as if the individual columns of the array
had been listed one by one. E.g. these 2 fix ave/atom commands are
equivalent, since the <span class="xref doc">compute stress/atom</span>
command creates a per-atom array with 6 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">my_stress</span> <span class="nb">all</span> <span class="n">stress</span><span class="o">/</span><span class="n">atom</span> <span class="n">NULL</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">10</span> <span class="mi">20</span> <span class="mi">1000</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">10</span> <span class="mi">20</span> <span class="mi">1000</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">c_my_stress</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">c_my_stress</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
</pre></div>
</div>
<hr class="docutils" />
<p>The <em>Nevery</em>, <em>Nrepeat</em>, and <em>Nfreq</em> arguments specify on what
timesteps the input values will be used in order to contribute to the
@ -212,7 +233,9 @@ previously defined in the input script. If no bracketed term is
appended, the per-atom vector calculated by the compute is used. If a
bracketed term containing an index I is appended, the Ith column of
the per-atom array calculated by the compute is used. Users can also
write code for their own compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
write code for their own compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.</p>
<p>If a value begins with &#8220;<a href="#id3"><span class="problematic" id="id4">f_</span></a>&#8221;, a fix ID must follow which has been
previously defined in the input script. If no bracketed term is
appended, the per-atom vector calculated by the fix is used. If a
@ -220,7 +243,9 @@ bracketed term containing an index I is appended, the Ith column of
the per-atom array calculated by the fix is used. Note that some
fixes only produce their values on certain timesteps, which must be
compatible with <em>Nevery</em>, else an error will result. Users can also
write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.</p>
<p>If a value begins with &#8220;<a href="#id5"><span class="problematic" id="id6">v_</span></a>&#8221;, a variable name must follow which has
been previously defined in the input script as an <a class="reference internal" href="variable.html"><span class="doc">atom-style variable</span></a> Variables of style <em>atom</em> can reference
thermodynamic keywords, or invoke other computes, fixes, or variables

View File

@ -145,9 +145,9 @@
<span class="n">density</span><span class="o">/</span><span class="n">number</span><span class="p">,</span> <span class="n">density</span><span class="o">/</span><span class="n">mass</span> <span class="o">=</span> <span class="n">number</span> <span class="ow">or</span> <span class="n">mass</span> <span class="n">density</span>
<span class="n">temp</span> <span class="o">=</span> <span class="n">temperature</span>
<span class="n">c_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">atom</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
@ -232,14 +232,32 @@ global quantity. Note that the <a class="reference internal" href="compute_prop
any attribute defined and stored by atoms. If you wish to
time-average global quantities from a compute, fix, or variable, then
see the <a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a> command.</p>
<p>The per-atom values of each input vector are summed and averaged
independently of the per-atom values in other input vectors.</p>
<p><a class="reference internal" href="compute.html"><span class="doc">Computes</span></a> that produce per-atom quantities are those
which have the word <em>atom</em> in their style name. See the doc pages for
individual <a class="reference internal" href="fix.html"><span class="doc">fixes</span></a> to determine which ones produce per-atom
quantities. <a class="reference internal" href="variable.html"><span class="doc">Variables</span></a> of style <em>atom</em> are the only
ones that can be used with this fix since all other styles of variable
produce global quantities.</p>
<p>The per-atom values of each input vector are summed and averaged
independently of the per-atom values in other input vectors.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).</p>
<p>Using a wildcard is the same as if the individual elements of the
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/chunk commands are equivalent, since the <span class="xref doc">compute property/atom</span> command creates, in this
case, a per-atom array with 3 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myAng</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">atom</span> <span class="mi">50</span> <span class="n">angmomx</span> <span class="n">angmomy</span> <span class="n">angmomz</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">chunk</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">cc1</span> <span class="n">c_myAng</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">angmom</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">chunk</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">cc1</span> <span class="n">c_myAng</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myAng</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myAng</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">angmom</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This fix works by creating an array of size <em>Nchunk</em> by Nvalues
@ -336,7 +354,9 @@ previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the compute is used. Users can also write code for
their own compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
their own compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.
See the discussion above for how I can be specified with a wildcard
asterisk to effectively specify multiple values.</p>
<p>If a value begins with &#8220;<a href="#id3"><span class="problematic" id="id4">f_</span></a>&#8221;, a fix ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the fix is used. If a
@ -344,7 +364,9 @@ bracketed integer is appended, the Ith column of the per-atom array
calculated by the fix is used. Note that some fixes only produce
their values on certain timesteps, which must be compatible with
<em>Nevery</em>, else an error results. Users can also write code for their
own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the
discussion above for how I can be specified with a wildcard asterisk
to effectively specify multiple values.</p>
<p>If a value begins with &#8220;<a href="#id5"><span class="problematic" id="id6">v_</span></a>&#8221;, a variable name must follow which has
been previously defined in the input script. Variables of style
<em>atom</em> can reference thermodynamic keywords and various per-atom

View File

@ -141,9 +141,9 @@
<li>value = c_ID, c_ID[N], f_ID, f_ID[N], v_name</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">c_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="k">global</span> <span class="n">value</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">equal</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
<span class="n">v_name</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="n">a</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
@ -186,6 +186,7 @@
<span class="nb">type</span> <span class="n">upper</span> <span class="n">ave</span> <span class="n">running</span> <span class="n">title1</span> <span class="s2">&quot;My correlation data&quot;</span>
</pre></div>
</div>
<p>fix 1 all ave/correlate 1 50 10000 c_thermo_press[*]</p>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -208,6 +209,9 @@ you wish to spatial- or time-average or histogram per-atom quantities
from a compute, fix, or variable, then see the <a class="reference internal" href="fix_ave_chunk.html"><span class="doc">fix ave/chunk</span></a>, <a class="reference internal" href="fix_ave_atom.html"><span class="doc">fix ave/atom</span></a>, or
<a class="reference internal" href="fix_ave_histo.html"><span class="doc">fix ave/histo</span></a> commands. If you wish to convert a
per-atom quantity into a single global value, see the <a class="reference internal" href="compute_reduce.html"><span class="doc">compute reduce</span></a> command.</p>
<p>The input values must either be all scalars. What kinds of
correlations between input values are calculated is determined by the
<em>type</em> keyword as discussed below.</p>
<p><a class="reference internal" href="compute.html"><span class="doc">Computes</span></a> that produce global quantities are those which
do not have the word <em>atom</em> in their style name. Only a few
<a class="reference internal" href="fix.html"><span class="doc">fixes</span></a> produce global quantities. See the doc pages for
@ -215,9 +219,26 @@ individual fixes for info on which ones produce such values.
<a class="reference internal" href="variable.html"><span class="doc">Variables</span></a> of style <em>equal</em> and <em>vector</em> are the only
ones that can be used with this fix. Variables of style <em>atom</em> cannot
be used, since they produce per-atom values.</p>
<p>The input values must either be all scalars. What kinds of
correlations between input values are calculated is determined by the
<em>type</em> keyword as discussed below.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).</p>
<p>Using a wildcard is the same as if the individual elements of the
vector had been listed one by one. E.g. these 2 fix ave/correlate
commands are equivalent, since the <a class="reference internal" href="compute_pressure.html"><span class="doc">compute pressure</span></a> command creates a global vector with 6
values.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myPress</span> <span class="nb">all</span> <span class="n">pressure</span> <span class="n">NULL</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">correlate</span> <span class="mi">1</span> <span class="mi">50</span> <span class="mi">10000</span> <span class="n">c_myPress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">correlate</span> <span class="mi">1</span> <span class="mi">50</span> <span class="mi">10000</span> <span class="o">&amp;</span>
<span class="n">c_myPress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myPress</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myPress</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">c_myPress</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="n">c_myPress</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">c_myPress</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
</pre></div>
</div>
<hr class="docutils" />
<p>The <em>Nevery</em>, <em>Nrepeat</em>, and <em>Nfreq</em> arguments specify on what
timesteps the input values will be used to calculate correlation data.
@ -255,7 +276,9 @@ default, then <em>Nfreq</em> &gt;= (<em>Nrepeat</em>-1)*<em>Nevery</em> is requi
previously defined in the input script. If no bracketed term is
appended, the global scalar calculated by the compute is used. If a
bracketed term is appended, the Ith element of the global vector
calculated by the compute is used.</p>
calculated by the compute is used. See the discussion above for how I
can be specified with a wildcard asterisk to effectively specify
multiple values.</p>
<p>Note that there is a <a class="reference internal" href="compute_reduce.html"><span class="doc">compute reduce</span></a> command
which can sum per-atom quantities into a global scalar or vector which
can thus be accessed by fix ave/correlate. Or it can be a compute
@ -267,7 +290,9 @@ write code for their own compute styles and <a class="reference internal" href="
previously defined in the input script. If no bracketed term is
appended, the global scalar calculated by the fix is used. If a
bracketed term is appended, the Ith element of the global vector
calculated by the fix is used.</p>
calculated by the fix is used. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.</p>
<p>Note that some fixes only produce their values on certain timesteps,
which must be compatible with <em>Nevery</em>, else an error will result.
Users can also write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>

View File

@ -147,9 +147,9 @@
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">,</span><span class="n">vx</span><span class="p">,</span><span class="n">vy</span><span class="p">,</span><span class="n">vz</span><span class="p">,</span><span class="n">fx</span><span class="p">,</span><span class="n">fy</span><span class="p">,</span><span class="n">fz</span> <span class="o">=</span> <span class="n">atom</span> <span class="n">attribute</span> <span class="p">(</span><span class="n">position</span><span class="p">,</span> <span class="n">velocity</span><span class="p">,</span> <span class="n">force</span> <span class="n">component</span><span class="p">)</span>
<span class="n">c_ID</span> <span class="o">=</span> <span class="n">scalar</span> <span class="ow">or</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="n">scalar</span> <span class="ow">or</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">value</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">equal</span><span class="o">-</span><span class="n">style</span> <span class="ow">or</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="ow">or</span> <span class="n">atom</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
<span class="n">v_name</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
@ -187,6 +187,7 @@
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="mf">0.5</span> <span class="mf">1.5</span> <span class="mi">50</span> <span class="n">c_myTemp</span> <span class="n">file</span> <span class="n">temp</span><span class="o">.</span><span class="n">histo</span> <span class="n">ave</span> <span class="n">running</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="o">-</span><span class="mi">5</span> <span class="mi">5</span> <span class="mi">100</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">title1</span> <span class="s2">&quot;My output values&quot;</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="o">-</span><span class="mi">5</span> <span class="mi">5</span> <span class="mi">100</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">1</span> <span class="mi">100</span> <span class="mi">1000</span> <span class="o">-</span><span class="mf">2.0</span> <span class="mf">2.0</span> <span class="mi">18</span> <span class="n">vx</span> <span class="n">vy</span> <span class="n">vz</span> <span class="n">mode</span> <span class="n">vector</span> <span class="n">ave</span> <span class="n">running</span> <span class="n">beyond</span> <span class="n">extra</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span><span class="o">/</span><span class="n">weight</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">10</span> <span class="mi">100</span> <span class="mi">2000</span> <span class="n">c_XRD</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_XRD</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
</pre></div>
@ -194,9 +195,9 @@
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>Use one or more values as inputs every few timesteps, histogram them,
and average the histogram over longer timescales. The resulting
histogram can be used by other <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>, and can also be written to a
<p>Use one or more values as inputs every few timesteps to create a
single histogram. The histogram can then be averaged over longer
timescales. The resulting histogram can be used by other <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>, and can also be written to a
file. The fix ave/histo/weight command has identical syntax to fix
ave/histo, except that exactly two values must be specified. See
details below.</p>
@ -218,18 +219,33 @@ different kinds (e.g. global and per-atom) cannot be mixed. Atom
attributes are per-atom vector values. See the doc page for
individual &#8220;compute&#8221; and &#8220;fix&#8221; commands to see what kinds of
quantities they generate.</p>
<p>The input values must either be all scalars or all vectors (or
arrays), depending on the setting of the <em>mode</em> keyword.</p>
<p>Note that the output of this command is a single histogram for all
input values combined together, not one histogram per input value.
See below for details on the format of the output of this fix.</p>
<p>If <em>mode</em> = vector, then the input values may either be vectors or
arrays. If a global array is listed, then it is the same as if the
individual columns of the array had been listed one by one.
E.g. these 2 fix ave/histo commands are equivalent, since the <a class="reference internal" href="compute_com_chunk.html"><span class="doc">compute com/chunk</span></a> command creates a global array
with 3 columns:</p>
<p>The input values must either be all scalars or all vectors (or
arrays), depending on the setting of the <em>mode</em> keyword.</p>
<p>If <em>mode</em> = scalar, then the input values must be scalars, or vectors
with a bracketed term appended, indicating the Ith value of the vector
is used.</p>
<p>If <em>mode</em> = vector, then the input values must be vectors, or arrays
with a bracketed term appended, indicating the Ith column of the array
is used. All vectors must be the same length, which is the length of
the vector or number of rows in the array.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).</p>
<p>Using a wildcard is the same as if the individual elements of the
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/histo commands are equivalent, since the <a class="reference internal" href="compute_com_chunk.html"><span class="doc">compute com/chunk</span></a> command creates a global array with
3 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myCOM</span> <span class="nb">all</span> <span class="n">com</span><span class="o">/</span><span class="n">chunk</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myCOM</span> <span class="n">file</span> <span class="n">tmp1</span><span class="o">.</span><span class="n">com</span> <span class="n">mode</span> <span class="n">vector</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myCOM</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp1</span><span class="o">.</span><span class="n">com</span> <span class="n">mode</span> <span class="n">vector</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myCOM</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myCOM</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myCOM</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp2</span><span class="o">.</span><span class="n">com</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
@ -268,11 +284,11 @@ no bracketed term is appended, the global scalar calculated by the
compute is used. If a bracketed term is appended, the Ith element of
the global vector calculated by the compute is used. If <em>mode</em> =
vector, then if no bracketed term is appended, the global or per-atom
or local vector calculated by the compute is used. Or if the compute
calculates an array, all of the columns of the array are used as if
they had been specified as individual vectors (see description above).
If a bracketed term is appended, the Ith column of the global or
per-atom or local array calculated by the compute is used.</p>
or local vector calculated by the compute is used. If a bracketed
term is appended, the Ith column of the global or per-atom or local
array calculated by the compute is used. See the discussion above for
how I can be specified with a wildcard asterisk to effectively specify
multiple values.</p>
<p>Note that there is a <a class="reference internal" href="compute_reduce.html"><span class="doc">compute reduce</span></a> command
which can sum per-atom quantities into a global scalar or vector which
can thus be accessed by fix ave/histo. Or it can be a compute defined
@ -285,11 +301,11 @@ no bracketed term is appended, the global scalar calculated by the fix
is used. If a bracketed term is appended, the Ith element of the
global vector calculated by the fix is used. If <em>mode</em> = vector, then
if no bracketed term is appended, the global or per-atom or local
vector calculated by the fix is used. Or if the fix calculates an
array, all of the columns of the array are used as if they had been
specified as individual vectors (see description above). If a
bracketed term is appended, the Ith column of the global or per-atom
or local array calculated by the fix is used.</p>
vector calculated by the fix is used. If a bracketed term is
appended, the Ith column of the global or per-atom or local array
calculated by the fix is used. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.</p>
<p>Note that some fixes only produce their values on certain timesteps,
which must be compatible with <em>Nevery</em>, else an error will result.
Users can also write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>

View File

@ -140,10 +140,10 @@
<li>one or more input values can be listed</li>
<li>value = c_ID, c_ID[N], f_ID, f_ID[N], v_name</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">c_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span><span class="p">,</span> <span class="n">vector</span><span class="p">,</span> <span class="ow">or</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="k">global</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span><span class="p">,</span> <span class="n">vector</span><span class="p">,</span> <span class="ow">or</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="k">global</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">c_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="ow">or</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="k">global</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="ow">or</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="k">global</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">value</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">equal</span><span class="o">-</span><span class="n">style</span> <span class="ow">or</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
<span class="n">v_name</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
@ -182,6 +182,7 @@
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="n">c_myTemp</span> <span class="n">c_thermo_temp</span> <span class="n">file</span> <span class="n">temp</span><span class="o">.</span><span class="n">profile</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">ave</span> <span class="n">window</span> <span class="mi">20</span> <span class="o">&amp;</span>
<span class="n">title1</span> <span class="s2">&quot;My output values&quot;</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">1</span> <span class="mi">100</span> <span class="mi">1000</span> <span class="n">f_indent</span> <span class="n">f_indent</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">file</span> <span class="n">temp</span><span class="o">.</span><span class="n">indent</span> <span class="n">off</span> <span class="mi">1</span>
</pre></div>
</div>
@ -213,20 +214,33 @@ individual fixes for info on which ones produce such values.
<a class="reference internal" href="variable.html"><span class="doc">Variables</span></a> of style <em>equal</em> and <em>vector</em> are the only
ones that can be used with this fix. Variables of style <em>atom</em> cannot
be used, since they produce per-atom values.</p>
<p>The input values must either be all scalars or all vectors (or
arrays), depending on the setting of the <em>mode</em> keyword. In both
cases, the averaging is performed independently on each input value.
I.e. each input scalar is averaged independently and each element of
each input vector (or array) is averaged independently.</p>
<p>If <em>mode</em> = vector, then the input values may either be vectors or
arrays and all must be the same &#8220;length&#8221;, which is the length of the
vector or number of rows in the array. If a global array is listed,
then it is the same as if the individual columns of the array had been
listed one by one. E.g. these 2 fix ave/time commands are equivalent,
since the <a class="reference internal" href="compute_rdf.html"><span class="doc">compute rdf</span></a> command creates, in this
case, a global array with 3 columns, each of length 50:</p>
<p>The input values must either be all scalars or all vectors depending
on the setting of the <em>mode</em> keyword. In both cases, the averaging is
performed independently on each input value. I.e. each input scalar
is averaged independently or each element of each input vector is
averaged independently.</p>
<p>If <em>mode</em> = scalar, then the input values must be scalars, or vectors
with a bracketed term appended, indicating the Ith value of the vector
is used.</p>
<p>If <em>mode</em> = vector, then the input values must be vectors, or arrays
with a bracketed term appended, indicating the Ith column of the array
is used. All vectors must be the same length, which is the length of
the vector or number of rows in the array.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).</p>
<p>Using a wildcard is the same as if the individual elements of the
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/time commands are equivalent, since the <a class="reference internal" href="compute_rdf.html"><span class="doc">compute rdf</span></a> command creates, in this case, a global array
with 3 columns, each of length 50:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myRDF</span> <span class="nb">all</span> <span class="n">rdf</span> <span class="mi">50</span> <span class="mi">1</span> <span class="mi">2</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myRDF</span> <span class="n">file</span> <span class="n">tmp1</span><span class="o">.</span><span class="n">rdf</span> <span class="n">mode</span> <span class="n">vector</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myRDF</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp1</span><span class="o">.</span><span class="n">rdf</span> <span class="n">mode</span> <span class="n">vector</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myRDF</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myRDF</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myRDF</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp2</span><span class="o">.</span><span class="n">rdf</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
@ -253,11 +267,10 @@ no bracketed term is appended, the global scalar calculated by the
compute is used. If a bracketed term is appended, the Ith element of
the global vector calculated by the compute is used. If <em>mode</em> =
vector, then if no bracketed term is appended, the global vector
calculated by the compute is used. Or if the compute calculates an
array, all of the columns of the global array are used as if they had
been specified as individual vectors (see description above). If a
bracketed term is appended, the Ith column of the global array
calculated by the compute is used.</p>
calculated by the compute is used. If a bracketed term is appended,
the Ith column of the global array calculated by the compute is used.
See the discussion above for how I can be specified with a wildcard
asterisk to effectively specify multiple values.</p>
<p>Note that there is a <a class="reference internal" href="compute_reduce.html"><span class="doc">compute reduce</span></a> command
which can sum per-atom quantities into a global scalar or vector which
can thus be accessed by fix ave/time. Or it can be a compute defined
@ -270,10 +283,10 @@ no bracketed term is appended, the global scalar calculated by the fix
is used. If a bracketed term is appended, the Ith element of the
global vector calculated by the fix is used. If <em>mode</em> = vector, then
if no bracketed term is appended, the global vector calculated by the
fix is used. Or if the fix calculates an array, all of the columns of
the global array are used as if they had been specified as individual
vectors (see description above). If a bracketed term is appended, the
Ith column of the global array calculated by the fix is used.</p>
fix is used. If a bracketed term is appended, the Ith column of the
global array calculated by the fix is used. See the discussion above
for how I can be specified with a wildcard asterisk to effectively
specify multiple values.</p>
<p>Note that some fixes only produce their values on certain timesteps,
which must be compatible with <em>Nevery</em>, else an error will result.
Users can also write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>

File diff suppressed because one or more lines are too long

View File

@ -196,10 +196,10 @@
cella,cellb,cellc = periodic cell lattice constants a,b,c
cellalpha, cellbeta, cellgamma = periodic cell angles alpha,beta,gamma
c_ID = global scalar value calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID, I can include wildcard (see below)
c_ID[I][J] = I,J component of global array calculated by a compute with ID
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] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below)
f_ID[I][J] = I,J component of global array calculated by a fix with ID
v_name = value calculated by an equal-style variable with name
v_name[I] = value calculated by a vector-style variable with name
@ -210,6 +210,7 @@
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">thermo_style</span> <span class="n">multi</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">pe</span> <span class="n">etotal</span> <span class="n">press</span> <span class="n">vol</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">etotal</span> <span class="n">c_myTemp</span> <span class="n">v_abc</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">etotal</span> <span class="n">c_myTemp</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">v_abc</span>
</pre></div>
</div>
</div>
@ -255,6 +256,28 @@ if your input script specifies a thermo_style command, you should use
the thermo_modify command after it.</p>
</div>
<hr class="docutils" />
<p>Note that for values from a compute or fix, the bracketed index I used
to index a vector, as in <em>c_ID[I]</em> or <em>f_ID[I]</em>, can be specified
using a wildcard asterisk with the index to effectively specify
multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or &#8220;m*n&#8221;.
If N = the size of the vector (for <em>mode</em> = scalar) or the number of
columns in the array (for <em>mode</em> = vector), then an asterisk with no
numeric values means all indices from 1 to N. A leading asterisk
means all indices from 1 to n (inclusive). A trailing asterisk means
all indices from n to N (inclusive). A middle asterisk means all
indices from m to n (inclusive).</p>
<p>Using a wildcard is the same as if the individual elements of the
vector had been listed one by one. E.g. these 2 thermo_style commands
are equivalent, since the <a class="reference internal" href="compute_temp.html"><span class="doc">compute temp</span></a> command
creates a global vector with 6 values.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myTemp</span> <span class="nb">all</span> <span class="n">temp</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">etotal</span> <span class="n">c_myTemp</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">etotal</span> <span class="o">&amp;</span>
<span class="n">c_myTemp</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myTemp</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myTemp</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">c_myTemp</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="n">c_myTemp</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">c_myTemp</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
</pre></div>
</div>
<hr class="docutils" />
<p>Several of the thermodynamic quantities require a temperature to be
computed: &#8220;temp&#8221;, &#8220;press&#8221;, &#8220;ke&#8221;, &#8220;etotal&#8221;, &#8220;enthalpy&#8221;, &#8220;pxx&#8221;, etc. By
default this is done by using a <em>temperature</em> compute which is created
@ -394,9 +417,12 @@ of these quantities in terms of the internal LAMMPS cell dimensions
values calculated by a compute to be output. As discussed on the
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a> doc page, computes can calculate global,
per-atom, or local values. Only global values can be referenced by
this command. However, per-atom compute values can be referenced in a
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a> and the variable referenced by thermo_style
custom, as discussed below.</p>
this command. However, per-atom compute values for an individual atom
can be referenced in a <a class="reference internal" href="variable.html"><span class="doc">variable</span></a> and the variable
referenced by thermo_style custom, as discussed below. See the
discussion above for how the I in <em>c_ID[I]</em> can be specified with a
wildcard asterisk to effectively specify multiple values from a global
compute vector.</p>
<p>The ID in the keyword should be replaced by the actual ID of a compute
that has been defined elsewhere in the input script. See the
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a> command for details. If the compute calculates
@ -413,9 +439,11 @@ the compute group) when output, depending on the <a class="reference internal" h
values calculated by a fix to be output. As discussed on the
<a class="reference internal" href="fix.html"><span class="doc">fix</span></a> doc page, fixes can calculate global, per-atom, or
local values. Only global values can be referenced by this command.
However, per-atom fix values can be referenced in a
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a> and the variable referenced by thermo_style
custom, as discussed below.</p>
However, per-atom fix values can be referenced for an individual atom
in a <a class="reference internal" href="variable.html"><span class="doc">variable</span></a> and the variable referenced by
thermo_style custom, as discussed below. See the discussion above for
how the I in <em>f_ID[I]</em> can be specified with a wildcard asterisk to
effectively specify multiple values from a global fix vector.</p>
<p>The ID in the keyword should be replaced by the actual ID of a fix
that has been defined elsewhere in the input script. See the
<a class="reference internal" href="fix.html"><span class="doc">fix</span></a> command for details. If the fix calculates a global
@ -434,11 +462,14 @@ 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 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 <a class="reference internal" href="variable.html"><span class="doc">variable</span></a> command
for details. Variables of style <em>equal</em> and <em>vector</em> 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.</p>
calculated by the variable. However, an atom-style variable can be
referenced for an individual atom by an equal-style variable and that
variable referenced. See the <a class="reference internal" href="variable.html"><span class="doc">variable</span></a> command for
details. Variables of style <em>equal</em> and <em>vector</em> and <em>atom</em> 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.</p>
<p>Note that equal-style and vector-style variables are assumed to
produce &#8220;intensive&#8221; global quantities, which are thus printed as-is,
without normalization by thermo_style custom. You can include a

View File

@ -23,9 +23,9 @@ one or more inputs can be listed :l
input = x, y, z, vx, vy, vz, fx, fy, fz, c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :l
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (position, velocity, force component)
c_ID = per-atom or local vector calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom or local array calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom or local array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom or local vector calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom or local array calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom or local array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name :pre
zero or more keyword/args pairs may be appended :l
@ -40,6 +40,7 @@ keyword = {replace} :l
compute 1 all reduce sum c_force
compute 1 all reduce/region subbox sum c_force
compute 2 all reduce min c_press\[2\] f_ave v_myKE
compute 2 all reduce min c_press\[*\] f_ave v_myKE
compute 3 fluid reduce max c_index\[1\] c_index\[2\] c_dist replace 1 3 replace 2 3 :pre
[Description:]
@ -80,6 +81,28 @@ component) or can be the result of a "compute"_compute.html or
"fix"_fix.html or the evaluation of an atom-style
"variable"_variable.html.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for {mode} = scalar) or the
number of columns in the array (for {mode} = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual columns of the array
had been listed one by one. E.g. these 2 compute reduce commands are
equivalent, since the "compute stress/atom"_compute_stress/atom.html
command creates a per-atom array with 6 columns:
compute myPress all stress/atom NULL
compute 2 all reduce min myPress\[*\]
compute 2 all reduce min myPress\[1\] myPress\[2\] myPress\[3\] &
myPress\[4\] myPress\[5\] myPress\[6\] :pre
:line
The atom attribute values (x,y,z,vx,vy,vz,fx,fy,fz) are
self-explanatory. Note that other atom attributes can be used as
inputs to this fix by using the "compute
@ -93,7 +116,9 @@ per-atom or local quantities. See the individual
is appended, the vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the array calculated
by the compute is used. Users can also write code for their own
compute styles and "add them to LAMMPS"_Section_modify.html.
compute styles and "add them to LAMMPS"_Section_modify.html. See the
discussion above for how I can be specified with a wildcard asterisk
to effectively specify multiple values.
If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. Fixes can generate per-atom
@ -104,7 +129,9 @@ references the values, else an error results. If no bracketed integer
is 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 "add
them to LAMMPS"_Section_modify.html.
them to LAMMPS"_Section_modify.html. See the discussion above for how
I can be specified with a wildcard asterisk to effectively specify
multiple values.
If a value begins with "v_", a variable name must follow which has
been previously defined in the input script. It must be an

View File

@ -46,12 +46,12 @@ args = list of arguments for a particular style :l
{molfile} args = discussed on "dump molfile"_dump_molfile.html doc page :pre
{local} args = list of local attributes
possible attributes = index, c_ID, c_ID\[N\], f_ID, f_ID\[N\]
possible attributes = index, c_ID, c_ID\[I\], f_ID, f_ID\[I\]
index = enumeration of local values
c_ID = local vector calculated by a compute with ID
c_ID\[N\] = Nth column of local array calculated by a compute with ID
c_ID\[I\] = Ith column of local array calculated by a compute with ID, I can include wildcard (see below)
f_ID = local vector calculated by a fix with ID
f_ID\[N\] = Nth column of local array calculated by a fix with ID :pre
f_ID\[I\] = Ith column of local array calculated by a fix with ID, I can include wildcard (see below) :pre
{custom} or {custom/gz} or {custom/mpiio} args = list of atom attributes
possible attributes = id, mol, proc, procp1, type, element, mass,
@ -85,9 +85,9 @@ args = list of arguments for a particular style :l
angmomx,angmomy,angmomz = angular momentum of aspherical particle
tqx,tqy,tqz = torque on finite-size particles
c_ID = per-atom vector calculated by a compute with ID
c_ID\[N\] = Nth column of per-atom array calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID\[N\] = Nth column of per-atom array calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
d_name = per-atom floating point vector with name, managed by fix property/atom
i_name = per-atom integer vector with name, managed by fix property/atom :pre
@ -102,6 +102,7 @@ dump 2 subgroup atom 50 dump.run.bin
dump 2 subgroup atom 50 dump.run.mpiio.bin
dump 4a all custom 100 dump.myforce.* id type x y vx fx
dump 4b flow custom 100 dump.%.myforce id type c_myF\[3\] v_ke
dump 4b flow custom 100 dump.%.myforce id type c_myF\[*\] v_ke
dump 2 inner cfg 10 dump.snap.*.cfg mass type xs ys zs vx vy vz
dump snap all cfg 100 dump.config.*.cfg mass type xs ys zs id type c_Stress\[2\]
dump 1 all xtc 1000 file.xtc :pre
@ -418,6 +419,30 @@ styles.
:line
Note that in the discussion which follows, for styles which can
reference values from a compute or fix, like the {custom}, {cfg}, or
{local} styles, the bracketed index I can be specified using a
wildcard asterisk with the index to effectively specify multiple
values. This takes the form "*" or "*n" or "n*" or "m*n". If N = the
size of the vector (for {mode} = scalar) or the number of columns in
the array (for {mode} = vector), then an asterisk with no numeric
values means all indices from 1 to N. A leading asterisk means all
indices from 1 to n (inclusive). A trailing asterisk means all
indices from n to N (inclusive). A middle asterisk means all indices
from m to n (inclusive).
Using a wildcard is the same as if the individual columns of the array
had been listed one by one. E.g. these 2 dump commands are
equivalent, since the "compute stress/atom"_compute_stress/atom.html
command creates a per-atom array with 6 columns:
compute myPress all stress/atom NULL
dump 2 all custom 100 tmp.dump id myPress\[*\]
dump 2 all custom 100 tmp.dump id myPress\[1\] myPress\[2\] myPress\[3\] &
myPress\[4\] myPress\[5\] myPress\[6\] :pre
:line
This section explains the local attributes that can be specified as
part of the {local} style.
@ -430,7 +455,7 @@ between processor, there is no guarantee that the same index will be
used for the same info (e.g. a particular bond) in successive
snapshots.
The {c_ID} and {c_ID\[N\]} attributes allow local vectors or arrays
The {c_ID} and {c_ID\[I\]} attributes allow local vectors or arrays
calculated by a "compute"_compute.html to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
@ -445,22 +470,26 @@ custom"_thermo_style.html command, and per-atom quantities can be
output by the dump custom command.
If {c_ID} is used as a attribute, then the local vector calculated by
the compute is printed. If {c_ID\[N\]} is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the compute.
the compute is printed. If {c_ID\[I\]} is used, then I must be in the
range from 1-M, which will print the Ith column of the local array
with M columns calculated by the compute. See the discussion above
for how I can be specified with a wildcard asterisk to effectively
specify multiple values.
The {f_ID} and {f_ID\[N\]} attributes allow local vectors or arrays
The {f_ID} and {f_ID\[I\]} attributes allow local vectors or arrays
calculated by a "fix"_fix.html to be output. The ID in the attribute
should be replaced by the actual ID of the fix that has been defined
previously in the input script.
If {f_ID} is used as a attribute, then the local vector calculated by
the fix is printed. If {f_ID\[N\]} is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the fix.
the fix is printed. If {f_ID\[I\]} is used, then I must be in the
range from 1-M, which will print the Ith column of the local with M
columns calculated by the fix. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
Here is an example of how to dump bond info for a system,
including the distance and energy of each bond:
Here is an example of how to dump bond info for a system, including
the distance and energy of each bond:
compute 1 all property/local batom1 batom2 btype
compute 2 all bond/local dist eng
@ -536,7 +565,7 @@ The {tqx}, {tqy}, {tqz} attributes are for finite-size particles that
can sustain a rotational torque due to interactions with other
particles.
The {c_ID} and {c_ID\[N\]} attributes allow per-atom vectors or arrays
The {c_ID} and {c_ID\[I\]} attributes allow per-atom vectors or arrays
calculated by a "compute"_compute.html to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
@ -551,11 +580,13 @@ command. Instead, global quantities can be output by the
can be output by the dump local command.
If {c_ID} is used as a attribute, then the per-atom vector calculated
by the compute is printed. If {c_ID\[N\]} is used, then N must be in
the range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the compute.
by the compute is printed. If {c_ID\[I\]} is used, then I must be in
the range from 1-M, which will print the Ith column of the per-atom
array with M columns calculated by the compute. See the discussion
above for how I can be specified with a wildcard asterisk to
effectively specify multiple values.
The {f_ID} and {f_ID\[N\]} attributes allow vector or array per-atom
The {f_ID} and {f_ID\[I\]} attributes allow vector or array per-atom
quantities calculated by a "fix"_fix.html to be output. The ID in the
attribute should be replaced by the actual ID of the fix that has been
defined previously in the input script. The "fix
@ -566,9 +597,11 @@ any "compute"_compute.html, "fix"_fix.html, or atom-style
be written to a dump file.
If {f_ID} is used as a attribute, then the per-atom vector calculated
by the fix is printed. If {f_ID\[N\]} is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the fix.
by the fix is printed. If {f_ID\[I\]} is used, then I must be in the
range from 1-M, which will print the Ith column of the per-atom array
with M columns calculated by the fix. See the discussion above for
how I can be specified with a wildcard asterisk to effectively specify
multiple values.
The {v_name} attribute allows per-atom vectors calculated by a
"variable"_variable.html to be output. The name in the attribute

View File

@ -21,16 +21,17 @@ one or more input values can be listed :l
value = x, y, z, vx, vy, vz, fx, fy, fz, c_ID, c_ID\[i\], f_ID, f_ID\[i\], v_name :l
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (position, velocity, force component)
c_ID = per-atom vector calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name :pre
:ule
[Examples:]
fix 1 all ave/atom 1 100 100 vx vy vz
fix 1 all ave/atom 10 20 1000 c_my_stress\[1\] :pre
fix 1 all ave/atom 10 20 1000 c_my_stress\[1\]
fix 1 all ave/atom 10 20 1000 c_my_stress\[*\] :pre
[Description:]
@ -53,6 +54,8 @@ local quantity. If you wish to time-average global quantities from a
compute, fix, or variable, then see the "fix
ave/time"_fix_ave_time.html command.
Each per-atom value of each input vector is averaged independently.
"Computes"_compute.html that produce per-atom vectors or arrays are
those which have the word {atom} in their style name. See the doc
pages for individual "fixes"_fix.html to determine which ones produce
@ -60,7 +63,26 @@ per-atom vectors or arrays. "Variables"_variable.html of style {atom}
are the only ones that can be used with this fix since they produce
per-atom vectors.
Each per-atom value of each input vector is averaged independently.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for {mode} = scalar) or the
number of columns in the array (for {mode} = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual columns of the array
had been listed one by one. E.g. these 2 fix ave/atom commands are
equivalent, since the "compute stress/atom"_compute_stress/atom.html
command creates a per-atom array with 6 columns:
compute my_stress all stress/atom NULL
fix 1 all ave/atom 10 20 1000 c_my_stress\[*\]
fix 1 all ave/atom 10 20 1000 c_my_stress\[1\] c_my_stress\[1\] &
c_my_stress\[3\] c_my_stress\[4\] &
c_my_stress\[5\] c_my_stress\[6\] :pre
:line
@ -102,7 +124,9 @@ appended, the per-atom vector calculated by the compute is used. If a
bracketed term containing an index I is appended, the Ith column of
the per-atom array calculated by the compute is used. Users can also
write code for their own compute styles and "add them to
LAMMPS"_Section_modify.html.
LAMMPS"_Section_modify.html. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed term is
@ -112,7 +136,9 @@ the per-atom array calculated by the fix is used. Note that some
fixes only produce their values on certain timesteps, which must be
compatible with {Nevery}, else an error will result. Users can also
write code for their own fix styles and "add them to
LAMMPS"_Section_modify.html.
LAMMPS"_Section_modify.html. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
If a value begins with "v_", a variable name must follow which has
been previously defined in the input script as an "atom-style

View File

@ -24,9 +24,9 @@ value = vx, vy, vz, fx, fy, fz, density/mass, density/number, temp, c_ID, c_ID\[
density/number, density/mass = number or mass density
temp = temperature
c_ID = per-atom vector calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name :pre
zero or more keyword/arg pairs may be appended :l
@ -118,6 +118,9 @@ any attribute defined and stored by atoms. If you wish to
time-average global quantities from a compute, fix, or variable, then
see the "fix ave/time"_fix_ave_time.html command.
The per-atom values of each input vector are summed and averaged
independently of the per-atom values in other input vectors.
"Computes"_compute.html that produce per-atom quantities are those
which have the word {atom} in their style name. See the doc pages for
individual "fixes"_fix.html to determine which ones produce per-atom
@ -125,8 +128,25 @@ quantities. "Variables"_variable.html of style {atom} are the only
ones that can be used with this fix since all other styles of variable
produce global quantities.
The per-atom values of each input vector are summed and averaged
independently of the per-atom values in other input vectors.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for {mode} = scalar) or the
number of columns in the array (for {mode} = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/chunk commands are equivalent, since the "compute
property/atom"_compute_property/atom.html command creates, in this
case, a per-atom array with 3 columns:
compute myAng all property/atom 50 angmomx angmomy angmomz
fix 1 all ave/chunk 100 1 100 cc1 c_myAng\[*\] file tmp.angmom
fix 2 all ave/chunk 100 1 100 cc1 c_myAng\[1\] c_myAng\[2\] c_myAng\[3\] file tmp.angmom :pre
NOTE: This fix works by creating an array of size {Nchunk} by Nvalues
on each processor. {Nchunk} is the number of chunks which is defined
@ -237,6 +257,8 @@ appended, the per-atom vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the compute is used. Users can also write code for
their own compute styles and "add them to LAMMPS"_Section_modify.html.
See the discussion above for how I can be specified with a wildcard
asterisk to effectively specify multiple values.
If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed integer is
@ -245,7 +267,9 @@ bracketed integer is appended, the Ith column of the per-atom array
calculated by the fix is used. Note that some fixes only produce
their values on certain timesteps, which must be compatible with
{Nevery}, else an error results. Users can also write code for their
own fix styles and "add them to LAMMPS"_Section_modify.html.
own fix styles and "add them to LAMMPS"_Section_modify.html. See the
discussion above for how I can be specified with a wildcard asterisk
to effectively specify multiple values.
If a value begins with "v_", a variable name must follow which has
been previously defined in the input script. Variables of style

View File

@ -20,9 +20,9 @@ Nfreq = calculate time window averages every this many timesteps :l
one or more input values can be listed :l
value = c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :l
c_ID = global scalar calculated by a compute with ID
c_ID\[I\] = Ith component of global vector calculated by a compute with ID
c_ID\[I\] = Ith component of global vector calculated by a compute with ID, I can include wildcard (see below)
f_ID = global scalar calculated by a fix with ID
f_ID\[I\] = Ith component of global vector calculated by a fix with ID
f_ID\[I\] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below)
v_name = global value calculated by an equal-style variable with name
v_name\[I\] = Ith component of a vector-style variable with name :pre
@ -59,6 +59,7 @@ fix 1 all ave/correlate 5 100 1000 c_myTemp file temp.correlate
fix 1 all ave/correlate 1 50 10000 &
c_thermo_press\[1\] c_thermo_press\[2\] c_thermo_press\[3\] &
type upper ave running title1 "My correlation data" :pre
fix 1 all ave/correlate 1 50 10000 c_thermo_press\[*\]
[Description:]
@ -88,6 +89,10 @@ ave/chunk"_fix_ave_chunk.html, "fix ave/atom"_fix_ave_atom.html, or
per-atom quantity into a single global value, see the "compute
reduce"_compute_reduce.html command.
The input values must either be all scalars. What kinds of
correlations between input values are calculated is determined by the
{type} keyword as discussed below.
"Computes"_compute.html that produce global quantities are those which
do not have the word {atom} in their style name. Only a few
"fixes"_fix.html produce global quantities. See the doc pages for
@ -96,9 +101,27 @@ individual fixes for info on which ones produce such values.
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
{type} keyword as discussed below.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for {mode} = scalar) or the
number of columns in the array (for {mode} = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector had been listed one by one. E.g. these 2 fix ave/correlate
commands are equivalent, since the "compute
pressure"_compute_pressure.html command creates a global vector with 6
values.
compute myPress all pressure NULL
fix 1 all ave/correlate 1 50 10000 c_myPress\[*\]
fix 1 all ave/correlate 1 50 10000 &
c_myPress\[1\] c_myPress\[2\] c_myPress\[3\] &
c_myPress\[4\] c_myPress\[5\] c_myPress\[6\] :pre
:line
@ -141,7 +164,9 @@ If a value begins with "c_", a compute ID must follow which has been
previously defined in the input script. If no bracketed term is
appended, the global scalar calculated by the compute is used. If a
bracketed term is appended, the Ith element of the global vector
calculated by the compute is used.
calculated by the compute is used. See the discussion above for how I
can be specified with a wildcard asterisk to effectively specify
multiple values.
Note that there is a "compute reduce"_compute_reduce.html command
which can sum per-atom quantities into a global scalar or vector which
@ -151,13 +176,15 @@ output"_thermo_style.html or other fixes such as "fix nvt"_fix_nh.html
or "fix temp/rescale"_fix_temp_rescale.html. See the doc pages for
these commands which give the IDs of these computes. Users can also
write code for their own compute styles and "add them to
LAMMPS"_Section_modify.html.
LAMMPS"_Section_modify.html.
If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed term is
appended, the global scalar calculated by the fix is used. If a
bracketed term is appended, the Ith element of the global vector
calculated by the fix is used.
calculated by the fix is used. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
Note that some fixes only produce their values on certain timesteps,
which must be compatible with {Nevery}, else an error will result.

View File

@ -24,9 +24,9 @@ one or more input values can be listed :l
value = x, y, z, vx, vy, vz, fx, fy, fz, c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :l
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (position, velocity, force component)
c_ID = scalar or vector calculated by a compute with ID
c_ID\[I\] = Ith component of vector or Ith column of array calculated by a compute with ID
c_ID\[I\] = Ith component of vector or Ith column of array calculated by a compute with ID, I can include wildcard (see below)
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
f_ID\[I\] = Ith component of vector or Ith column of array calculated by a fix with ID, I can include wildcard (see below)
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 :pre
@ -60,14 +60,15 @@ keyword = {mode} or {file} or {ave} or {start} or {beyond} or {overwrite} or {ti
fix 1 all ave/histo 100 5 1000 0.5 1.5 50 c_myTemp file temp.histo ave running
fix 1 all ave/histo 100 5 1000 -5 5 100 c_thermo_press\[2\] c_thermo_press\[3\] title1 "My output values"
fix 1 all ave/histo 100 5 1000 -5 5 100 c_thermo_press\[*\]
fix 1 all ave/histo 1 100 1000 -2.0 2.0 18 vx vy vz mode vector ave running beyond extra
fix 1 all ave/histo/weight 1 1 1 10 100 2000 c_XRD\[1\] c_XRD\[2\] :pre
[Description:]
Use one or more values as inputs every few timesteps, histogram them,
and average the histogram over longer timescales. The resulting
histogram can be used by other "output
Use one or more values as inputs every few timesteps to create a
single histogram. The histogram can then be averaged over longer
timescales. The resulting histogram can be used by other "output
commands"_Section_howto.html#howto_15, and can also be written to a
file. The fix ave/histo/weight command has identical syntax to fix
ave/histo, except that exactly two values must be specified. See
@ -94,22 +95,40 @@ 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.
Note that the output of this command is a single histogram for all
input values combined together, not one histogram per input value.
See below for details on the format of the output of this fix.
If {mode} = vector, then the input values may either be vectors or
arrays. If a global array is listed, then it is the same as if the
individual columns of the array had been listed one by one.
E.g. these 2 fix ave/histo commands are equivalent, since the "compute
com/chunk"_compute_com_chunk.html command creates a global array
with 3 columns:
The input values must either be all scalars or all vectors (or
arrays), depending on the setting of the {mode} keyword.
If {mode} = scalar, then the input values must be scalars, or vectors
with a bracketed term appended, indicating the Ith value of the vector
is used.
If {mode} = vector, then the input values must be vectors, or arrays
with a bracketed term appended, indicating the Ith column of the array
is used. All vectors must be the same length, which is the length of
the vector or number of rows in the array.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for {mode} = scalar) or the
number of columns in the array (for {mode} = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/histo commands are equivalent, since the "compute
com/chunk"_compute_com_chunk.html command creates a global array with
3 columns:
compute myCOM all com/chunk
fix 1 all ave/histo 100 1 100 c_myCOM file tmp1.com mode vector
fix 1 all ave/histo 100 1 100 c_myCOM\[*\] file tmp1.com mode vector
fix 2 all ave/histo 100 1 100 c_myCOM\[1\] c_myCOM\[2\] c_myCOM\[3\] file tmp2.com mode vector :pre
If the fix ave/histo/weight command is used, exactly two values must
@ -154,11 +173,11 @@ no bracketed term is appended, the global scalar calculated by the
compute is used. If a bracketed term is appended, the Ith element of
the global vector calculated by the compute is used. If {mode} =
vector, then if no bracketed term is appended, the global or per-atom
or local vector calculated by the compute is used. Or if the compute
calculates an array, all of the columns of the array are used as if
they had been specified as individual vectors (see description above).
If a bracketed term is appended, the Ith column of the global or
per-atom or local array calculated by the compute is used.
or local vector calculated by the compute is used. If a bracketed
term is appended, the Ith column of the global or per-atom or local
array calculated by the compute is used. See the discussion above for
how I can be specified with a wildcard asterisk to effectively specify
multiple values.
Note that there is a "compute reduce"_compute_reduce.html command
which can sum per-atom quantities into a global scalar or vector which
@ -176,11 +195,11 @@ no bracketed term is appended, the global scalar calculated by the fix
is used. If a bracketed term is appended, the Ith element of the
global vector calculated by the fix is used. If {mode} = vector, then
if no bracketed term is appended, the global or per-atom or local
vector calculated by the fix is used. Or if the fix calculates an
array, all of the columns of the array are used as if they had been
specified as individual vectors (see description above). If a
bracketed term is appended, the Ith column of the global or per-atom
or local array calculated by the fix is used.
vector calculated by the fix is used. If a bracketed term is
appended, the Ith column of the global or per-atom or local array
calculated by the fix is used. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.
Note that some fixes only produce their values on certain timesteps,
which must be compatible with {Nevery}, else an error will result.

View File

@ -19,10 +19,10 @@ Nrepeat = # of times to use input values for calculating averages :l
Nfreq = calculate averages every this many timesteps :l
one or more input values can be listed :l
value = c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :l
c_ID = global scalar, vector, or array calculated by a compute with ID
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
c_ID = global scalar or vector calculated by a compute with ID
c_ID\[I\] = Ith component of global vector or Ith column of global array calculated by a compute with ID, I can include wildcard (see below)
f_ID = global scalar or vector 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, I can include wildcard (see below)
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 :pre
@ -57,6 +57,7 @@ keyword = {mode} or {file} or {ave} or {start} or {off} or {overwrite} or {title
fix 1 all ave/time 100 5 1000 c_myTemp c_thermo_temp file temp.profile
fix 1 all ave/time 100 5 1000 c_thermo_press\[2\] ave window 20 &
title1 "My output values"
fix 1 all ave/time 100 5 1000 c_thermo_press\[*\]
fix 1 all ave/time 1 100 1000 f_indent f_indent\[1\] file temp.indent off 1 :pre
[Description:]
@ -92,22 +93,39 @@ individual fixes for info on which ones produce such values.
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
cases, the averaging is performed independently on each input value.
I.e. each input scalar is averaged independently and each element of
each input vector (or array) is averaged independently.
The input values must either be all scalars or all vectors depending
on the setting of the {mode} keyword. In both cases, the averaging is
performed independently on each input value. I.e. each input scalar
is averaged independently or each element of each input vector is
averaged independently.
If {mode} = vector, then the input values may either be vectors or
arrays and all must be the same "length", which is the length of the
vector or number of rows in the array. If a global array is listed,
then it is the same as if the individual columns of the array had been
listed one by one. E.g. these 2 fix ave/time commands are equivalent,
since the "compute rdf"_compute_rdf.html command creates, in this
case, a global array with 3 columns, each of length 50:
If {mode} = scalar, then the input values must be scalars, or vectors
with a bracketed term appended, indicating the Ith value of the vector
is used.
If {mode} = vector, then the input values must be vectors, or arrays
with a bracketed term appended, indicating the Ith column of the array
is used. All vectors must be the same length, which is the length of
the vector or number of rows in the array.
Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form "*" or "*n" or "n*" or
"m*n". If N = the size of the vector (for {mode} = scalar) or the
number of columns in the array (for {mode} = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
asterisk means all indices from 1 to n (inclusive). A trailing
asterisk means all indices from n to N (inclusive). A middle asterisk
means all indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/time commands are equivalent, since the "compute
rdf"_compute_rdf.html command creates, in this case, a global array
with 3 columns, each of length 50:
compute myRDF all rdf 50 1 2
fix 1 all ave/time 100 1 100 c_myRDF file tmp1.rdf mode vector
fix 1 all ave/time 100 1 100 c_myRDF\[*\] file tmp1.rdf mode vector
fix 2 all ave/time 100 1 100 c_myRDF\[1\] c_myRDF\[2\] c_myRDF\[3\] file tmp2.rdf mode vector :pre
:line
@ -137,11 +155,10 @@ no bracketed term is appended, the global scalar calculated by the
compute is used. If a bracketed term is appended, the Ith element of
the global vector calculated by the compute is used. If {mode} =
vector, then if no bracketed term is appended, the global vector
calculated by the compute is used. Or if the compute calculates an
array, all of the columns of the global array are used as if they had
been specified as individual vectors (see description above). If a
bracketed term is appended, the Ith column of the global array
calculated by the compute is used.
calculated by the compute is used. If a bracketed term is appended,
the Ith column of the global array calculated by the compute is used.
See the discussion above for how I can be specified with a wildcard
asterisk to effectively specify multiple values.
Note that there is a "compute reduce"_compute_reduce.html command
which can sum per-atom quantities into a global scalar or vector which
@ -159,10 +176,10 @@ no bracketed term is appended, the global scalar calculated by the fix
is used. If a bracketed term is appended, the Ith element of the
global vector calculated by the fix is used. If {mode} = vector, then
if no bracketed term is appended, the global vector calculated by the
fix is used. Or if the fix calculates an array, all of the columns of
the global array are used as if they had been specified as individual
vectors (see description above). If a bracketed term is appended, the
Ith column of the global array calculated by the fix is used.
fix is used. If a bracketed term is appended, the Ith column of the
global array calculated by the fix is used. See the discussion above
for how I can be specified with a wildcard asterisk to effectively
specify multiple values.
Note that some fixes only produce their values on certain timesteps,
which must be compatible with {Nevery}, else an error will result.

View File

@ -74,10 +74,10 @@ args = list of arguments for a particular style :l
cella,cellb,cellc = periodic cell lattice constants a,b,c
cellalpha, cellbeta, cellgamma = periodic cell angles alpha,beta,gamma
c_ID = global scalar value calculated by a compute with ID
c_ID\[I\] = Ith component of global vector calculated by a compute with ID
c_ID\[I\] = Ith component of global vector calculated by a compute with ID, I can include wildcard (see below)
c_ID\[I\]\[J\] = I,J component of global array calculated by a compute with ID
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\] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below)
f_ID\[I\]\[J\] = I,J component of global array calculated by a fix with ID
v_name = value calculated by an equal-style variable with name
v_name\[I\] = value calculated by a vector-style variable with name :pre
@ -87,7 +87,8 @@ args = list of arguments for a particular style :l
thermo_style multi
thermo_style custom step temp pe etotal press vol
thermo_style custom step temp etotal c_myTemp v_abc :pre
thermo_style custom step temp etotal c_myTemp v_abc
thermo_style custom step temp etotal c_myTemp\[*\] v_abc :pre
[Description:]
@ -137,6 +138,30 @@ the thermo_modify command after it.
:line
Note that for values from a compute or fix, the bracketed index I used
to index a vector, as in {c_ID\[I\]} or {f_ID\[I\]}, can be specified
using a wildcard asterisk with the index to effectively specify
multiple values. This takes the form "*" or "*n" or "n*" or "m*n".
If N = the size of the vector (for {mode} = scalar) or the number of
columns in the array (for {mode} = vector), then an asterisk with no
numeric values means all indices from 1 to N. A leading asterisk
means all indices from 1 to n (inclusive). A trailing asterisk means
all indices from n to N (inclusive). A middle asterisk means all
indices from m to n (inclusive).
Using a wildcard is the same as if the individual elements of the
vector had been listed one by one. E.g. these 2 thermo_style commands
are equivalent, since the "compute temp"_compute_temp.html command
creates a global vector with 6 values.
compute myTemp all temp
thermo_style custom step temp etotal c_myTemp\[*\]
thermo_style custom step temp etotal &
c_myTemp\[1\] c_myTemp\[2\] c_myTemp\[3\] &
c_myTemp\[4\] c_myTemp\[5\] c_myTemp\[6\] :pre
:line
Several of the thermodynamic quantities require a temperature to be
computed: "temp", "press", "ke", "etotal", "enthalpy", "pxx", etc. By
default this is done by using a {temperature} compute which is created
@ -298,9 +323,12 @@ The {c_ID} and {c_ID\[I\]} and {c_ID\[I\]\[J\]} keywords allow global
values calculated by a compute to be output. As discussed on the
"compute"_compute.html doc page, computes can calculate global,
per-atom, or local values. Only global values can be referenced by
this command. However, per-atom compute values can be referenced in a
"variable"_variable.html and the variable referenced by thermo_style
custom, as discussed below.
this command. However, per-atom compute values for an individual atom
can be referenced in a "variable"_variable.html and the variable
referenced by thermo_style custom, as discussed below. See the
discussion above for how the I in {c_ID\[I\]} can be specified with a
wildcard asterisk to effectively specify multiple values from a global
compute vector.
The ID in the keyword should be replaced by the actual ID of a compute
that has been defined elsewhere in the input script. See the
@ -321,9 +349,11 @@ The {f_ID} and {f_ID\[I\]} and {f_ID\[I\]\[J\]} keywords allow global
values calculated by a fix to be output. As discussed on the
"fix"_fix.html doc page, fixes can calculate global, per-atom, or
local values. Only global values can be referenced by this command.
However, per-atom fix values can be referenced in a
"variable"_variable.html and the variable referenced by thermo_style
custom, as discussed below.
However, per-atom fix values can be referenced for an individual atom
in a "variable"_variable.html and the variable referenced by
thermo_style custom, as discussed below. See the discussion above for
how the I in {f_ID\[I\]} can be specified with a wildcard asterisk to
effectively specify multiple values from a global fix vector.
The ID in the keyword should be replaced by the actual ID of a fix
that has been defined elsewhere in the input script. See the
@ -345,11 +375,14 @@ 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 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 "variable"_variable.html 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.
calculated by the variable. However, an atom-style variable can be
referenced for an individual atom by an equal-style variable and that
variable referenced. See the "variable"_variable.html command for
details. Variables of style {equal} and {vector} and {atom} 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 and vector-style variables are assumed to
produce "intensive" global quantities, which are thus printed as-is,