<li>zero or more keyword/arg pairs may be appended</li>
<li>keyword = <em>norm</em> or <em>ave</em> or <em>bias</em> or <em>adof</em> or <em>cdof</em> or <em>file</em> or <em>overwrite</em> or <em>title1</em> or <em>title2</em> or <em>title3</em></li>
</ul>
<preclass="literal-block">
<em>norm</em> arg = <em>all</em> or <em>sample</em> or <em>none</em> = how output on <em>Nfreq</em> steps is normalized
all = output is sum of atoms across all <em>Nrepeat</em> samples, divided by atom count
sample = output is sum of <em>Nrepeat</em> sample averages, divided by <em>Nrepeat</em>
none = output is sum of <em>Nrepeat</em> sample sums, divided by <em>Nrepeat</em>
<em>ave</em> args = <em>one</em> or <em>running</em> or <em>window M</em>
one = output new average value every Nfreq steps
running = output cumulative average of all previous Nfreq steps
window M = output average of M most recent Nfreq steps
<em>bias</em> arg = bias-ID
bias-ID = ID of a temperature compute that removes a velocity bias for temperature calculation
<em>adof</em> value = dof_per_atom
dof_per_atom = define this many degrees-of-freedom per atom for temperature calculation
<em>cdof</em> value = dof_per_chunk
dof_per_chunk = define this many degrees-of-freedom per chunk for temperature calculation
<em>file</em> arg = filename
filename = file to write results to
<em>overwrite</em> arg = none = overwrite output file with only latest output
<p>If you are trying to replace a deprectated fix ave/spatial command
with the newer, more flexible fix ave/chunk and <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> commands, you simply need to split
<p>Use one or more per-atom vectors as inputs every few timesteps, sum
the values over the atoms in each chunk at each timestep, then average
the per-chunk values over longer timescales. The resulting chunk
averages can be used by other <aclass="reference internal"href="Section_howto.html#howto-15"><spanclass="std std-ref">output commands</span></a> such as <aclass="reference internal"href="thermo_style.html"><spanclass="doc">thermo_style custom</span></a>, and can also be written to a file.</p>
<p>In LAMMPS, chunks are collections of atoms defined by a <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> doc page and “<aclass="reference internal"href="Section_howto.html#howto-23"><spanclass="std std-ref">Section_howto 23</span></a> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.</p>
<p>Note that only atoms in the specified group contribute to the summing
and averaging calculations. The <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> command defines its own group as
well as an optional region. Atoms will have a chunk ID = 0, meaning
they belong to no chunk, if they are not in that group or region.
Thus you can specify the “all” group for this command if you simply
want to use the chunk definitions provided by chunkID.</p>
<p>Each specified per-atom value can be an atom attribute (position,
velocity, force component), a mass or number density, or the result of
a <aclass="reference internal"href="compute.html"><spanclass="doc">compute</span></a> or <aclass="reference internal"href="fix.html"><spanclass="doc">fix</span></a> or the evaluation of an
atom-style <aclass="reference internal"href="variable.html"><spanclass="doc">variable</span></a>. In the latter cases, the
compute, fix, or variable must produce a per-atom quantity, not a
global quantity. Note that the <aclass="reference internal"href="compute_property_atom.html"><spanclass="doc">compute property/atom</span></a> command provides access to
any attribute defined and stored by atoms. If you wish to
time-average global quantities from a compute, fix, or variable, then
see the <aclass="reference internal"href="fix_ave_time.html"><spanclass="doc">fix ave/time</span></a> command.</p>
equivalent, since the <aclass="reference internal"href="compute_property_atom.html"><spanclass="doc">compute property/atom</span></a> command creates, in this
Nvalues is the number of input values specified. Each processor loops
over its atoms, tallying its values to the appropriate chunk. Then
the entire array is summed across all processors. This means that
using a large number of chunks will incur an overhead in memory and
computational cost (summing across processors), so be careful to
define a reasonable number of chunks.</p>
</div>
<hrclass="docutils"/>
<p>The <em>Nevery</em>, <em>Nrepeat</em>, and <em>Nfreq</em> arguments specify on what
timesteps the input values will be accessed and contribute to the
average. The final averaged quantities are generated on timesteps
that are a multiples of <em>Nfreq</em>. The average is over <em>Nrepeat</em>
quantities, computed in the preceding portion of the simulation every
<em>Nevery</em> timesteps. <em>Nfreq</em> must be a multiple of <em>Nevery</em> and
<em>Nevery</em> must be non-zero even if <em>Nrepeat</em> is 1. Also, the timesteps
contributing to the average value cannot overlap, i.e. Nrepeat*Nevery
can not exceed Nfreq.</p>
<p>For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on
timesteps 90,92,94,96,98,100 will be used to compute the final average
on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on
timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time
averaging is done; values are simply generated on timesteps
100,200,etc.</p>
<p>Each input value can also be averaged over the atoms in each chunk.
The way the averaging is done across the <em>Nrepeat</em> timesteps to
produce output on the <em>Nfreq</em> timesteps, and across multiple <em>Nfreq</em>
outputs, is determined by the <em>norm</em> and <em>ave</em> keyword settings, as
discussed below.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">To perform per-chunk averaging within a <em>Nfreq</em> time window, the
number of chunks <em>Nchunk</em> defined by the <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> command must remain constant. If
the <em>ave</em> keyword is set to <em>running</em> or <em>window</em> then <em>Nchunk</em> must
remain constant for the duration of the simulation. This fix forces
the chunk/atom compute specified by chunkID to hold <em>Nchunk</em> constant
for the appropriate time windows, by not allowing it to re-calcualte
<em>Nchunk</em>, which can also affect how it assigns chunk IDs to atoms.
More details are given on the <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> doc page.</p>
</div>
<hrclass="docutils"/>
<p>The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory.
As noted above, any other atom attributes can be used as input values
to this fix by using the <aclass="reference internal"href="compute_property_atom.html"><spanclass="doc">compute property/atom</span></a> command and then specifying
an input value from that compute.</p>
<p>The <em>density/number</em> value means the number density is computed for
each chunk, i.e. number/volume. The <em>density/mass</em> value means the
mass density is computed for each chunk, i.e. total-mass/volume. The
output values are in units of 1/volume or density (mass/volume). See
for each choice of units, e.g. gram/cm^3. If the chunks defined by
the <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> command are spatial
bins, the volume is the bin volume. Otherwise it is the volume of the
entire simulation box.</p>
<p>The <em>temp</em> value means the temperature is computed for each chunk, by
the formula KE = DOF/2 k T, where KE = total kinetic energy of the
chunk of atoms (sum of 1/2 m v^2), DOF = the total number of degrees
of freedom for all atoms in the chunk, k = Boltzmann constant, and T =
temperature.</p>
<p>The DOF is calculated as N*adof + cdof, where N = number of atoms in
the chunk, adof = degrees of freedom per atom, and cdof = degrees of
freedom per chunk. By default adof = 2 or 3 = dimensionality of
system, as set via the <aclass="reference internal"href="dimension.html"><spanclass="doc">dimension</span></a> command, and cdof =
0.0. This gives the usual formula for temperature.</p>
<p>Note that currently this temperature only includes translational
degrees of freedom for each atom. No rotational degrees of freedom
are included for finite-size particles. Also no degrees of freedom
are subtracted for any velocity bias or constraints that are applied,
such as <aclass="reference internal"href="compute_temp_partial.html"><spanclass="doc">compute temp/partial</span></a>, or <aclass="reference internal"href="fix_shake.html"><spanclass="doc">fix shake</span></a> or <aclass="reference internal"href="fix_rigid.html"><spanclass="doc">fix rigid</span></a>. This is because
those degrees of freedom (e.g. a constrained bond) could apply to sets
of atoms that are both included and excluded from a specific chunk,
and hence the concept is somewhat ill-defined. In some cases, you can
use the <em>adof</em> and <em>cdof</em> keywords to adjust the calculated degress of
freedom appropriately, as explained below.</p>
<p>Also note that a bias can be subtracted from atom velocities before
they are used in the above formula for KE, by using the <em>bias</em>
keyword. This allows, for example, a thermal temperature to be
computed after removal of a flow velocity profile.</p>
<p>Note that the per-chunk temperature calculated by this fix and the
<aclass="reference internal"href="compute_temp_chunk.html"><spanclass="doc">compute temp/chunk</span></a> command can be different.
The compute calculates the temperature for each chunk for a single
snapshot. This fix can do that but can also time average those values
over many snapshots, or it can compute a temperature as if the atoms
in the chunk on different timesteps were collected together as one set
of atoms to calculate their temperature. The compute allows the
center-of-mass velocity of each chunk to be subtracted before
calculating the temperature; this fix does not.</p>
<p>In the first line, ID and name are replaced with the fix-ID and group
name. The second line describes the two values that are printed at
the first of each section of output. In the third line the values are
replaced with the appropriate value names, e.g. fx or c_myCompute<strong>2</strong>.</p>
<p>The words in parenthesis only appear with corresponding columns if the
chunk style specified for the <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> command supports them. The OrigID
column is only used if the <em>compress</em> keyword was set to <em>yes</em> for the
<aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> command. This means that
the original chunk IDs (e.g. molecule IDs) will have been compressed
to remove chunk IDs with no atoms assigned to them. Thus a compresed
chunk ID of 3 may correspond to an original chunk ID or molecule ID of
415. The OrigID column will list 415 for the 3rd chunk.</p>
<p>The CoordN columns only appear if a <em>binning</em> style was used in the
<aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> command. For <em>bin/1d</em>,
<em>bin/2d</em>, and <em>bin/3d</em> styles the column values are the center point
of the bin in the corresponding dimension. Just Coord1 is used for
<em>bin/1d</em>, Coord2 is added for <em>bin/2d</em>, Coord3 is added for <em>bin/3d</em>.
For <em>bin/sphere</em>, just Coord1 is used, and it is the radial
coordinate. For <em>bin/cylinder</em>, Coord1 and Coord2 are used. Coord1
is the radial coordinate (away from the cylinder axis), and coord2 is
the coordinate along the cylinder axis.</p>
<p>Note that if the value of the <em>units</em> keyword used in the <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom command</span></a> is <em>box</em> or <em>lattice</em>, the
<p>No information about this fix is written to <aclass="reference internal"href="restart.html"><spanclass="doc">binary restart files</span></a>. None of the <aclass="reference internal"href="fix_modify.html"><spanclass="doc">fix_modify</span></a> options
are relevant to this fix.</p>
<p>This fix computes a global array of values which can be accessed by
various <aclass="reference internal"href="Section_howto.html#howto-15"><spanclass="std std-ref">output commands</span></a>. The values can
only be accessed on timesteps that are multiples of <em>Nfreq</em> since that
is when averaging is performed. The global array has # of rows =
the number of chunks <em>Nchunk</em> as calculated by the specified <aclass="reference internal"href="compute_chunk_atom.html"><spanclass="doc">compute chunk/atom</span></a> command. The # of columns =
M+1+Nvalues, where M = 1 to 4, depending on whether the optional
columns for OrigID and CoordN are used, as explained above.
Following the optional columns, the next column contains the count of
atoms in the chunk, and the remaining columns are the Nvalue
quantities. When the array is accessed with a row I that exceeds the
current number of chunks, than a 0.0 is returned by the fix instead of
an error, since the number of chunks can vary as a simulation runs
depending on how that value is computed by the compute chunk/atom
command.</p>
<p>The array values calculated by this fix are treated as “intensive”,
since they are typically already normalized by the count of atoms in
each chunk.</p>
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
the <aclass="reference internal"href="run.html"><spanclass="doc">run</span></a> command. This fix is not invoked during <aclass="reference internal"href="minimize.html"><spanclass="doc">energy minimization</span></a>.</p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.