<p>Define a computation that simply stores rigid body attributes for
rigid bodies defined by the <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid/small</span></a> command
or one of its NVE, NVT, NPT, NPH variants. The data is stored as
local data so it can be accessed by other <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a> that process local data, such as
the <a class="reference internal" href="compute_reduce.html"><span class="doc">compute reduce</span></a> or <a class="reference internal" href="dump.html"><span class="doc">dump local</span></a>
commands.</p>
<p>Note that this command only works with the <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid/small</span></a> command or its variants, not the fix rigid
command and its variants. The ID of the <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid/small</span></a> command used to define rigid bodies must
be specified as <em>rigidID</em>. The <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid</span></a> command is
typically used to define a handful of (potentially very large) rigid
bodies. It outputs similar per-body information as this command
directly from the fix as global data; see the <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid</span></a> doc page for details</p>
<p>The local data stored by this command is generated by looping over all
the atoms owned on a processor. If the atom is not in the specified
<em>group-ID</em> or is not part of a rigid body it is skipped. If it is not
the atom within a body that is assigned to store the body information
it is skipped (only one atom per body is so assigned). If it is the
assigned atom, then the info for that body is output. This means that
information for N bodies is generated. N may be less than the # of
bodies defined by the fix rigid command, if the atoms in some bodies
are not in the <em>group-ID</em>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Which atom in a body owns the body info is determined internal
to LAMMPS; it’s the one nearest the geometric center of the body.
Typically you should avoid this complication, by defining the group
associated with this fix to include/exclude entire bodies.</p>
</div>
<p>Note that as atoms and bodies migrate from processor to processor,
there will be no consistent ordering of the entries within the local
vector or array from one timestep to the next.</p>
<p>Here is an example of how to use this compute to dump rigid body info
<p>This section explains the rigid body attributes that can be specified.</p>
<p>The <em>id</em> attribute is the atomID of the atom which owns the rigid body, which is
assigned by the <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid/small</span></a> command.</p>
<p>The <em>mol</em> attribute is the molecule ID of the rigid body. It should
be the molecule ID which all of the atoms in the body belong to, since
that is how the <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid/small</span></a> command defines its
rigid bodies.</p>
<p>The <em>mass</em> attribute is the total mass of the rigid body.</p>
<p>There are two options for outputting the coordinates of the center of
mass (COM) of the body. The <em>x</em>, <em>y</em>, <em>z</em> attributes write the COM
“unscaled”, in the appropriate distance <a class="reference internal" href="units.html"><span class="doc">units</span></a> (Angstroms,
sigma, etc). Use <em>xu</em>, <em>yu</em>, <em>zu</em> if you want the COM “unwrapped” by
the image flags for each atobody. Unwrapped means that if the body
COM has passed thru a periodic boundary one or more times, the value
is generated what the COM coordinate would be if it had not been
wrapped back into the periodic box.</p>
<p>The image flags for the body can be generated directly using the <em>ix</em>,
<em>iy</em>, <em>iz</em> attributes. For periodic dimensions, they specify which
image of the simulation box the COM is considered to be in. An image
of 0 means it is inside the box as defined. A value of 2 means add 2
box lengths to get the true value. A value of -1 means subtract 1 box
length to get the true value. LAMMPS updates these flags as the rigid
body COMs cross periodic boundaries during the simulation.</p>
<p>The <em>vx</em>, <em>vy</em>, <em>vz</em>, <em>fx</em>, <em>fy</em>, <em>fz</em> attributes are components of
the COM velocity and force on the COM of the body.</p>
<p>The <em>omegax</em>, <em>omegay</em>, and <em>omegaz</em> attributes are the angular
velocity componennts of the body around its COM.</p>
<p>The <em>angmomx</em>, <em>angmomy</em>, and <em>angmomz</em> attributes are the angular
momentum components of the body around its COM.</p>
<p>The <em>quatw</em>, <em>quati</em>, <em>quatj</em>, and <em>quatk</em> attributes are the
components of the 4-vector quaternion representing the orientation of
the rigid body. See the <a class="reference internal" href="set.html"><span class="doc">set</span></a> command for an explanation of
the quaternion vector.</p>
<p>The <em>angmomx</em>, <em>angmomy</em>, and <em>angmomz</em> attributes are the angular
momentum components of the body around its COM.</p>
<p>The <em>tqx</em>, <em>tqy</em>, <em>tqz</em> attributes are components of the torque acting
on the body around its COM.</p>
<p>The <em>inertiax</em>, <em>inertiay</em>, <em>inertiaz</em> attributes are components of
diagonalized inertia tensor for the body, i.e the 3 moments of inertia
for the body around its principal axes, as computed internally by
LAMMPS.</p>
<hr class="docutils" />
<p><strong>Output info:</strong></p>
<p>This compute calculates a local vector or local array depending on the
number of keywords. The length of the vector or number of rows in the
array is the number of rigid bodies. If a single keyword is
specified, a local vector is produced. If two or more keywords are
specified, a local array is produced where the number of columns = the
number of keywords. The vector or array can be accessed by any
command that uses local values from a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">this section</span></a> for an overview of LAMMPS output
options.</p>
<p>The vector or array values will be in whatever <a class="reference internal" href="units.html"><span class="doc">units</span></a> the
<p>This compute is part of the RIGID package. It is only enabled if
LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span class="std std-ref">Making LAMMPS</span></a> section for more info.</p>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.