git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@191 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -72,7 +72,11 @@ rigid fixes to be defined, but it is more expensive.
|
||||
temperature and pressure computations. Similary, the rigid body
|
||||
contribution to the pressure virial is also accounted for. The latter
|
||||
is only correct if forces within the bodies have been turned off, and
|
||||
there is only a single fix rigid defined.
|
||||
there is only a single fix rigid defined. For each linear rigid body
|
||||
of three or more atoms, one degree-of-freedom must be added using a
|
||||
<A HREF = "temp_modify.html">temp_modify</A> command (i.e. for a simulation of 10
|
||||
such rigid bodies, use "temp_modify mine extra -7", where 3 is the
|
||||
default setting and -10 degrees-of-freedom are subtracted).
|
||||
</P>
|
||||
<P>Note that this fix uses constant-energy integration, so you need to
|
||||
impose additional constraints to control the temperature of an
|
||||
|
||||
@ -65,7 +65,11 @@ The degrees-of-freedom removed by rigid bodies are accounted for in
|
||||
temperature and pressure computations. Similary, the rigid body
|
||||
contribution to the pressure virial is also accounted for. The latter
|
||||
is only correct if forces within the bodies have been turned off, and
|
||||
there is only a single fix rigid defined.
|
||||
there is only a single fix rigid defined. For each linear rigid body
|
||||
of three or more atoms, one degree-of-freedom must be added using a
|
||||
"temp_modify"_temp_modify.html command (i.e. for a simulation of 10
|
||||
such rigid bodies, use "temp_modify mine extra -7", where 3 is the
|
||||
default setting and -10 degrees-of-freedom are subtracted).
|
||||
|
||||
Note that this fix uses constant-energy integration, so you need to
|
||||
impose additional constraints to control the temperature of an
|
||||
|
||||
@ -832,11 +832,14 @@ int FixRigid::dof(int igroup)
|
||||
int *nall = new int[nbody];
|
||||
MPI_Allreduce(ncount,nall,nbody,MPI_INT,MPI_SUM,world);
|
||||
|
||||
// remove 3N - 6 dof for each rigid body if at least 2 atoms are in igroup
|
||||
// remove 3N - 6 dof for each rigid body if more than 2 atoms are in igroup
|
||||
// remove 3N - 5 dof for each diatomic rigid body
|
||||
|
||||
int n = 0;
|
||||
for (int ibody = 0; ibody < nbody; ibody++)
|
||||
for (int ibody = 0; ibody < nbody; ibody++) {
|
||||
if (nall[ibody] > 2) n += 3*nall[ibody] - 6;
|
||||
else if (nall[ibody] == 2) n++;
|
||||
}
|
||||
|
||||
delete [] ncount;
|
||||
delete [] nall;
|
||||
|
||||
Reference in New Issue
Block a user