2007-09-28 07:28:06 +08:00
|
|
|
"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/atom command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2008-01-03 03:25:15 +08:00
|
|
|
fix ID group-ID ave/atom Nevery Nrepeat Nfreq value1 value2 ... :pre
|
|
|
|
|
|
|
|
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
|
|
|
ave/atom = style name of this fix command :l
|
|
|
|
Nevery = calculate property every this many timesteps :l
|
|
|
|
Nrepeat = # of times to repeat the Nevery calculation before averaging :l
|
|
|
|
Nfreq = timestep frequency at which the average value is calculated :l
|
|
|
|
one or more values can be listed :l
|
2009-03-18 00:11:05 +08:00
|
|
|
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 :l
|
|
|
|
x,y,z,xu,yu,zu,vx,vy,vz,fx,fy,fz = atom attribute (position, unwrapped position, velocity, force component)
|
2008-01-03 03:25:15 +08:00
|
|
|
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
|
|
|
|
:ule
|
2007-09-28 07:28:06 +08:00
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
2008-01-03 03:25:15 +08:00
|
|
|
fix 1 all ave/atom 1 100 100 vx vy vz
|
|
|
|
fix 1 all ave/atom 10 20 1000 c_my_stress[1] :pre
|
2007-09-28 07:28:06 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2008-01-03 03:25:15 +08:00
|
|
|
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 "output
|
|
|
|
commands"_Section_howto.html#4_15 such as the "fix
|
|
|
|
ave/spatial"_fix_ave_spatial.html or "dump custom"_dump.html commands.
|
|
|
|
|
|
|
|
Each listed value is averaged independently. The group specified with
|
|
|
|
the command means only atoms within the group have their averages
|
2008-01-04 08:56:10 +08:00
|
|
|
computed. Atoms not in the group have their result(s) set to 0.0.
|
2008-01-03 03:25:15 +08:00
|
|
|
|
2009-03-18 00:11:05 +08:00
|
|
|
Each listed value can be an atom attribute (position, unwrapped
|
|
|
|
position, velocity, force component) or can be the result of a
|
|
|
|
"compute"_compute.html or "fix"_fix.html or the evaluation of an
|
|
|
|
atom-style "variable"_variable.html. 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 "fix
|
|
|
|
ave/time"_fix_ave_time.html command.
|
2008-01-03 03:25:15 +08:00
|
|
|
|
|
|
|
"Computes"_compute.html that produce per-atom quantities are those
|
2008-01-04 07:28:08 +08:00
|
|
|
which have the word {atom} in their style name. See the doc pages for
|
2008-02-20 05:47:37 +08:00
|
|
|
individual "fixes"_fix.html to determine which ones produce per-atom
|
2008-01-04 07:28:08 +08:00
|
|
|
quantities. "Variables"_variable.html of style {atom} are the only
|
|
|
|
ones that can be used with this fix since all other styles of variable
|
|
|
|
produce global quantities.
|
2008-01-03 03:25:15 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
The {Nevery}, {Nrepeat}, and {Nfreq} arguments specify on what
|
|
|
|
timesteps the values will be generated in order to contribute to the
|
|
|
|
average. The final averaged quantities are generated every {Nfreq}
|
|
|
|
timesteps. The average is over {Nrepeat} quantities, computed in the
|
2008-02-20 05:47:37 +08:00
|
|
|
preceding portion of the simulation every {Nevery} timesteps. {Nfreq}
|
|
|
|
must be a multiple of {Nevery} and {Nevery} must be non-zero even if
|
2008-05-27 22:03:44 +08:00
|
|
|
{Nrepeat} is 1. Also, the timesteps contributing to the average value
|
|
|
|
cannot overlap, i.e. Nfreq > (Nrepeat-1)*Nevery is required.
|
2008-01-03 03:25:15 +08:00
|
|
|
|
|
|
|
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
|
2008-02-20 05:47:37 +08:00
|
|
|
on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on
|
2008-01-03 03:25:15 +08:00
|
|
|
timestep 200, etc.
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
The atom attribute values (x,y,z,vx,vy,vz,fx,fy,fz) are
|
2009-03-18 00:11:05 +08:00
|
|
|
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
|
|
|
|
"dump_modify"_dump_modify.html command describes in more detail what
|
|
|
|
is meant by image flags.
|
2008-01-03 03:25:15 +08:00
|
|
|
|
|
|
|
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 "add them to LAMMPS"_Section_modify.html.
|
|
|
|
|
|
|
|
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 {Nevery}, else an
|
|
|
|
error will results. Users can also write code for their own fix
|
|
|
|
styles and "add them to LAMMPS"_Section_modify.html.
|
|
|
|
|
|
|
|
If a value begins with "v_", a variable name must follow which has
|
|
|
|
been previously defined in the input script. Variables of style
|
|
|
|
{atom} 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.
|
2007-09-28 07:28:06 +08:00
|
|
|
|
2009-11-18 23:22:46 +08:00
|
|
|
:line
|
|
|
|
|
2007-10-11 06:28:11 +08:00
|
|
|
[Restart, fix_modify, output, run start/stop, minimize info:]
|
2007-09-28 07:28:06 +08:00
|
|
|
|
|
|
|
No information about this fix is written to "binary restart
|
|
|
|
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
2007-10-11 06:28:11 +08:00
|
|
|
are relevant to this fix. No global scalar or vector quantities are
|
|
|
|
stored by this fix for access by various "output
|
|
|
|
commands"_Section_howto.html#4_15.
|
|
|
|
|
2008-01-03 03:25:15 +08:00
|
|
|
This fix produces a per-atom scalar or vector which can be accessed by
|
|
|
|
various "output commands"_Section_howto.html#4_15. 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 {Nfreq} since that is when averaging is performed.
|
2007-10-11 06:28:11 +08:00
|
|
|
|
|
|
|
No parameter of this fix can be used with the {start/stop} keywords of
|
2007-09-28 07:28:06 +08:00
|
|
|
the "run"_run.html command. This fix is not invoked during "energy
|
|
|
|
minimization"_minimize.html.
|
|
|
|
|
|
|
|
[Restrictions:] none
|
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
|
|
|
"compute"_compute.html, "fix ave/spatial"_fix_ave_spatial.html, "dump
|
|
|
|
custom"_dump.html
|
|
|
|
|
|
|
|
[Default:] none
|