rigid command
Purpose
Define a rigid body from a group of arbitrary particles.
Syntax
rigid keyword value
zero or more keyword/value pairs may be appended
keyword = id or particle_group or groups or force or torque or apply_to
id value = command-ID
command-ID = user-assigned name for the command call
particle_group = group-ID
group-ID = ID of the group of particles on which the command is applied
groups values = {group-ID1,..., group-IDi,...,group-IDn}
group-IDi = ith group ID in the list
force values = {xflag, yflag, zflag}
xflag,yflag,zflag = off/on if component of center-of-mass force is active
torque values = {xflag,yflag,zflag}
xflag,yflag,zflag = off/on if component of center-of-mass torque is active
apply_to values = * or *group-IDj or group-IDi* or group-IDi*group-IDj
* = apply to all groups in the list
*group-IDj = apply to the groups in the list which ID spans from group-ID1 to group-IDj
group-IDi* = apply to the groups in the list which ID spans from group-IDi to group-IDn
group-IDi*group-IDj = apply to the groups in the list which ID spans from group-IDi to group-IDj
Examples
rigid particle_group clump force {off, off, on}
rigid groups {clump1, clump2, clump3} torque {off, off, off} apply_to clump2*
Description
Treat one or more sets of particles 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 and the coordinates, velocities, and orientations of the particles 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 particles, or portions of a large biomolecule such as a protein. This command is suitable 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; in this case, you might consider using multispheres instead.
This command also updates the positions and velocities of the particles in each rigid body via time integration, in the NVE ensemble.
Warning
You should not update the particles in rigid bodies via other time-integration commands (i.e. integrator), or you will be integrating their motion more than once each timestep. When performing a hybrid simulation with some particles in rigid bodies, and some not, a separate time integration like integrator should be used for the non-rigid particles.
Warning
This command is overkill if you simply want to hold a collection of particles stationary or have them move with a constant velocity. A simpler way to hold particles stationary is to not include those particles in your time integration. E.g. use “integrator mobile” instead of “integrator all” or “integrator”, where “mobile” is the group of particles that you want to be mobile. You can move particles with a constant velocity by assigning them an initial velocity (via the velocity command), setting the force on them to 0.0 (via the fix setforce command), and integrating them as usual (i.e. via the integrator command).
Each rigid body must consist of two or more particles. A particle can belong to at most one rigid body. Which particles are in which bodies can be defined via several options.
The groups listed after the keyword groups are treated as separate rigid bodies. Only the particles that are also in the group specified by the keyword particle_group are included in each rigid body. If the keyword groups is not specified, then all the particles in the group defined by particle_group belong to the same rigid body.
Warning
To compute the initial center-of-mass position and other properties of each rigid body, the image flags for each particle in the body are used to “unwrap” the particle coordinates. Thus you must ensure that these image flags are consistent so that the unwrapping creates a valid rigid body (one where the particles are close together), particularly if the particles 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 particle consistently or that you have used the set command to specify them correctly. If a dimension is non-periodic then the image flag of each particle must be 0 in that dimension, else an error is generated.
The force and torque keywords discussed next are only allowed for the rigid command and its sub-styles.
By default, each rigid body is acted on by other particles 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 force and torque 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 ensure its initial center-of-mass translational or angular velocity is 0.0. Otherwise the initial translational or angular momentum the body has will persist.
An xflag, yflag, or zflag set to off turns off the component of force of torque in that dimension. A setting of on turns on the component, which is the default. Which rigid body(s) the settings apply to is determined by the additional apply_to keyword which expects you to specify the groups on which the force and/or torque settings will be applied to. Note that the apply_to keyword can be used only when the group list is not empty. To include all rigid bodies a wild-card asterisk can be used after apply_to. To include the first i groups in the list, an asterisk followed by the i-th group-ID should be used after apply_to. To include the last j groups in the list, the j-th group-ID followed by an asterisk should be used after apply_to. Finally, to include the groups from the ith to the jth, apply_to should be followed by the i-th group-ID, an asterisk and the j-th group-ID.
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.
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 neigh_modify exclude command is used to do this.
For computational efficiency, you should typically define one rigid command which includes all the desired rigid bodies. Aspherix® will allow multiple rigid commands to be defined, but it is more expensive.
The constituent particles within a rigid body can be point particles (the default in Aspherix®) or finite-size particles, such as spheres or ellipsoids or line segments or triangles. See the atom_style sphere and ellipsoid and line and tri 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 frictional granular interactions) and have an orientation. These contributions are accounted for by these fixes.
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 command is used to do this. For finite-size particles this also means the particles can be highly overlapped when creating the rigid body.
The rigid style performs constant NVE time integration based on Richardson iterations.
Restart, fix_modify, output, run start/stop
No information is written to binary restart files. read_restart 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.
The modify_command energy 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 status output.
The modify_command temp and press 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.
The command computes a global scalar which can be accessed by various output commands. The scalar value calculated by this command 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 force and torque keywords are removed from this calculation, but only for the rigid and rigid/nve fixes.
This command computes a global array of values which can be accessed by various output commands. 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, which have the same meaning as image flags for atom positions (see the “dump” command). The force and torque values in the array 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 array values calculated by these fixes are “intensive”, meaning they are independent of the number of atoms in the simulation.
No parameter of this command can be used with the start/stop keywords of the run command.
Restrictions
none
Default
The option defaults are force * on on on and torque * on on on, meaning all rigid bodies are acted on by center-of-mass force and torque. The default value for particle_group is all.
(Hoover) Hoover, Phys Rev A, 31, 1695 (1985).
(Kamberaj) Kamberaj, Low, Neal, J Chem Phys, 122, 224114 (2005).
(Martyna) Martyna, Klein, Tuckerman, J Chem Phys, 97, 2635 (1992); Martyna, Tuckerman, Tobias, Klein, Mol Phys, 87, 1117.
(Miller) Miller, Eleftheriou, Pattnaik, Ndirango, and Newns, J Chem Phys, 116, 8649 (2002).
(Zhang) Zhang, Glotzer, Nanoletters, 4, 1407-1413 (2004).