<li>ID, group-ID are documented in <aclass="reference internal"href="fix.html"><spanclass="doc">fix</span></a> command</li>
<li>style = <em>rigid</em> or <em>rigid/nve</em> or <em>rigid/nvt</em> or <em>rigid/npt</em> or <em>rigid/nph</em> or <em>rigid/small</em> or <em>rigid/nve/small</em> or <em>rigid/nvt/small</em> or <em>rigid/npt/small</em> or <em>rigid/nph/small</em></li>
<li>bodystyle = <em>single</em> or <em>molecule</em> or <em>group</em></li>
</ul>
<preclass="literal-block">
<em>single</em> args = none
<em>molecule</em> args = none
<em>group</em> args = N groupID1 groupID2 ...
N = # of groups
groupID1, groupID2, ... = list of N group IDs
</pre>
<ulclass="simple">
<li>zero or more keyword/value pairs may be appended</li>
<li>keyword = <em>langevin</em> or <em>temp</em> or <em>iso</em> or <em>aniso</em> or <em>x</em> or <em>y</em> or <em>z</em> or <em>couple</em> or <em>tparam</em> or <em>pchain</em> or <em>dilate</em> or <em>force</em> or <em>torque</em> or <em>infile</em></li>
Tstart,Tstop = desired temperature at start/stop of run (temperature units)
Tdamp = temperature damping parameter (time units)
seed = random number seed to use for white noise (positive integer)
<em>temp</em> values = Tstart Tstop Tdamp
Tstart,Tstop = desired temperature at start/stop of run (temperature units)
Tdamp = temperature damping parameter (time units)
<em>iso</em> or <em>aniso</em> values = Pstart Pstop Pdamp
Pstart,Pstop = scalar external pressure at start/end of run (pressure units)
Pdamp = pressure damping parameter (time units)
<em>x</em> or <em>y</em> or <em>z</em> values = Pstart Pstop Pdamp
Pstart,Pstop = external stress tensor component at start/end of run (pressure units)
Pdamp = stress damping parameter (time units)
<em>couple</em> = <em>none</em> or <em>xyz</em> or <em>xy</em> or <em>yz</em> or <em>xz</em>
<em>tparam</em> values = Tchain Titer Torder
Tchain = length of Nose/Hoover thermostat chain
Titer = number of thermostat iterations performed
Torder = 3 or 5 = Yoshida-Suzuki integration parameters
<em>pchain</em> values = Pchain
Pchain = length of the Nose/Hoover thermostat chain coupled with the barostat
<em>dilate</em> value = dilate-group-ID
dilate-group-ID = only dilate atoms in this group due to barostat volume changes
<em>force</em> values = M xflag yflag zflag
M = which rigid body from 1-Nbody (see asterisk form below)
xflag,yflag,zflag = off/on if component of center-of-mass force is active
<em>torque</em> values = M xflag yflag zflag
M = which rigid body from 1-Nbody (see asterisk form below)
xflag,yflag,zflag = off/on if component of center-of-mass torque is active
<em>infile</em> filename
filename = file with per-body values of mass, center-of-mass, moments of inertia
<em>mol</em> value = template-ID
template-ID = ID of molecule template specified in a separate <aclass="reference internal"href="molecule.html"><spanclass="doc">molecule</span></a> command
<p>Treat one or more sets of atoms as independent rigid bodies. This
means that each timestep the total force and torque on each rigid body
is computed as the sum of the forces and torques on its constituent
particles. The coordinates, velocities, and orientations of the atoms
in each body are then updated so that the body moves and rotates as a
single entity.</p>
<p>Examples of large rigid bodies are a colloidal particle, or portions
of a biomolecule such as a protein.</p>
<p>Example of small rigid bodies are patchy nanoparticles, such as those
modeled in <aclass="reference internal"href="pair_gran.html#zhang"><spanclass="std std-ref">this paper</span></a> by Sharon Glotzer’s group, clumps of
granular particles, lipid molecules consiting of one or more point
dipoles connected to other spheroids or ellipsoids, irregular
particles built from line segments (2d) or triangles (3d), and
coarse-grain models of nano or colloidal particles consisting of a
small number of constituent particles. Note that the <aclass="reference internal"href="fix_shake.html"><spanclass="doc">fix shake</span></a> command can also be used to rigidify small
molecules of 2, 3, or 4 atoms, e.g. water molecules. That fix treats
the constituent atoms as point masses.</p>
<p>These fixes also update the positions and velocities of the atoms in
each rigid body via time integration, in the NVE, NVT, NPT, or NPH
ensemble, as described below.</p>
<p>There are two main variants of this fix, fix rigid and fix
rigid/small. The NVE/NVT/NPT/NHT versions belong to one of the two
variants, as their style names indicate.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">Not all of the <em>bodystyle</em> options and keyword/value options are
available for both the <em>rigid</em> and <em>rigid/small</em> variants. See
details below.</p>
</div>
<p>The <em>rigid</em> variant is typically the best choice for a system with a
small number of large rigid bodies, each of which can extend across
the domain of many processors. It operates by creating a single
global list of rigid bodies, which all processors contribute to.
MPI_Allreduce operations are performed each timestep to sum the
contributions from each processor to the force and torque on all the
bodies. This operation will not scale well in parallel if large
numbers of rigid bodies are simulated.</p>
<p>The <em>rigid/small</em> variant is typically best for a system with a large
number of small rigid bodies. Each body is assigned to the atom
closest to the geometrical center of the body. The fix operates using
local lists of rigid bodies owned by each processor and information is
exchanged and summed via local communication between neighboring
processors when ghost atom info is accumlated.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">To use <em>rigid/small</em> the ghost atom cutoff must be large enough
to span the distance between the atom that owns the body and every
other atom in the body. This distance value is printed out when the
rigid bodies are defined. If the <aclass="reference internal"href="pair_style.html"><spanclass="doc">pair_style</span></a> cutoff
plus neighbor skin does not span this distance, then you should use
the <aclass="reference internal"href="comm_modify.html"><spanclass="doc">comm_modify cutoff</span></a> command with a setting
epsilon larger than the distance.</p>
</div>
<p>Which of the two variants is faster for a particular problem is hard
to predict. The best way to decide is to perform a short test run.
Both variants should give identical numerical answers for short runs.
Long runs should give statistically similar results, but round-off
differences may accumulate to produce divergent trajectories.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">You should not update the atoms in rigid bodies via other
time-integration fixes (e.g. <aclass="reference internal"href="fix_nve.html"><spanclass="doc">fix nve</span></a>, <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix nvt</span></a>, <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix npt</span></a>), or you will be integrating
time integration fix like <aclass="reference internal"href="fix_nve.html"><spanclass="doc">fix nve</span></a> or <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix nvt</span></a> should be used for the non-rigid particles.</p>
<pclass="last">These fixes are overkill if you simply want to hold a collection
of atoms stationary or have them move with a constant velocity. A
simpler way to hold atoms stationary is to not include those atoms in
your time integration fix. E.g. use “fix 1 mobile nve” instead of
“fix 1 all nve”, where “mobile” is the group of atoms that you want to
move. You can move atoms with a constant velocity by assigning them
an initial velocity (via the <aclass="reference internal"href="velocity.html"><spanclass="doc">velocity</span></a> command),
setting the force on them to 0.0 (via the <aclass="reference internal"href="fix_setforce.html"><spanclass="doc">fix setforce</span></a> command), and integrating them as usual
<pclass="last">The aggregate properties of each rigid body are calculated one
time at the start of the first simulation run after this fix is
specified. The properties include the position and velocity of the
center-of-mass of the body, its moments of inertia, and its angular
momentum. This is done using the properties of the constituent atoms
of the body at that point in time (or see the <em>infile</em> keyword
option). Thereafter, changing properties of individual atoms in the
body will have no effect on a rigid body’s dynamics, unless they
effect the <aclass="reference internal"href="pair_style.html"><spanclass="doc">pair_style</span></a> interactions that individual
particles are part of. For example, you might think you could
displace the atoms in a body or add a large velocity to each atom in a
body to make it move in a desired direction before a 2nd run is
performed, using the <aclass="reference internal"href="set.html"><spanclass="doc">set</span></a> or
<aclass="reference internal"href="displace_atoms.html"><spanclass="doc">displace_atoms</span></a> or <aclass="reference internal"href="velocity.html"><spanclass="doc">velocity</span></a>
command. But these commands will not affect the internal attributes
of the body, and the position and velocity or individual atoms in the
body will be reset when time integration starts.</p>
</div>
<hrclass="docutils"/>
<p>Each rigid body must have two or more atoms. An atom can belong to at
most one rigid body. Which atoms are in which bodies can be defined
via several options.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">With fix rigid/small, which requires bodystyle <em>molecule</em>, you
can define a system that has no rigid bodies initially. This is
useful when you are using the <em>mol</em> keyword in conjunction with
another fix that is adding rigid bodies on-the-fly, such as <aclass="reference internal"href="fix_deposit.html"><spanclass="doc">fix deposit</span></a> or <aclass="reference internal"href="fix_pour.html"><spanclass="doc">fix pour</span></a>.</p>
</div>
<p>For bodystyle <em>single</em> the entire fix group of atoms is treated as one
rigid body. This option is only allowed for fix rigid and its
sub-styles.</p>
<p>For bodystyle <em>molecule</em>, each set of atoms in the fix group with a
different molecule ID is treated as a rigid body. This option is
allowed for fix rigid and fix rigid/small, and their sub-styles. Note
that atoms with a molecule ID = 0 will be treated as a single rigid
body. For a system with atomic solvent (typically this is atoms with
molecule ID = 0) surrounding rigid bodies, this may not be what you
want. Thus you should be careful to use a fix group that only
includes atoms you want to be part of rigid bodies.</p>
<p>For bodystyle <em>group</em>, each of the listed groups is treated as a
separate rigid body. Only atoms that are also in the fix group are
included in each rigid body. This option is only allowed for fix
rigid and its sub-styles.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">To compute the initial center-of-mass position and other
properties of each rigid body, the image flags for each atom in the
body are used to “unwrap” the atom coordinates. Thus you must insure
that these image flags are consistent so that the unwrapping creates a
valid rigid body (one where the atoms are close together),
particularly if the atoms in a single rigid body straddle a periodic
boundary. This means the input data file or restart file must define
the image flags for each atom consistently or that you have used the
<aclass="reference internal"href="set.html"><spanclass="doc">set</span></a> command to specify them correctly. If a dimension is
non-periodic then the image flag of each atom must be 0 in that
dimension, else an error is generated.</p>
</div>
<p>The <em>force</em> and <em>torque</em> keywords discussed next are only allowed for
fix rigid and its sub-styles.</p>
<p>By default, each rigid body is acted on by other atoms which induce an
external force and torque on its center of mass, causing it to
translate and rotate. Components of the external center-of-mass force
and torque can be turned off by the <em>force</em> and <em>torque</em> keywords.
This may be useful if you wish a body to rotate but not translate, or
vice versa, or if you wish it to rotate or translate continuously
unaffected by interactions with other particles. Note that if you
expect a rigid body not to move or rotate by using these keywords, you
must insure its initial center-of-mass translational or angular
velocity is 0.0. Otherwise the initial translational or angular
momentum the body has will persist.</p>
<p>An xflag, yflag, or zflag set to <em>off</em> means turn off the component of
force of torque in that dimension. A setting of <em>on</em> means turn on
the component, which is the default. Which rigid body(s) the settings
apply to is determined by the first argument of the <em>force</em> and
<em>torque</em> keywords. It can be an integer M from 1 to Nbody, where
Nbody is the number of rigid bodies defined. A wild-card asterisk can
be used in place of, or in conjunction with, the M argument to set the
flags for multiple rigid bodies. This takes the form “*” or “<em>n” or
“n</em>” or “m*n”. If N = the number of rigid bodies, then an asterisk
with no numeric values means all bodies from 1 to N. A leading
asterisk means all bodies from 1 to n (inclusive). A trailing
asterisk means all bodies from n to N (inclusive). A middle asterisk
means all types from m to n (inclusive). Note that you can use the
<em>force</em> or <em>torque</em> keywords as many times as you like. If a
particular rigid body has its component flags set multiple times, the
settings from the final keyword are used.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">For computational efficiency, you may wish to turn off pairwise
and bond interactions within each rigid body, as they no longer
contribute to the motion. The <aclass="reference internal"href="neigh_modify.html"><spanclass="doc">neigh_modify exclude</span></a> and <aclass="reference internal"href="delete_bonds.html"><spanclass="doc">delete_bonds</span></a>
commands are used to do this. If the rigid bodies have strongly
overalapping atoms, you may need to turn off these interactions to
avoid numerical problems due to large equal/opposite intra-body forces
swamping the contribution of small inter-body forces.</p>
</div>
<p>For computational efficiency, you should typically define one fix
rigid or fix rigid/small command which includes all the desired rigid
bodies. LAMMPS will allow multiple rigid fixes to be defined, but it
is more expensive.</p>
<hrclass="docutils"/>
<p>The constituent particles within a rigid body can be point particles
(the default in LAMMPS) or finite-size particles, such as spheres or
ellipsoids or line segments or triangles. See the <aclass="reference internal"href="atom_style.html"><spanclass="doc">atom_style sphere and ellipsoid and line and tri</span></a> commands for more
details on these kinds of particles. Finite-size particles contribute
differently to the moment of inertia of a rigid body than do point
particles. Finite-size particles can also experience torque (e.g. due
to <aclass="reference internal"href="pair_gran.html"><spanclass="doc">frictional granular interactions</span></a>) and have an
orientation. These contributions are accounted for by these fixes.</p>
<p>Forces between particles within a body do not contribute to the
external force or torque on the body. Thus for computational
efficiency, you may wish to turn off pairwise and bond interactions
between particles within each rigid body. The <aclass="reference internal"href="neigh_modify.html"><spanclass="doc">neigh_modify exclude</span></a> and <aclass="reference internal"href="delete_bonds.html"><spanclass="doc">delete_bonds</span></a>
commands are used to do this. For finite-size particles this also
means the particles can be highly overlapped when creating the rigid
body.</p>
<hrclass="docutils"/>
<p>The <em>rigid</em> and <em>rigid/small</em> and <em>rigid/nve</em> styles perform constant
NVE time integration. The only difference is that the <em>rigid</em> and
<em>rigid/small</em> styles use an integration technique based on Richardson
iterations. The <em>rigid/nve</em> style uses the methods described in the
paper by <aclass="reference internal"href="#miller"><spanclass="std std-ref">Miller</span></a>, which are thought to provide better energy
conservation than an iterative approach.</p>
<p>The <em>rigid/nvt</em> and <em>rigid/nvt/small</em> styles performs constant NVT
integration using a Nose/Hoover thermostat with chains as described
originally in <aclass="reference internal"href="#hoover"><spanclass="std std-ref">(Hoover)</span></a> and <aclass="reference internal"href="#martyna"><spanclass="std std-ref">(Martyna)</span></a>, which
thermostats both the translational and rotational degrees of freedom
of the rigid bodies. The rigid-body algorithm used by <em>rigid/nvt</em>
is described in the paper by <aclass="reference internal"href="#kamberaj"><spanclass="std std-ref">Kamberaj</span></a>.</p>
<p>The <em>rigid/npt</em> and <em>rigid/nph</em> (and their /small counterparts) styles
perform constant NPT or NPH integration using a Nose/Hoover barostat
with chains. For the NPT case, the same Nose/Hoover thermostat is also
used as with <em>rigid/nvt</em>.</p>
<p>The barostat parameters are specified using one or more of the <em>iso</em>,
<em>aniso</em>, <em>x</em>, <em>y</em>, <em>z</em> and <em>couple</em> keywords. These keywords give you
the ability to specify 3 diagonal components of the external stress
tensor, and to couple these components together so that the dimensions
they represent are varied together during a constant-pressure
simulation. The effects of these keywords are similar to those
defined in <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix npt/nph</span></a></p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">Currently the <em>rigid/npt</em> and <em>rigid/nph</em> (and their /small
counterparts) styles do not support triclinic (non-orthongonal) boxes.</p>
</div>
<p>The target pressures for each of the 6 components of the stress tensor
can be specified independently via the <em>x</em>, <em>y</em>, <em>z</em> keywords, which
correspond to the 3 simulation box dimensions. For each component,
the external pressure or tensor component at each timestep is a ramped
value during the run from <em>Pstart</em> to <em>Pstop</em>. If a target pressure is
specified for a component, then the corresponding box dimension will
change during a simulation. For example, if the <em>y</em> keyword is used,
the y-box length will change. A box dimension will not change if that
component is not specified, although you have the option to change
that dimension via the <aclass="reference internal"href="fix_deform.html"><spanclass="doc">fix deform</span></a> command.</p>
<p>For all barostat keywords, the <em>Pdamp</em> parameter operates like the
<em>Tdamp</em> parameter, determining the time scale on which pressure is
relaxed. For example, a value of 10.0 means to relax the pressure in
a timespan of (roughly) 10 time units (e.g. tau or fmsec or psec - see
<p>The way that Langevin thermostatting operates is explained on the <aclass="reference internal"href="fix_langevin.html"><spanclass="doc">fix langevin</span></a> doc page. If you wish to simply viscously
damp the rotational motion without thermostatting, you can set
<em>Tstart</em> and <em>Tstop</em> to 0.0, which means only the viscous drag term in
the Langevin thermostat will be applied. See the discussion on the
<aclass="reference internal"href="fix_viscous.html"><spanclass="doc">fix viscous</span></a> doc page for details.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">When the <em>langevin</em> keyword is used with fix rigid versus fix
rigid/small, different dynamics will result for parallel runs. This
is because of the way random numbers are used in the two cases. The
dynamics for the two cases should be statistically similar, but will
not be identical, even for a single timestep.</p>
</div>
<p>The <em>temp</em> and <em>tparam</em> keywords apply a Nose/Hoover thermostat to the
NVT time integration performed by the <em>rigid/nvt</em> style. They cannot
be used with the <em>rigid</em> or <em>rigid/small</em> or <em>rigid/nve</em> styles. The
desired temperature at each timestep is a ramped value during the run
from <em>Tstart</em> to <em>Tstop</em>. The <em>Tdamp</em> parameter is specified in time
units and determines how rapidly the temperature is relaxed. For
example, a value of 100.0 means to relax the temperature in a timespan
of (roughly) 100 time units (tau or fmsec or psec - see the
rigid fixes can be used in tandem with <aclass="reference internal"href="fix_nve.html"><spanclass="doc">fix nve</span></a>, <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix nvt</span></a>, <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix npt</span></a>, and <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix nph</span></a>.</p>
<p>If you wish to perform NVT dynamics (thermostatting, but no
barostatting), you can use fix rigid/nvt for the rigid bodies, and any
thermostatting fix for the non-rigid particles (<aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix nvt</span></a>,
<aclass="reference internal"href="fix_langevin.html"><spanclass="doc">fix langevin</span></a>, <aclass="reference internal"href="fix_temp_berendsen.html"><spanclass="doc">fix temp/berendsen</span></a>). You can also use fix rigid
or fix rigid/nve for the rigid bodies and thermostat them using <aclass="reference internal"href="fix_langevin.html"><spanclass="doc">fix langevin</span></a> on the group that contains all the
particles in the rigid bodies. The net force added by <aclass="reference internal"href="fix_langevin.html"><spanclass="doc">fix langevin</span></a> to each rigid body effectively thermostats
its translational center-of-mass motion. Not sure how well it does at
thermostatting its rotational motion.</p>
<p>If you with to perform NPT or NPH dynamics (barostatting), you cannot
use both <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix npt</span></a> and fix rigid/npt (or the nph
variants). This is because there can only be one fix which monitors
the global pressure and changes the simulation box dimensions. So you
have 3 choices:</p>
<ulclass="simple">
<li>Use fix rigid/npt for the rigid bodies. Use the <em>dilate</em> all option
so that it will dilate the positions of the non-rigid particles as
well. Use <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix nvt</span></a> (or any other thermostat) for the
non-rigid particles.</li>
<li>Use <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix npt</span></a> for the group of non-rigid particles. Use
the <em>dilate</em> all option so that it will dilate the center-of-mass
positions of the rigid bodies as well. Use fix rigid/nvt for the
rigid bodies.</li>
<li>Use <aclass="reference internal"href="fix_press_berendsen.html"><spanclass="doc">fix press/berendsen</span></a> to compute the
pressure and change the box dimensions. Use fix rigid/nvt for the
rigid bodies. Use <aclass="reference external"href="fix_nh.thml">fix nvt</a> (or any other thermostat) for
the non-rigid particles.</li>
</ul>
<p>In all case, the rigid bodies and non-rigid particles both contribute
to the global pressure and the box is scaled the same by any of the
barostatting fixes.</p>
<p>You could even use the 2nd and 3rd options for a non-hybrid simulation
consisting of only rigid bodies, assuming you give <aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix npt</span></a> an empty group, though it’s an odd thing to do. The
barostatting fixes (<aclass="reference internal"href="fix_nh.html"><spanclass="doc">fix npt</span></a> and <aclass="reference internal"href="fix_press_berendsen.html"><spanclass="doc">fix press/berensen</span></a>) will monitor the pressure
and change the box dimensions, but not time integrate any particles.
The integration of the rigid bodies will be performed by fix
<p>These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
USER-OMP and OPT packages, respectively. They are only enabled if
LAMMPS was built with those packages. See the <aclass="reference internal"href="Section_start.html#start-3"><spanclass="std std-ref">Making LAMMPS</span></a> section for more info.</p>
<p>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <aclass="reference internal"href="Section_start.html#start-7"><spanclass="std std-ref">-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <aclass="reference internal"href="suffix.html"><spanclass="doc">suffix</span></a> command in your input script.</p>
<p>See <aclass="reference internal"href="Section_accelerate.html"><spanclass="doc">Section_accelerate</span></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p>No information about the <em>rigid</em> and <em>rigid/small</em> and <em>rigid/nve</em>
fixes are written to <aclass="reference internal"href="restart.html"><spanclass="doc">binary restart files</span></a>. The
exception is if the <em>infile</em> or <em>mol</em> keyword is used, in which case
an auxiliary file is written out with rigid body information each time
a restart file is written, as explained above for the <em>infile</em>
keyword. For style <em>rigid/nvt</em> the state of the Nose/Hoover
thermostat is written to <aclass="reference internal"href="restart.html"><spanclass="doc">binary restart files</span></a>. See the
<aclass="reference internal"href="read_restart.html"><spanclass="doc">read_restart</span></a> command for info on how to re-specify
a fix in an input script that reads a restart file, so that the
operation of the fix continues in an uninterrupted fashion.</p>
<p>The <aclass="reference internal"href="fix_modify.html"><spanclass="doc">fix_modify</span></a><em>energy</em> option is supported by the
rigid/nvt fix to add the energy change induced by the thermostatting
to the system’s potential energy as part of <aclass="reference internal"href="thermo_style.html"><spanclass="doc">thermodynamic output</span></a>.</p>
<p>The <aclass="reference internal"href="fix_modify.html"><spanclass="doc">fix_modify</span></a><em>temp</em> and <em>press</em> options are
supported by the rigid/npt and rigid/nph fixes to change the computes used
to calculate the instantaneous pressure tensor. Note that the rigid/nvt fix
does not use any external compute to compute instantaneous temperature.</p>
<p>The <em>rigid</em> and <em>rigid/small</em> and <em>rigid/nve</em> fixes compute a global
scalar which can be accessed by various <aclass="reference internal"href="Section_howto.html#howto-15"><spanclass="std std-ref">output commands</span></a>. The scalar value calculated by
these fixes is “intensive”. The scalar is the current temperature of
the collection of rigid bodies. This is averaged over all rigid
bodies and their translational and rotational degrees of freedom. The
translational energy of a rigid body is 1/2 m v^2, where m = total
mass of the body and v = the velocity of its center of mass. The
rotational energy of a rigid body is 1/2 I w^2, where I = the moment
of inertia tensor of the body and w = its angular velocity. Degrees
of freedom constrained by the <em>force</em> and <em>torque</em> keywords are
removed from this calculation, but only for the <em>rigid</em> and
<em>rigid/nve</em> fixes.</p>
<p>The <em>rigid/nvt</em>, <em>rigid/npt</em>, and <em>rigid/nph</em> fixes compute a global
scalar which can be accessed by various <aclass="reference internal"href="Section_howto.html#howto-15"><spanclass="std std-ref">output commands</span></a>. The scalar value calculated by
these fixes is “extensive”. The scalar is the cumulative energy
change due to the thermostatting and barostatting the fix performs.</p>
<p>All of the <em>rigid</em> fixes except <em>rigid/small</em> compute a global array
of values which can be accessed by various <aclass="reference internal"href="Section_howto.html#howto-15"><spanclass="std std-ref">output commands</span></a>. The number of rows in the
array is equal to the number of rigid bodies. The number of columns
is 15. Thus for each rigid body, 15 values are stored: the xyz coords
of the center of mass (COM), the xyz components of the COM velocity,
the xyz components of the force acting on the COM, the xyz components
of the torque acting on the COM, and the xyz image flags of the COM.</p>
<p>The center of mass (COM) for each body is similar to unwrapped
coordinates written to a dump file. It will always be inside (or
slightly outside) the simulation box. The image flags have the same
meaning as image flags for atom positions (see the “dump” command).
This means you can calculate the unwrapped COM by applying the image
flags to the COM, the same as when unwrapped coordinates are written
to a dump file.</p>
<p>The force and torque values in the array are not affected by the
<em>force</em> and <em>torque</em> keywords in the fix rigid command; they reflect
values before any changes are made by those keywords.</p>
<p>The ordering of the rigid bodies (by row in the array) is as follows.
For the <em>single</em> keyword there is just one rigid body. For the
<em>molecule</em> keyword, the bodies are ordered by ascending molecule ID.
For the <em>group</em> keyword, the list of group IDs determines the ordering
of bodies.</p>
<p>The array values calculated by these fixes are “intensive”, meaning
they are independent of the number of atoms in the simulation.</p>
<p>No parameter of these fixes can be used with the <em>start/stop</em> keywords
of the <aclass="reference internal"href="run.html"><spanclass="doc">run</span></a> command. These fixes are not invoked during
<p>These fixes are all part of the RIGID package. It is only enabled if
LAMMPS was built with that package. See the <aclass="reference internal"href="Section_start.html#start-3"><spanclass="std std-ref">Making LAMMPS</span></a> section for more info.</p>
<p>Assigning a temperature via the <aclass="reference internal"href="velocity.html"><spanclass="doc">velocity create</span></a>
command to a system with <aclass="reference internal"href="#"><spanclass="doc">rigid bodies</span></a> may not have
the desired outcome for two reasons. First, the velocity command can
be invoked before the rigid-body fix is invoked or initialized and the
number of adjusted degrees of freedom (DOFs) is known. Thus it is not
possible to compute the target temperature correctly. Second, the
assigned velocities may be partially canceled when constraints are
first enforced, leading to a different temperature than desired. A
workaround for this is to perform a <aclass="reference internal"href="run.html"><spanclass="doc">run 0</span></a> command, which
insures all DOFs are accounted for properly, and then rescale the
temperature to the desired value before performing a simulation. For
<spanclass="n">run</span><spanclass="mi">0</span><spanclass="c1"># temperature may not be 300K</span>
<spanclass="n">velocity</span><spanclass="nb">all</span><spanclass="n">scale</span><spanclass="mf">300.0</span><spanclass="c1"># now it should be</span>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.