forked from lijiext/lammps
155 lines
6.8 KiB
HTML
155 lines
6.8 KiB
HTML
<HTML>
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
</CENTER>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
<H3>fix ave/atom command
|
|
</H3>
|
|
<P><B>Syntax:</B>
|
|
</P>
|
|
<PRE>fix ID group-ID ave/atom Nevery Nrepeat Nfreq value1 value2 ...
|
|
</PRE>
|
|
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
|
|
|
<LI>ave/atom = style name of this fix command
|
|
|
|
<LI>Nevery = calculate property every this many timesteps
|
|
|
|
<LI>Nrepeat = # of times to repeat the Nevery calculation before averaging
|
|
|
|
<LI>Nfreq = timestep frequency at which the average value is calculated
|
|
|
|
<LI>one or more values can be listed
|
|
|
|
<LI>value = x, y, z, xu, yu, zu, vx, vy, vz, fx, fy, fz, c_ID, c_ID[N], f_ID, f_ID[N], v_name
|
|
|
|
<PRE> x,y,z,xu,yu,zu,vx,vy,vz,fx,fy,fz = atom attribute (position, unwrapped position, velocity, force component)
|
|
c_ID = per-atom scalar value calculated by a compute with ID
|
|
c_ID[N] = Nth component of per-atom vector calculated by a compute with ID
|
|
f_ID = per-atom scalar value calculated by a fix with ID
|
|
f_ID[N] = Nth component of per-atom vector calculated by a fix with ID
|
|
v_name = per-atom value calculated by an atom-style variable with name
|
|
</PRE>
|
|
|
|
</UL>
|
|
<P><B>Examples:</B>
|
|
</P>
|
|
<PRE>fix 1 all ave/atom 1 100 100 vx vy vz
|
|
fix 1 all ave/atom 10 20 1000 c_my_stress<B>1</B>
|
|
</PRE>
|
|
<P><B>Description:</B>
|
|
</P>
|
|
<P>Calculate one or more instantaneous per-atom quantities every few
|
|
timesteps, and average them over longer timescales. The resulting
|
|
per-atom averages can be used by other <A HREF = "Section_howto.html#4_15">output
|
|
commands</A> such as the <A HREF = "fix_ave_spatial.html">fix
|
|
ave/spatial</A> or <A HREF = "dump.html">dump custom</A> commands.
|
|
</P>
|
|
<P>Each listed value is averaged independently. The group specified with
|
|
the command means only atoms within the group have their averages
|
|
computed. Atoms not in the group have their result(s) set to 0.0.
|
|
</P>
|
|
<P>Each listed value can be an atom attribute (position, unwrapped
|
|
position, velocity, force component) or can be the result of a
|
|
<A HREF = "compute.html">compute</A> or <A HREF = "fix.html">fix</A> or the evaluation of an
|
|
atom-style <A HREF = "variable.html">variable</A>. In the latter cases, the
|
|
compute, fix, or variable must produce a per-atom quantity, not a
|
|
global quantity. If you wish to time-average global quantities from a
|
|
compute, fix, or variable, then see the <A HREF = "fix_ave_time.html">fix
|
|
ave/time</A> command.
|
|
</P>
|
|
<P><A HREF = "compute.html">Computes</A> that produce per-atom quantities are those
|
|
which have the word <I>atom</I> in their style name. See the doc pages for
|
|
individual <A HREF = "fix.html">fixes</A> to determine which ones produce per-atom
|
|
quantities. <A HREF = "variable.html">Variables</A> of style <I>atom</I> are the only
|
|
ones that can be used with this fix since all other styles of variable
|
|
produce global quantities.
|
|
</P>
|
|
<HR>
|
|
|
|
<P>The <I>Nevery</I>, <I>Nrepeat</I>, and <I>Nfreq</I> arguments specify on what
|
|
timesteps the values will be generated in order to contribute to the
|
|
average. The final averaged quantities are generated every <I>Nfreq</I>
|
|
timesteps. The average is over <I>Nrepeat</I> quantities, computed in the
|
|
preceding portion of the simulation every <I>Nevery</I> timesteps. <I>Nfreq</I>
|
|
must be a multiple of <I>Nevery</I> and <I>Nevery</I> must be non-zero even if
|
|
<I>Nrepeat</I> 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>
|
|
|
|
<P>The atom attribute values (x,y,z,vx,vy,vz,fx,fy,fz) are
|
|
self-explanatory. The unwrapped values (xu,yu,zu) mean that the
|
|
coordinates are "unwrapped" by the images flags for each atom. This
|
|
means that if the atom has passed thru a periodic boundary one or more
|
|
times, its unwrapped value is what the coordinate would be if it had
|
|
not been wrapped back into the periodic box. Note that this means the
|
|
coordinate value may be far outside the box. The
|
|
<A HREF = "dump_modify.html">dump_modify</A> command describes in more detail what
|
|
is meant by image flags.
|
|
</P>
|
|
<P>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 per-atom scalar calculated by the compute is used. If a
|
|
bracketed term is appended, the Nth vector per-atom value calculated
|
|
by the compute is used. Users can also write code for their own
|
|
compute styles and <A HREF = "Section_modify.html">add them to LAMMPS</A>.
|
|
</P>
|
|
<P>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 per-atom scalar calculated by the fix is used. If a
|
|
bracketed term is appended, the Nth vector per-atom value calculated
|
|
by the fix is used. Note that some fixes only produce their values on
|
|
certain timesteps, which must be compatible with <I>Nevery</I>, else an
|
|
error will results. Users can also write code for their own fix
|
|
styles and <A HREF = "Section_modify.html">add them to LAMMPS</A>.
|
|
</P>
|
|
<P>If a value begins with "v_", a variable name must follow which has
|
|
been previously defined in the input script. Variables of style
|
|
<I>atom</I> can reference thermodynamic keywords, or invoke other computes,
|
|
fixes, or variables when they are evaluated, so this is a very general
|
|
means of generating per-atom quantities to time average.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
|
</P>
|
|
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
|
|
files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options
|
|
are relevant to this fix. No global scalar or vector quantities are
|
|
stored by this fix for access by various <A HREF = "Section_howto.html#4_15">output
|
|
commands</A>.
|
|
</P>
|
|
<P>This fix produces a per-atom scalar or vector which can be accessed by
|
|
various <A HREF = "Section_howto.html#4_15">output commands</A>. A scalar is
|
|
produced if only a single quantity is averaged by this fix. If two or
|
|
more quantities are averaged, then a vector of values is produced.
|
|
The per-atom values can only be accessed on timesteps that are
|
|
multiples of <I>Nfreq</I> since that is when averaging is performed.
|
|
</P>
|
|
<P>No parameter of this fix can be used with the <I>start/stop</I> keywords of
|
|
the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy
|
|
minimization</A>.
|
|
</P>
|
|
<P><B>Restrictions:</B> none
|
|
</P>
|
|
<P><B>Related commands:</B>
|
|
</P>
|
|
<P><A HREF = "compute.html">compute</A>, <A HREF = "fix_ave_spatial.html">fix ave/spatial</A>, <A HREF = "dump.html">dump
|
|
custom</A>
|
|
</P>
|
|
<P><B>Default:</B> none
|
|
</P>
|
|
</HTML>
|