Syntax:
compute ID group-ID pe/atom keyword ...
Examples:
compute 1 all pe/atom compute 1 all pe/atom pair compute 1 all pe/atom pair bond
Description:
Define a computation that computes the per-atom potential energy for each atom in a group. See the compute pe command if you want the potential energy of the entire system. The per-atom energies can be accessed as scalar values by any command that uses per-atom computes, e.g. the dump custom command or fix ave/spatial command or fix ave/atom command. See this section for an overview.
The per-atom energy is calulated by the various pair, bond, etc potentials defined for the simulation. If no extra keywords are listed, then the potential energy is the sum of pair, bond, angle, dihedral, and improper energy. If any extra keywords are listed, then only those components are summed to compute the potential energy.
Note that the energy of each atom is due to its interaction with all other atoms in the simulation, not just with other atoms in the group.
For an energy contribution produced by a small set of atoms (e.g. 4 atoms in a dihedral or 3 atoms in a Tersoff 3-body interaction), that energy is assigned in equal portions to each atom in the set. E.g. 1/4 of the dihedral energy to each of the 4 atoms.
The dihedral_style charmm style calculates pairwise interactions between 1-4 atoms. The energy contribution of these terms is included in the pair energy, not the dihedral energy.
IMPORTANT NOTE: The per-atom energy does NOT include contributions due to long-range Coulombic interactions (via the kspace_style command). It's not clear this contribution can easily be computed. There are also a few pair styles for manybody potentials that are not yet instrumented to yield per-atom energy. See the Restrictions below.
Output info:
This compute calculates a scalar quantity for each atom, which can be accessed by any command that uses per-atom computes as input. See this section for an overview of LAMMPS output options.
Restrictions:
These pair styles do not yet tabulate per-atom energies to allow them to work with this compute: airebo, meam, and TIP4P.
Related commands:
compute pe, compute stress/atom
Default: none