"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

compute contact/atom command :h3
compute contact/atom/gran command :h3

[Syntax:]

compute ID group-ID contact/atom general_keywords general_values
compute ID group-ID contact/atom/gran general_keywords general_values :pre

ID, group-ID are documented in "compute"_compute.html command
contact/atom or contact/atom/gran = style name of this compute command
general_keywords general_values are documented in "compute"_compute.html" :ul

[Examples:]

compute 1 all contact/atom
compute 1 all contact/atom/gran :pre

[Description:]

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

The contact number is defined for finite-size spherical particles as
the number of neighbor atoms which are close to the central particle,
meaning that their distance of separation is less than or equal to the
sum of the radii of the two particles plus the skin distance. In case
the {contact/atom/gran} style is chosen, a contact is defined as the
overlap of two particles (distance < sum of radii) or if a contactflag
in the history is set (e.g. due to a bond contact)

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

This compute is one of the three different ways to compute a coordination
number. The following table gives an overview over the different options:

[style] | [contact counted condition] | [formula]
"compute contact/atom"_compute_contact_atom.html | particles touch each other | {r} < {r_i} + {r_j}
"compute contact/atom/gran"_compute_contact_atom.html | particles interact with each other | {f_ij} > 0
"compute coord/atom"_compute_coord_atom.html | particles are in the vicinity of each other | {r} < {cutoff} :tb(s=|)

[Output info:]

This compute calculates a per-atom vector, whose values can be
accessed by any command that uses per-atom values from a compute as
input.  See "Section_howto 15"_Section_howto.html#howto_8 for an
overview of LIGGGHTS(R)-PUBLIC output options.

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

[Restrictions:]

This compute requires that atoms store a radius as defined by the
"atom_style sphere"_atom_style.html command.

This compute might not yield correct results for multisphere simulations as
it considers all spherical particles separately.

[Related commands:]

"compute coord/atom"_compute_coord_atom.html

[Default:] none
