Gromacs
2024.3
|
Classes | |
class | ShakeTest |
Test fixture for testing SHAKE. More... | |
Functions | |
std::vector< RVec > | computeDisplacements (ArrayRef< const int > iatom, const std::vector< RVec > &positions) |
Compute the displacements between pairs of constrained atoms described in the iatom "topology". | |
std::vector< real > | 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". More... | |
std::vector< real > | computeDistancesSquared (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... | |
std::vector<real> 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))
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.