This is the SHAKE part of the SHAKE/RATTLE algorithm. It adds forces to each atom which are in the directions of the gradients of the constraint functions such that the constraints are obeyed to within the preset tolerance at the new positions.
the atoms object
the constrained group
an array of all the dynamicalsystem's constraints
the current time, and the time step