diff --git a/doc/fix_shake.html b/doc/fix_shake.html index c1f62b8ac7..10106b216c 100644 --- a/doc/fix_shake.html +++ b/doc/fix_shake.html @@ -15,11 +15,11 @@
Syntax:
-fix ID group-ID shake tol iter N constraint values ... keyword value ... +fix ID group-ID shake/rattle tol iter N constraint values ... keyword value ...
fix 1 sub rattle 0.0001 20 10 t 5 6 m 1.0 a 31 +fix 1 sub rattle 0.0001 20 10 t 5 6 m 1.0 a 31 mol myMol +
Description:
Apply bond and angle constraints to specified bonds and angles in the simulation. This typically enables a longer timestep.
+SHAKE vs. RATTLE: +
+The SHAKE algorithm was invented for schemes such as Verlet, where only the coordinates +are integrated and the velocities are approximated as finite differences to the trajectories (Ryckaert et al. (1977)). +If the velocities are integrated explicitly, for example with velocity Verlet, +a second set of constraining forces is required in order to eliminate velocity components along the bonds (Andersen (1983)). +
+In order to formulate the individual constraints for SHAKE and RATTLE, let us focus on a single molecule whose +bonds are to be constrained. Let image(Eqs/fix_rattle_ri.jpg) and image(Eqs/fix_rattle_vi.jpg) be the position and velocity of atom i at time n, for i=1,...,N, where N is the number of sites of our reference molecule. The distance vector between sites i and j is given by image(Eqs/fix_rattle_rij.jpg). The constraints can then be formulated as +
+The SHAKE algorithm satisfies the first condition, i.e. the sites at time n+1 will have the desired separations image(Eqs/fix_rattle_dij.jpg) immediately after the coordinates are integrated. +If we also enforce the second condition, the velocity components along the bonds will vanish. +RATTLE satisfies both conditions and fix rattle is implemented in a way that it uses fix shake for dealing with the coordinate constraints. Therefore all the information about SHAKE below is also relevant for RATTLE. +
+SHAKE: +
Each timestep the specified bonds and angles are reset to their equilibrium lengths and angular values via the well-known SHAKE algorithm. This is done by applying an additional constraint force so @@ -144,6 +165,24 @@ more instructions on how to use the accelerated styles effectively.
RATTLE: +
+The velocity constraints lead to a linear system of equations which +can be solved analytically. The implementation of the algorithm in LAMMPS +closely follows Andersen (1983). +
+IMPORTANT NOTE: This command modifies forces and velocities and +it has to come after all other integration fixes. If you define other +fixes that modify velocities or forces after fix rattle operates, +then this fix will not take them into account and the time integration +will typically not satisfy the RATTLE constraints. You can check whether +the constraints work correctly by setting the value of RATTLE_DEBUG in fix_rattle.cpp +to 1 and recompiling LAMMPS. +
+IMPORTANT NOTE: RATTLE does not support cuda at the moment. +
+Restart, fix_modify, output, run start/stop, minimize info:
No information about this fix is written to binary restart @@ -173,4 +212,16 @@ of SHAKE parameters and monitoring the energy versus time.
Default: none
+(Ryckaert) J.-P. Ryckaert, G. Ciccotti and H. J. C. Berendsen, +Journal of Computational Physics, 23, 327–341 (1977). +
+ + +(Andersen) H. Andersen, +Journal of Computational Physics, 52, 24-34 (1983). +