2006-09-22 00:22:34 +08:00
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
fix rigid :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2009-01-13 22:38:26 +08:00
|
|
|
fix ID group-ID rigid bodystyle args keyword values ... :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
|
|
|
rigid = style name of this fix command :l
|
2009-01-13 22:38:26 +08:00
|
|
|
bodystyle = {single} or {molecule} or {group} :l
|
|
|
|
{single} args = none
|
|
|
|
{molecule} args = none
|
|
|
|
{group} args = N groupID1 groupID2 ...
|
|
|
|
N = # of groups
|
|
|
|
groupID1, groupID2, ... = list of N group IDs :pre
|
|
|
|
|
|
|
|
zero or more keyword/value pairs may be appended :l
|
|
|
|
keyword = {force} or {torque} :l
|
|
|
|
{force} 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
|
|
|
|
{torque} 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 :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
:ule
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
|
|
|
fix 1 clump rigid single
|
2009-01-13 22:38:26 +08:00
|
|
|
fix 1 clump rigid single force 1 off off on
|
2006-09-22 00:22:34 +08:00
|
|
|
fix 1 polychains rigid molecule
|
2009-01-13 22:38:26 +08:00
|
|
|
fix 1 polychains rigid molecule force 1*5 off off off force 6*10 off off on
|
|
|
|
fix 2 fluid rigid group 3 clump1 clump2 clump3
|
|
|
|
fix 2 fluid rigid group 3 clump1 clump2 clump3 torque * off off off :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2009-07-01 01:19:42 +08:00
|
|
|
Treat one or more sets of atoms as independent rigid bodies. This
|
2006-09-22 00:22:34 +08:00
|
|
|
means that each timestep the total force and torque on each rigid body
|
2009-07-01 01:19:42 +08:00
|
|
|
is computed as the sum of the forces and torques on its constituent
|
|
|
|
particles and the coordinates, velocities, and orientations of the
|
|
|
|
atoms in each body are updated so that the body moves and rotates as a
|
|
|
|
single entity.
|
|
|
|
|
|
|
|
Examples of large rigid bodies are a large colloidal particle, or
|
|
|
|
portions of a large biomolecule such as a protein.
|
|
|
|
|
|
|
|
Example of small rigid bodies are patchy nanoparticles, such as those
|
|
|
|
modeled by the "Glotzer group"_Glotzer, clumps of granular particles,
|
|
|
|
lipid molecules consiting of one or more point dipoles connected to
|
|
|
|
other spheroids or ellipsoids, and coarse-grain models of nano or
|
|
|
|
colloidal particles consisting of a small number of constituent
|
|
|
|
particles. Note that the "fix shake"_fix_shake 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.
|
|
|
|
|
|
|
|
The constituent particles within a rigid body can be point particles
|
|
|
|
(the default in LAMMPS) or finite-size particles, such as spheroids
|
|
|
|
and ellipsoids. See the "shape"_shape.html command and "atom_style
|
|
|
|
granular"_atom_style.html 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 "frictional granular
|
|
|
|
interactions"_pair_gran.html) and have an orientation. These
|
|
|
|
contributions are accounted for by the fix.
|
|
|
|
|
|
|
|
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 "neigh_modify
|
|
|
|
exclude"_neigh_modify.html and "delete_bonds"_delete_bonds.html
|
|
|
|
commands are used to do this. For finite-size particles this also
|
|
|
|
means the particles can be highly overlapped when creating the rigid
|
|
|
|
body.
|
|
|
|
|
|
|
|
IMPORTANT NOTE: This fix is 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 "velocity"_velocity.html
|
|
|
|
command), setting the force on them to 0.0 (via the "fix
|
2009-03-19 22:34:23 +08:00
|
|
|
setforce"_fix_setforce.html command), and integrating them as usual
|
|
|
|
(e.g. via the "fix nve"_fix_nve.html command).
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2009-03-05 01:24:41 +08:00
|
|
|
IMPORTANT NOTE: This fix updates the positions and velocities of the
|
|
|
|
rigid atoms with a constant-energy time integration, so you should not
|
|
|
|
update the same atoms via other fixes (e.g. nve, nvt, npt).
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2009-07-01 01:19:42 +08:00
|
|
|
:line
|
|
|
|
|
2009-01-13 22:38:26 +08:00
|
|
|
Each 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.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2009-01-13 22:38:26 +08:00
|
|
|
For bodystyle {single} the entire fix group of atoms is treated as one
|
|
|
|
rigid body.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2009-01-13 22:38:26 +08:00
|
|
|
For bodystyle {molecule}, each set of atoms in the fix group with a
|
|
|
|
different molecule ID is treated as a rigid body.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2009-01-13 22:38:26 +08:00
|
|
|
For bodystyle {group}, each of the listed groups is treated as a
|
|
|
|
separate rigid body. Only atoms that are also in the fix group are
|
2006-09-22 00:22:34 +08:00
|
|
|
included in each rigid body.
|
|
|
|
|
2009-01-13 22:38:26 +08:00
|
|
|
By default, each rigid body is acted on by other atoms which induce a
|
|
|
|
force and torque on its center of mass, causing it to translate and
|
|
|
|
rotate. Components of the center-of-mass force and torque can be
|
|
|
|
turned off by the {force} and {torque} keywords. This may be useful
|
|
|
|
if you wish a body to rotate but not translate, or vice versa. 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.
|
|
|
|
|
|
|
|
An xflag, yflag, or zflag set to {off} means turn off the component of
|
|
|
|
force of torque in that dimension. A setting of {on} 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 {force} and
|
|
|
|
{torque} 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 "*n" or
|
|
|
|
"n*" 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
|
2009-01-15 08:21:36 +08:00
|
|
|
means all types from m to n (inclusive). Note that you can use the
|
|
|
|
{force} or {torque} 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.
|
2009-01-13 22:38:26 +08:00
|
|
|
|
|
|
|
For computational efficiency, you may wish to turn off pairwise and
|
2006-09-22 00:22:34 +08:00
|
|
|
bond interactions within each rigid body, as they no longer contribute
|
|
|
|
to the motion. The "neigh_modify exclude"_neigh_modify.html and
|
|
|
|
"delete_bonds"_delete_bonds.html commands are used to do this.
|
|
|
|
|
|
|
|
For computational efficiency, you should define one fix rigid which
|
|
|
|
includes all the desired rigid bodies. LAMMPS will allow multiple
|
|
|
|
rigid fixes to be defined, but it is more expensive.
|
|
|
|
|
2008-01-10 07:22:14 +08:00
|
|
|
This fix uses constant-energy integration, so you may need to impose
|
|
|
|
additional constraints to control the temperature of an ensemble of
|
|
|
|
rigid bodies. You can use "fix langevin"_fix_langevin.html for this
|
|
|
|
purpose to treat the system as effectively immersed in an implicit
|
2009-01-23 02:56:18 +08:00
|
|
|
solvent, e.g. a Brownian dynamics model. Or you can thermostat only
|
|
|
|
the non-rigid atoms that surround one or more rigid bodies
|
|
|
|
(i.e. explicit solvent) by appropriate choice of groups in the compute
|
|
|
|
and fix commands for temperature and thermostatting.
|
|
|
|
|
|
|
|
If you do calculate a temperature for the rigid bodies, the
|
|
|
|
degrees-of-freedom removed by each rigid body are accounted for in the
|
|
|
|
temperature (and pressure) computation, but only if the temperature
|
|
|
|
group includes the entire rigid body. Rigid bodies in 3d have 6
|
|
|
|
degrees of freedom (3 translational, 3 rotational), except for dimers
|
|
|
|
which only have 5. Rigid bodies in 2d have 3 degrees of freedom.
|
|
|
|
Note that linear rigid bodies in 3d of three or more atoms also have 5
|
|
|
|
degrees of freedom instead of 6, but LAMMPS will not detect this. So
|
|
|
|
you should use the "compute_modify"_compute_modify.html command to
|
|
|
|
subtract an additional degree of freedom per rigid body. You may also
|
|
|
|
wish to explicitly subtract additional degrees-of-freedom if you use
|
|
|
|
the {force} and {torque} keywords to eliminate certain motions of the
|
|
|
|
rigid body, as LAMMPS does not do this automatically.
|
|
|
|
|
|
|
|
The rigid body contribution to the pressure of the system (virial) is
|
|
|
|
also accounted for by this fix.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2007-08-29 22:13:51 +08:00
|
|
|
IMPORTANT NOTE: The periodic image flags of atoms in rigid bodies are
|
|
|
|
modified when the center-of-mass of the rigid body moves across a
|
|
|
|
periodic boundary. They are not incremented/decremented as they would
|
|
|
|
be for non-rigid atoms. This change does not affect dynamics, but
|
|
|
|
means that any diagnostic computation based on the atomic image flag
|
|
|
|
values must be adjusted accordingly. For example, the "fix
|
|
|
|
msd"_fix_msd.html will not compute the expected mean-squared
|
|
|
|
displacement for such atoms, and the image flag values written to a
|
|
|
|
"dump file"_dump.html will be different than they would be if the
|
2008-10-08 23:02:35 +08:00
|
|
|
atoms were not in a rigid body. It also means that if you have bonds
|
|
|
|
between a pair of rigid bodies and the bond straddles a periodic
|
|
|
|
boundary, you cannot use the "replicate"_replicate command to increase
|
|
|
|
the system size.
|
2007-08-29 22:13:51 +08:00
|
|
|
|
2007-10-11 06:28:11 +08:00
|
|
|
[Restart, fix_modify, output, run start/stop, minimize info:]
|
2007-06-26 08:03:39 +08:00
|
|
|
|
|
|
|
No information about this fix is written to "binary restart
|
|
|
|
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
2009-01-13 22:38:26 +08:00
|
|
|
are relevant to this fix.
|
|
|
|
|
|
|
|
This fix computes a global vector of quantities which can be accessed
|
|
|
|
by various "output commands"_Section_howto.html#4_15. For each rigid
|
|
|
|
body, 12 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, and the xyz components of the torque
|
|
|
|
acting on the COM. The force and torque values in the vector are not
|
|
|
|
affected by the {force} and {torque} keywords in the fix rigid
|
|
|
|
command; they reflect values before any changes are made by those
|
|
|
|
keywords.
|
|
|
|
|
|
|
|
The total length of the vector is 12*Nbody where Nbody is the number
|
|
|
|
of rigid bodies defined by the fix. Thus the 15th value in the vector
|
|
|
|
would be the z-coord of the COM of the 2nd rigid body. LAMMPS chooses
|
|
|
|
the ordering of the rigid bodies internally. The ordering of the
|
|
|
|
rigid bodies is as follows. For the {single} keyword there is just
|
|
|
|
one rigid body. For the {molecule} keyword, the bodies are ordered by
|
|
|
|
ascending molecule ID. For the {group} keyword, the list of group IDs
|
|
|
|
determines the ordering of bodies. The vector values calculated by
|
|
|
|
this fix are "intensive", meaning they are independent of the number
|
|
|
|
of atoms in the simulation.
|
|
|
|
|
|
|
|
No parameter of this fix can be used with the {start/stop} keywords of
|
|
|
|
the "run"_run.html command. This fix is not invoked during "energy
|
|
|
|
minimization"_minimize.html.
|
2007-06-26 08:03:39 +08:00
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
[Restrictions:]
|
|
|
|
|
|
|
|
This fix performs an MPI_Allreduce each timestep that is proportional
|
|
|
|
in length to the number of rigid bodies. Hence it will not scale well
|
|
|
|
in parallel if large numbers of rigid bodies are simulated.
|
|
|
|
|
|
|
|
If the atoms in a single rigid body initially straddle a periodic
|
|
|
|
boundary, the input data file must define the image flags for each
|
|
|
|
atom correctly, so that LAMMPS can "unwrap" the atoms into a valid
|
|
|
|
rigid body.
|
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
|
|
|
"delete_bonds"_delete_bonds.html, "neigh_modify"_neigh_modify.html
|
|
|
|
exclude
|
|
|
|
|
2009-01-13 22:38:26 +08:00
|
|
|
[Default:]
|
|
|
|
|
2009-05-19 22:43:06 +08:00
|
|
|
The option defaults are force * on on on and torque * on on on meaning
|
2009-01-13 22:38:26 +08:00
|
|
|
all rigid bodies are acted on by center-of-mass force and torque.
|
|
|
|
|
2009-07-01 01:19:42 +08:00
|
|
|
:line
|
|
|
|
|
|
|
|
:link(Glotzer_group)
|
|
|
|
[(Zhang)] Zhang, Glotzer, Nanoletters, 4, 1407-1413 (2004).
|