<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
<pclass="last">To use the <em>rigid/small</em> styles 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
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
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
specified as <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
as molecules, 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>
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
<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
<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
<p>The <em>mol</em> keyword can only be used with the <em>rigid/small</em> styles. It
must be used when other commands, 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>, add rigid
bodies on-the-fly during a simulation. You specify a <em>template-ID</em>
previously defined using the <aclass="reference internal"href="molecule.html"><spanclass="doc">molecule</span></a> command, which
reads a file that defines the molecule. You must use the same
<em>template-ID</em> that the other fix which is adding rigid bodies uses.
The coordinates, atom types, atom diameters, center-of-mass, and
moments of inertia can be specified in the molecule file. See the
<aclass="reference internal"href="molecule.html"><spanclass="doc">molecule</span></a> command for details. The only settings
required to be in this file are the coordinates and types of atoms in
the molecule, in which case the molecule command calculates the other
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>
barostatting), you can use one of the 2 NVT rigid styles 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 one of the
4 NVE rigid styles 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
<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>
<p>No information about the 4 NVE rigid styles is 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 the 2 NVT rigid styles,
the state of the Nose/Hoover thermostat is written to <aclass="reference internal"href="restart.html"><spanclass="doc">binary restart files</span></a>. Ditto for the 4 NPT and NPH rigid styles, and
supported by the 4 NPT and NPH rigid styles to change the computes
used to calculate the instantaneous pressure tensor. Note that the 2
NVT rigid fixes do not use any external compute to compute
instantaneous temperature.</p>
<p>The 2 NVE rigid 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 6 NVT, NPT, NPH rigid 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> styles (not the <em>rigid/small</em> styles) 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>. Similar information about the
bodies defined by the <em>rigid/small</em> styles can be accessed via the
<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>.