Gromacs  2023.1
gmx::anonymous_namespace{shake.cpp} Namespace Reference

## Classes

class  ShakeTest
Test fixture for testing SHAKE. More...

## Functions

std::vector< RVeccomputeDisplacements (ArrayRef< const int > iatom, const std::vector< RVec > &positions)
Compute the displacements between pairs of constrained atoms described in the iatom "topology".

std::vector< realcomputeHalfOfReducedMasses (const std::vector< int > &iatom, const std::vector< real > &inverseMasses)
Compute half of the reduced mass of each pair of constrained atoms in the iatom "topology". More...

std::vector< realcomputeDistancesSquared (ArrayRef< const RVec > displacements)
Compute the distances corresponding to the vector of displacements components.

## Variables

const int constraintStride = 3
Stride of the vector of int used to describe each SHAKE constraint. More...

## Function Documentation

 std::vector gmx::anonymous_namespace{shake.cpp}::computeHalfOfReducedMasses ( const std::vector< int > & iatom, const std::vector< real > & inverseMasses )

Compute half of the reduced mass of each pair of constrained atoms in the iatom "topology".

The reduced mass is m = 1/(1/m_i + 1/m_j))

## Variable Documentation

 const int gmx::anonymous_namespace{shake.cpp}::constraintStride = 3

Stride of the vector of int used to describe each SHAKE constraint.

Like other such code, SHAKE is hard-wired to use t_ilist.iatoms as a flat vector of tuples of general data. Here, they are triples containing the index of the constraint type, and then the indices of the two atoms involved. So for each constraint, we must stride this vector by three to get access to its information.