Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102236138
fix_ave_time.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Feb 18, 14:39
Size
4 KB
Mime Type
text/html
Expires
Thu, Feb 20, 14:39 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24313165
Attached To
rLAMMPS lammps
fix_ave_time.html
View Options
<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/time command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID ave/time Nevery Nrepeat Nfreq compute-ID flag file
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
<LI>ave/time = 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 written to file
<LI>compute-ID = ID of compute that performs the calculation
<LI>flag = 0 for scalar quantity, 1 for vector quantity, 2 for both
<LI>file = filename to write results to
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 all ave/time 100 5 1000 myTemp 0 temp.stats
</PRE>
<P><B>Description:</B>
</P>
<P>Calculate one or more instantaneous quantities every few timesteps,
average them over a longer timescale, and print the results to a file.
This can be used to time-average any "compute" entity in LAMMPS which
calculates a global quantity such as a temperature or pressure.
Per-atom computes cannot be used with this fix.
</P>
<P>The <I>compute-ID</I> specifies a <A HREF = "compute.html">compute</A> which calculates
the desired property. The compute must be a "global" compute that
calculates one or more global properties rather than a "per-atom"
compute. The compute can be previously defined in the input script.
Or it can be a compute defined by <A HREF = "thermo_style.html">thermodynamic
output</A> or other fixes such as <A HREF = "fix_nvt.html">fix
nvt</A> or <A HREF = "fix_temp_rescale.html">fix temp/rescale</A>. Users
can also write code for their own compute styles and <A HREF = "Section_modify.html">add them to
LAMMPS</A>.
</P>
<P>In all these cases, the fix ave/time command uses the global scalar or
vector calculated by the compute. See the <A HREF = "fix_ave_spatial.html">fix
ave/spatial</A> command if you wish to average
spatially, e.g. via a compute that calculates per-atom quantities.
</P>
<P>The <I>Nevery</I>, <I>Nrepeat</I>, and <I>Nfreq</I> arguments specify how the
property will be time-averaged. The final averaged value(s) are
computed every <I>Nfreq</I> timesteps. The average is over <I>Nrepeat</I>
values, computed in the preceeding portion of the simulation every
<I>Nevery</I> timesteps. Thus 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 written to the file on timestep 100. Similary for
timesteps 190,192,194,196,198,200 on timestep 200, etc.
</P>
<P>The <I>flag</I> argument chooses whether the scalar and/or vector
calculation of the compute is invoked. The former computes a single
global value. The latter computes N global values, where N is defined
by the compute, e.g. 6 pressure tensor components. In the vector
case, each of the N values is averaged independently and N values are
written to the file at each output.
</P>
<P>Since the calculation is performed by the compute which stores its own
"group" definition, the group specified for this fix is ignored.
</P>
<P>If the compute calculates pressure, it will cause the force
computations performed by LAMMPS (pair, bond, angle, etc) to calculate
virial terms each Nevery timesteps. If this is more frequent than
thermodynamic output, this adds extra cost to a simulation. However,
if a constant pressure simulation is being run (<A HREF = "fix_npt.html">fix npt</A>
or <A HREF = "fix_nph.html">fix nph</A>), LAMMPS is already calculating virial terms
for the pressure every timestep.
</P>
<P><B>Restart, fix_modify, thermo 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 quantities calculated by this fix can be
output by the <A HREF = "thermo_style.html">thermo_style custom</A> command. 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>
</P>
<P><B>Default:</B> none
</P>
</HTML>
Event Timeline
Log In to Comment