"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 coord/atom command :h3

[Syntax:]

compute ID group-ID coord/atom cutoff keyword value :pre

ID, group-ID are documented in "compute"_compute.html command :ulb,l
coord/atom = style name of this compute command  :l
cutoff = distance within which to count coordination neighbors (distance units) :l
zero or more keyword/value pairs may be appended to args :l
keyword = {mix} :l
  {mix} value = yes or no -ID
    no = count all neighbors  
    yes = count only neighbors that have same atom type  :pre
:ule

[Examples:]

compute 1 all coord/atom 2.0 :pre

[Description:]

Define a computation that calculates the coordination number for each
atom in a group.

The value of the coordination number will be 0.0 for atoms not in the
specified compute group.

The coordination number is defined as the number of neighbor atoms
within the specified cutoff distance from the central atom.  Atoms not
in the group are included in the coordination number of atoms in the
group.

The neighbor list needed to compute this quantity is constructed each
time the calculation is performed (i.e. each time a snapshot of atoms
is dumped).  Thus it can be inefficient to compute/dump this quantity
too frequently or to have multiple compute/dump commands, each of a
{coord/atom} style.

Keyword {mix} controlls if all neighbors are counted or if only neighbors
with same atom type are counted. The latter can be useful to quanitfy
mixture of different species.

[Output info:]

This compute calculates a per-atom vector, which can be accessed by
any command that uses per-atom values from a compute as input.  See
"Section_howto 15"_Section_howto.html#howto_15 for an overview of
LAMMPS output options.

The per-atom vector values will be a number >= 0.0, as explained
above.

[Restrictions:] none

[Related commands:]

"compute cluster/atom"_compute_cluster_atom.html

[Default:] none
