forked from lijiext/lammps
115 lines
4.8 KiB
Plaintext
115 lines
4.8 KiB
Plaintext
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
:link(ld,Manual.html)
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
:line
|
|
|
|
fix ave/time command :h3
|
|
|
|
[Syntax:]
|
|
|
|
fix ID group-ID ave/time Nevery Nrepeat Nfreq style ID type file :pre
|
|
|
|
ID, group-ID are documented in "fix"_fix.html command
|
|
ave/time = style name of this fix command
|
|
Nevery = calculate property every this many timesteps
|
|
Nrepeat = # of times to repeat the Nevery calculation before averaging
|
|
Nfreq = timestep frequency at which the average value is computed
|
|
style = {compute} or {fix}
|
|
ID = ID of compute or fix that performs the calculation
|
|
type = 0 for scalar quantity, 1 for vector quantity, 2 for both
|
|
file = filename to write results to (NULL = no file) :ul
|
|
|
|
[Examples:]
|
|
|
|
fix 1 all ave/time 100 5 1000 compute myTemp 0 temp.stats
|
|
fix 1 all ave/time 1 100 1000 fix indenter 0 temp.indent :pre
|
|
|
|
[Description:]
|
|
|
|
Calculate one or more instantaneous quantities every few timesteps,
|
|
and average them over a longer timescale. The resulting averages can
|
|
be written to a file and/or used by other "output
|
|
commands"_Section_howto.html#4_15 such as "thermo_style
|
|
custom"_thermo_style.html.
|
|
|
|
This fix can be used to time-average a "compute"_compute.html which
|
|
calculates a global quantity such as a temperature or pressure or a
|
|
"fix"_fix.html which calculates a global quantity. Note that per-atom
|
|
computes cannot be used with this fix; their values can be averaged by
|
|
the "fix ave/spatial"_fix_ave_spatial.html or "fix
|
|
ave/atom"_fix_ave_atom.html commands.
|
|
|
|
For style {compute} the {ID} specifies a "compute"_compute.html 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 fix must be previously defined in the input
|
|
script. Or it can be a compute defined by "thermodynamic
|
|
output"_thermo_style.html or other fixes such as "fix
|
|
nvt"_fix_nvt.html or "fix temp/rescale"_fix_temp_rescale.html. Users
|
|
can write code for their own compute styles and "add them to
|
|
LAMMPS"_Section_modify.html.
|
|
|
|
For style {fix} the {ID} specifies a "fix"_fix.html which calculates
|
|
the desired property. The fix must calculate a global scalar or
|
|
vector quantity, which only a few fixes do. See the doc page for
|
|
individual fix commands for details. The fix must be previously
|
|
defined in the input script. Users can write code for their own fix
|
|
styles and "add them to LAMMPS"_Section_modify.html.
|
|
|
|
The {Nevery}, {Nrepeat}, and {Nfreq} arguments specify how the
|
|
property will be time-averaged. The final averaged value(s) are
|
|
computed every {Nfreq} timesteps. The average is over {Nrepeat}
|
|
values, computed in the preceeding portion of the simulation every
|
|
{Nevery} 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 on timestep 100. Similary for timesteps
|
|
190,192,194,196,198,200 on timestep 200, etc.
|
|
|
|
The {type} argument chooses whether the scalar and/or vector
|
|
calculation of the compute or fix is invoked. The former computes a
|
|
single global value. The latter computes N global values, where N is
|
|
defined by the compute or fix, e.g. 6 pressure tensor components. In
|
|
the vector case, each of the N values is averaged independently. If
|
|
file output is specified, all N values are written to the file at each
|
|
output.
|
|
|
|
Since the calculation is performed by the compute or fix which stores
|
|
its own "group" definition, the group specified for with the fix
|
|
ave/time command is ignored.
|
|
|
|
If the style is {compute} and 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
|
|
("fix npt"_fix_npt.html or "fix nph"_fix_nph.html), LAMMPS is already
|
|
calculating virial terms for the pressure every timestep.
|
|
|
|
[Restart, fix_modify, output, run start/stop, minimize info:]
|
|
|
|
No information about this fix is written to "binary restart
|
|
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
|
are relevant to this fix.
|
|
|
|
Depending on the setting of the {type} parameter, this fix computes a
|
|
scalar and/or a vector of quantities which can be accessed by various
|
|
"output commands"_Section_howto.html#4_15. The values should only be
|
|
accessed on timesteps that are multiples of {Nfreq} since that is when
|
|
averaging is complete.
|
|
|
|
No parameter of this fix can be used with the {start/stop} keywords of
|
|
the "run"_run.html command. This fix is not invoked during "energy
|
|
minimization"_minimize.html.
|
|
|
|
[Restrictions:] none
|
|
|
|
[Related commands:]
|
|
|
|
"compute"_compute.html, "fix ave/atom"_fix_ave_atom.html, "fix
|
|
ave/spatial"_fix_ave_spatial.html
|
|
|
|
[Default:] none
|