\(\renewcommand{\AA}{\text{Å}}\)

compute inertia command

Syntax

compute ID group-ID inertia
  • ID, group-ID are documented in compute command

  • inertia = style name of this compute command

Examples

compute 1 molecule inertia

Description

Added in version TBD.

Define a computation that calculates the symmetric moment of inertia tensor of the group of atoms around its center of mass, including all effects due to atoms passing through periodic boundaries.

The inertia tensor is computed as

\[I = \sum_i \left[ m_i \left( (r_i - r_{\text{cm}})^2 \mathbf{1} - (r_i - r_{\text{cm}}) \otimes (r_i - r_{\text{cm}}) \right) + I_i \right]\]

where \(r_{\text{cm}}\) is the center-of-mass position of the group, the sum is over all atoms in the group, and \(I_i\) is the moment of inertia of atom \(i\) about its own center. For point particles \(I_i\) is zero; for finite-size particles (finite-size spheres, ellipsoids, superellipsoids, line segments, triangles, and body particles) \(I_i\) is the moment of inertia of the particle’s shape, which is added using the parallel-axis theorem. For finite spheres, ellipsoids, line segments, and triangles this matches the treatment used by the fix rigid command; for superellipsoids and body particles the per-particle moment of inertia stored with each particle is used (these are not supported by fix rigid).

Note

The coordinates of an atom contribute to the inertia tensor in “unwrapped” form, by using the image flags associated with each atom. See the dump custom command for a discussion of “unwrapped” coordinates. See the Atoms section of the read_data command for a discussion of image flags and how they are set for each atom. You can reset the image flags (e.g., to 0) before invoking this compute by using the set image command.

Output info

This compute calculates a global vector of length 6, which can be accessed by indices 1–6. The six components of the symmetric inertia tensor are ordered \(I_{xx}, I_{yy}, I_{zz}, I_{xy}, I_{yz}, I_{xz}\). These values can be used by any command that uses global vector values from a compute as input. See the Howto output page for an overview of LAMMPS output options.

The vector values calculated by this compute are “intensive”. The vector values will be in mass*distance\(^2\) units.

Restrictions

none

Default

none