forked from lijiext/lammps
68 lines
2.4 KiB
Plaintext
68 lines
2.4 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
|
||
|
|
||
|
compute attribute/atom command :h3
|
||
|
|
||
|
[Syntax:]
|
||
|
|
||
|
compute ID group-ID attribute/atom style :pre
|
||
|
|
||
|
ID, group-ID are documented in "compute"_compute.html command
|
||
|
attribute/atom = style name of this compute command
|
||
|
style = {x} or {y} or {z} or {xu} or {yu} or {zu} or {vx} or {vy} or {vz} or {fx} or {fy} or {fz} or {xyz} or {v} or {f} :ul
|
||
|
|
||
|
[Examples:]
|
||
|
|
||
|
compute 1 all attribute/atom vy
|
||
|
compute mine all attribute/atom xyz :pre
|
||
|
|
||
|
[Description:]
|
||
|
|
||
|
Define a computation that calculates (or simply stores) one or more
|
||
|
attributes for each atom in a group. This is useful for input to the
|
||
|
"fix ave/spatial"_fix_ave_spatial.html command to do spatial averaging
|
||
|
by layers or to the "fix ave/atom"_fix_ave_atom.html command to
|
||
|
perform time-averaging of per-atom quantities. The attribute values
|
||
|
can also be output directly by the "dump custom"_dump.html command,
|
||
|
but it has keywords that output these quantities without the need to
|
||
|
define an additional compute.
|
||
|
|
||
|
The styles {x}, {y}, {z}, {xu}, {yu}, {zu}, {vx}, {vy}, {vz}, {fx},
|
||
|
{fy}, and {fz} each store a single scalar value per atom.
|
||
|
|
||
|
The {x}, {y}, {z} keywords store atom coordinate in the appropriate
|
||
|
distance "units"_units.html (Angstroms, sigma, etc) and will always be
|
||
|
inside (or slightly outside) the simulation box. Use {xu}, {yu}, {zu}
|
||
|
if you want the coordinates "unwrapped" by the image flags for each
|
||
|
atom. Unwrapped means that if the atom has passed thru a periodic
|
||
|
boundary one or more times, the value is printed for what the
|
||
|
coordinate would be if it had not been wrapped back into the periodic
|
||
|
box. Note that using {xu}, {yu}, {zu} means that the coordinate
|
||
|
values may be far outside the simulation box.
|
||
|
|
||
|
Note that if you want to compute the time-averaged position of an atom
|
||
|
coordinate that could pass thru a periodic boundary (e.g. via the "fix
|
||
|
ave/atom"_fix_ave_atom.html command), you probably want to use {xu}
|
||
|
instead of {x}.
|
||
|
|
||
|
The styles {xyz}, {v}, and {f} each store a vector of 3 quantities per
|
||
|
atom.
|
||
|
|
||
|
Note that the various commands that reference this compute use a
|
||
|
different syntax for accessing scalar versus vector values, e.g. c_ID
|
||
|
versus c_ID[2].
|
||
|
|
||
|
[Restrictions:] none
|
||
|
|
||
|
[Related commands:]
|
||
|
|
||
|
"fix ave/atom"_fix_ave_atom.html, "fix
|
||
|
ave/spatial"_fix_ave_spatial.html, "dump custom"_dump.html
|
||
|
|
||
|
[Default:] none
|