compute contact/atom command — LIGGGHTS v3.X documentation

# compute contact/atom command

# compute contact/atom/gran command

## Syntax

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

- ID, group-ID are documented in compute command
- contact/atom or contact/atom/gran = style name of this compute command
- general_keywords general_values are documented in compute

## Examples

    compute 1 all contact/atom
    compute 1 all contact/atom/gran

## 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 | particles touch each other | r < r_i + r_j
compute contact/atom/gran | particles interact with each other | f_ij > 0
compute coord/atom | particles are in the vicinity of each other | r < cutoff

## 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 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 command.

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

## Related commands

compute coord/atom

Default: none