next up previous contents index
Next: Subroutine rattle Up: Module constraints_module Previous: Subroutine constraint_store_gradient   Contents   Index

Subroutine shake


\begin{boxedminipage}{\textwidth}
\begin{verbatim}call shake(at,g,constraints,t, &
dt[,store_constraint_force])\end{verbatim}
\end{boxedminipage}

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.

at -- type(atoms), intent(inout)

the atoms object

g -- type(group), intent(in)

the constrained group

constraints -- type(constraint), intent(inout), dimension(:)

an array of all the dynamicalsystem's constraints

t, dt -- real(dp), intent(in)

the current time, and the time step

store_constraint_force -- logical, optional, intent(in)

rattle subroutine

gabor 2009-06-30