Syntax:
fix ID group-ID ave/atom Nevery Nrepeat Nfreq compute-ID
Examples:
fix 1 all ave/atom 1 100 100 myVx fix 1 all ave/atom 10 20 1000 my_epair
Description:
Calculate one or more time-averaged per-atom quantities every few timesteps. The results of this calculation can be spatially averaged via the fix ave/spatial command or output to a file via the dump custom command.
The compute-ID specifies a compute which calculates the desired property. It must be a per-atom compute (one with the word "atom" in its style name) that calculates one or more values for each atom, as opposed to a global compute. The compute must be previously defined in the input script. Users can also write code for their own compute styles and add them to LAMMPS.
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 at timestep 100. Similary for timesteps 190,192,194,196,198,200 at timestep 200, etc.
If this fix is referenced by a dump custom or fix ave/spatial command, the time-averaged values can only be accessed every Nfreq timesteps.
If the compute calculates a single or multiple values per atom, then fix ave/atom will also calculate one or multiple time-averaged quantities per atom. This makes a difference in how the quantities are referenced in a dump custom command, e.g. c_ID versus c_ID[2].
Restart, fix_modify, thermo output, run start/stop, minimize info:
No information about this fix is written to binary restart files. None of the fix_modify options are relevant to this fix. No quantities calculated by this fix can be output by the thermo_style custom command. No parameter of this fix can be used with the start/stop keywords of the run command. This fix is not invoked during energy minimization.
Restrictions: none
Related commands:
compute, fix ave/spatial, dump custom
Default: none