<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Use one or more per-atom vectors as inputs every few timesteps, and
average them atom by atom over longer timescales. The resulting
per-atom averages can be used by other <a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a> such as the <a class="reference internal" href="fix_ave_spatial.html"><em>fix ave/spatial</em></a> or <a class="reference internal" href="dump.html"><em>dump custom</em></a> commands.</p>
<p>The group specified with the command means only atoms within the group
have their averages computed. Results are set to 0.0 for atoms not in
the group.</p>
<p>Each input value can be an atom attribute (position, velocity, force
component) or can be the result of a <a class="reference internal" href="compute.html"><em>compute</em></a> or
<a class="reference internal" href="fix.html"><em>fix</em></a> or the evaluation of an atom-style
<a class="reference internal" href="variable.html"><em>variable</em></a>. In the latter cases, the compute, fix, or
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"><em>fix ave/time</em></a> command.</p>
<p><a class="reference internal" href="compute.html"><em>Computes</em></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"><em>fixes</em></a> to determine which ones produce
per-atom vectors or arrays. <a class="reference internal" href="variable.html"><em>Variables</em></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>
<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
average. The final averaged quantities are generated on timesteps
that are a multiple 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. Nfreq >
(Nrepeat-1)*Nevery is required.</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.</p>
<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"><em>compute property/atom</em></a> command and then specifying
an input value from that compute.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">The x,y,z attributes are values that are re-wrapped
inside the periodic box whenever an atom crosses a periodic boundary.
Thus if you time average an atom that spends half its time on either
side of the periodic box, you will get a value in the middle of the
box. If this is not what you want, consider averaging unwrapped
coordinates, which can be provided by the <a class="reference internal" href="compute_property_atom.html"><em>compute property/atom</em></a> command via its xu,yu,zu
attributes.</p>
</div>
<p>If a value begins with “<a href="#id1"><span class="problematic" id="id2">c_</span></a>”, a compute 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 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"><em>add them to LAMMPS</em></a>.</p>
<p>If a value begins with “<a href="#id3"><span class="problematic" id="id4">f_</span></a>”, 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
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"><em>add them to LAMMPS</em></a>.</p>
<p>If a value begins with “<a href="#id5"><span class="problematic" id="id6">v_</span></a>”, a variable name must follow which has
been previously defined in the input script as an <a class="reference internal" href="variable.html"><em>atom-style variable</em></a> Variables of style <em>atom</em> can reference
thermodynamic keywords, or invoke other computes, fixes, or variables
when they are evaluated, so this is a very general means of generating
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>. None of the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> options
are relevant to this fix. No global scalar or vector quantities are
stored by this fix for access by various <a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a>.</p>
<p>This fix produces a per-atom vector or array which can be accessed by
various <a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a>. A vector is
produced if only a single quantity is averaged by this fix. If two or
more quantities are averaged, then an array of values is produced.
The per-atom values can only be accessed on timesteps that are
multiples of <em>Nfreq</em> since that is when averaging is performed.</p>
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
the <a class="reference internal" href="run.html"><em>run</em></a> command. This fix is not invoked during <a class="reference internal" href="minimize.html"><em>energy minimization</em></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.