"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)

:line

compute ke/rigid command :h3

[Syntax:]

compute ID group-ID ke/rigid fix-ID :pre

ID, group-ID are documented in "compute"_compute.html command
ke = style name of this compute command
fix-ID = ID of rigid body fix :ul

[Examples:]

compute 1 all ke/rigid myRigid :pre

[Description:]

Define a computation that calculates the translational kinetic energy
of a collection of rigid bodies, as defined by one of the "fix
rigid"_fix_rigid.html command variants.

The kinetic energy of each rigid body is computed as 1/2 M Vcm^2,
where M is the total mass of the rigid body, and Vcm is its
center-of-mass velocity.

The {fix-ID} should be the ID of one of the "fix rigid"_fix_rigid.html
commands which defines the rigid bodies.  The group specified in the
compute command is ignored.  The kinetic energy of all the rigid
bodies defined by the fix rigid command in included in the
calculation.

[Output info:]

This compute calculates a global scalar (the summed KE of all the
rigid bodies).  This value can be used by any command that uses a
global scalar value from a compute as input.  See the "Howto
output"_Howto_output.html doc page for an overview of LAMMPS output
options.

The scalar value calculated by this compute is "extensive".  The
scalar value will be in energy "units"_units.html.

[Restrictions:]

This compute is part of the RIGID package.  It is only enabled if
LAMMPS was built with that package.  See the "Build
package"_Build_package.html doc page for more info.

[Related commands:]

"compute erotate/rigid"_compute_erotate_rigid.html

[Default:] none
