1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
9 compute com command :h3
13 compute ID group-ID com :pre
15 ID, group-ID are documented in "compute"_compute.html command
16 com = style name of this compute command :ul
20 compute 1 all com :pre
24 Define a computation that calculates the center-of-mass of the group
25 of atoms, including all effects due to atoms passing thru periodic
28 A vector of three quantites is calculated by this compute, which
29 are the x,y,z coordinates of the center of mass.
31 NOTE: The coordinates of an atom contribute to the center-of-mass in
32 "unwrapped" form, by using the image flags associated with each atom.
33 See the "dump custom"_dump.html command for a discussion of
34 "unwrapped" coordinates. See the Atoms section of the
35 "read_data"_read_data.html command for a discussion of image flags and
36 how they are set for each atom. You can reset the image flags
37 (e.g. to 0) before invoking this compute by using the "set
38 image"_set.html command.
42 This compute calculates a global vector of length 3, which can be
43 accessed by indices 1-3 by any command that uses global vector values
44 from a compute as input. See "this
45 section"_Section_howto.html#howto_15 for an overview of LAMMPS output
48 The vector values are "intensive". The vector values will be in
49 distance "units"_units.html.
55 "compute com/chunk"_compute_com_chunk.html