"LIGGGHTS(R)-PUBLIC WWW Site"_liws - "LIGGGHTS(R)-PUBLIC Documentation"_ld - "LIGGGHTS(R)-PUBLIC Commands"_lc :c

:link(liws,http://www.cfdem.com)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)

:line

fix store/state command :h3

[Syntax:]

fix ID group-ID store/state N input1 input2 ... keyword value ... :pre

ID, group-ID are documented in "fix"_fix.html command :ulb,l
store/state = style name of this fix command :l
N = store atom attributes every N steps, N = 0 for initial store only :l
input = one or more atom attributes :l
  possible attributes = id, mol, type, mass,
 	                x, y, z, xs, ys, zs, xu, yu, zu, ix, iy, iz,
		        vx, vy, vz, fx, fy, fz,
                        q, mux, muy, muz,
                        radius, omegax, omegay, omegaz,
                        angmomx, angmomy, angmomz, tqx, tqy, tqz
			c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :pre

      id = atom ID
      mol = molecule ID
      type = atom type
      mass = atom mass
      x,y,z = unscaled atom coordinates
      xs,ys,zs = scaled atom coordinates
      xu,yu,zu = unwrapped atom coordinates
      ix,iy,iz = box image that the atom is in
      vx,vy,vz = atom velocities
      fx,fy,fz = forces on atoms
      q = atom charge
      mux,muy,muz = orientation of dipolar atom
      radius = radius of spherical particle
      omegax,omegay,omegaz = angular velocity of spherical particle
      angmomx,angmomy,angmomz = angular momentum of aspherical particle
      tqx,tqy,tqz = torque on finite-size particles
      c_ID = per-atom vector calculated by a compute with ID
      c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID
      f_ID = per-atom vector calculated by a fix with ID
      f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID
      v_name = per-atom vector calculated by an atom-style variable with name :pre

zero or more keyword/value pairs may be appended :l
keyword = {com} :l
  {com} value = {yes} or {no} :pre
:ule

[Examples:]

fix 1 all store/state 0 x y z
fix 1 all store/state 0 xu yu zu com yes
fix 2 all store/state 1000 vx vy vz :pre

[Description:]

Define a fix that stores attributes for each atom in the group at the
time the fix is defined.  If {N} is 0, then the values are never
updated, so this is a way of archiving an atom attribute at a given
time for future use in a calculation or output.  See the discussion of
"output commands"_Section_howto.html#howto_8 that take fixes as
inputs.  And see for example, the "compute
reduce"_compute_reduce.html, "fix ave/atom"_fix_ave_atom.html, "fix
ave/histo"_fix_ave_histo.html, "fix ave/spatial"_fix_ave_spatial.html,
and "atom-style variable"_variable.html commands.

If {N} is not zero, then the attributes will be updated every {N}
steps.

IMPORTANT NOTE: Actually, only atom attributes specified by keywords
like {xu} or {vy} are initially stored immediately at the point in
your input script when the fix is defined.  Attributes specified by a
compute, fix, or variable are not initially stored until the first run
following the fix definition begins.  This is because calculating
those attributes may require quantities that are not defined in
between runs.

The list of possible attributes is the same as that used by the "dump
custom"_dump.html command, which describes their meaning.

If the {com} keyword is set to {yes} then the {xu}, {yu}, and {zu}
inputs store the position of each atom relative to the center-of-mass
of the group of atoms, instead of storing the absolute position.  This
option is used by the "compute msd"_compute_msd.html command.

The requested values are stored in a per-atom vector or array as
discussed below.  Zeroes are stored for atoms not in the specified
group.

[Restart, fix_modify, output, run start/stop, minimize info:]

This fix writes the per-atom values it stores to "binary restart
files"_restart.html, so that the values can be restored when a
simulation is restarted.  See the "read_restart"_read_restart.html
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.

None of the "fix_modify"_fix_modify.html options are relevant to this
fix.

If a single input is specified, this fix produces a per-atom vector.
If multiple inputs are specified, a per-atom array is produced where
the number of columns for each atom is the number of inputs.  These
can be accessed by various "output
commands"_Section_howto.html#howto_8.  The per-atom values be
accessed on any timestep.

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:]

"dump custom"_dump.html, "compute
property/atom"_compute_property_atom.html, "variable"_variable.html

[Default:]

The option default is com = no.
