|
Gromacs
2023.4
|
#include <gromacs/mdlib/updategroupscog.h>
Class for managing and computing centers of geometry of update groups.
Public Member Functions | |
| UpdateGroupsCog (const gmx_mtop_t &mtop, gmx::ArrayRef< const gmx::RangePartitioning > updateGroupingsPerMoleculeType, real temperature, int numHomeAtoms) | |
| Constructor. More... | |
| void | addCogs (gmx::ArrayRef< const int > globalAtomIndices, gmx::ArrayRef< const gmx::RVec > coordinates) |
| Compute centers of geometry for supplied coordinates. More... | |
| int | numCogs () const |
| Returns the number of centers of geometry currently stored. | |
| RVec & | cog (int cogIndex) |
| Returns a reference to a center of geometry. More... | |
| int | cogIndex (int atomIndex) const |
| Returns the COG index given an atom index. More... | |
| const RVec & | cogForAtom (int atomIndex) const |
| Return a reference to a center of geometry given an atom index. More... | |
| void | clear () |
| Clear the lists of stored center of geometry coordinates. | |
| real | maxUpdateGroupRadius () const |
| Returns the maximum radius over all update groups. | |
| gmx::UpdateGroupsCog::UpdateGroupsCog | ( | const gmx_mtop_t & | mtop, |
| gmx::ArrayRef< const gmx::RangePartitioning > | updateGroupingsPerMoleculeType, | ||
| real | temperature, | ||
| int | numHomeAtoms | ||
| ) |
Constructor.
The temperature is used for computing the maximum update group radius.
numHomeAtoms only affects the performance up till the first call to clear().| [in] | mtop | The global topology |
| [in] | updateGroupingsPerMoleculeType | List of update groups for each molecule type in mtop |
| [in] | temperature | The maximum reference temperature, pass -1 when unknown or not applicable |
| [in] | numHomeAtoms | Estimate of the number of home atoms per DD cell |
| void gmx::UpdateGroupsCog::addCogs | ( | gmx::ArrayRef< const int > | globalAtomIndices, |
| gmx::ArrayRef< const gmx::RVec > | coordinates | ||
| ) |
Compute centers of geometry for supplied coordinates.
Coordinates are processed starting after the last index processed in the previous call to addCogs(), unless clear() was called last, in which case processing starts at 0.
| [in] | globalAtomIndices | List of global atom indices for the atoms belonging to coordinates |
| [in] | coordinates | List of coordinates to be processed, processing might not start at 0 (see above) |
|
inline |
Returns a reference to a center of geometry.
| [in] | cogIndex | The COG requested, should be; 0 <= cogIndex < cogs_.size() |
|
inline |
Return a reference to a center of geometry given an atom index.
| [in] | atomIndex | The atom index that maps to the COG requested |
|
inline |
Returns the COG index given an atom index.
| [in] | atomIndex | The local atom index that maps to the COG |
1.8.5