"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 property/molecule command :h3

[Syntax:]

compute ID group-ID property/molecule input1 input2 ... :pre

ID, group-ID are documented in "compute"_compute.html command :ulb,l
property/molecule = style name of this compute command :l
input = one or more attributes :l
  possible attributes = mol :pre
    mol = molecule ID :pre
:ule

[Examples:]

compute 1 all property/molecule mol :pre

[Description:]

Define a computation that stores the specified attributes as global
data so it can be accessed by other "output
commands"_Section_howto.html#4_15 and used in conjunction with other
commands that generate per-molecule data, such as "compute
com/molecule"_compute_com_molecule.html and "compute
msd/molecule"_compute_msd_molecule.html.

The {mol} attribute generates a list of molecule IDs in ascending
order for any molecule with one or more of its atoms in the specified
group.  This list and ordering of molecule IDs will be consistent with
the ordering produced by other compute commands that generate
per-molecule datums.  Thus this attribute can be used to produce
molecule IDs as labels for those datums when they are output to a
file, e.g. by the "fix ave/time"_fix_ave_time.html command.

[Output info:]

This compute calculates a global vector or global array depending on
the number of input values.  The length of the vector or number of
rows in the array is the number of molecules.  If a single input is
specified, a global vector is produced.  If two or more inputs are
specified, a global array is produced where the number of columns =
the number of inputs.  The vector or array can be accessed by any
command that uses global values from a compute as input.  See "this
section"_Section_howto.html#4_15 for an overview of LAMMPS output
options.

The vector or array values will be integers that correspond to the
specified attribute.

[Restrictions:] none

[Related commands:] none

[Default:] none
