next up previous contents index
Next: Subroutine BONDLENGTH Up: Module constraints_module Previous: Subroutine shake   Contents   Index

Subroutine rattle


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

This is the RATTLE part of the SHAKE/RATTLE algorithm. It adds forces to each atom which are in the directions of the gradients of the constraint functions (evaluated at the NEW positions) such that the constraints are obeyed to within the preset tolerance by the new velocities.

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

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

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

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

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

store_constraint_force -- logical, optional, intent(in)

BONDLENGTH subroutine

gabor 2009-06-30