Gromacs
2024.4
|
Private implementation class for PositionCalculationCollection.
Public Member Functions | |
void | insertCalculation (gmx_ana_poscalc_t *pc, gmx_ana_poscalc_t *before) |
Inserts a position calculation structure into its collection. More... | |
void | removeCalculation (gmx_ana_poscalc_t *pc) |
Removes a position calculation structure from its collection. More... | |
gmx_ana_poscalc_t * | createCalculation (e_poscalc_t type, int flags) |
Creates a new position calculation. More... | |
ArrayRef< const int > | getFrameIndices (int size, int index[]) |
Maps given topology indices into frame indices. More... | |
Public Attributes | |
const gmx_mtop_t * | top_ |
Topology data. More... | |
gmx_ana_poscalc_t * | first_ |
Pointer to the first data structure. | |
gmx_ana_poscalc_t * | last_ |
Pointer to the last data structure. | |
bool | bInit_ |
Whether the collection has been initialized for evaluation. | |
std::vector< int > | mapToFrameAtoms_ |
Mapping from topology atoms to frame atoms (one index for each topology atom). | |
std::vector< int > | tmpFrameAtoms_ |
Working array for updating positions. | |
gmx_ana_poscalc_t * gmx::PositionCalculationCollection::Impl::createCalculation | ( | e_poscalc_t | type, |
int | flags | ||
) |
Creates a new position calculation.
[in] | type | Type of calculation. |
[in] | flags | Flags for setting calculation options (see documentation of the flags). |
Does not throw currently, but may throw std::bad_alloc in the future.
This method contains the actual implementation of the similarly named method in the parent class.
|
inline |
Maps given topology indices into frame indices.
Only one position calculation at a time needs to access this (and there are also other thread-unsafe constructs here), so a temporary array is used to avoid repeated memory allocation.
void gmx::PositionCalculationCollection::Impl::insertCalculation | ( | gmx_ana_poscalc_t * | pc, |
gmx_ana_poscalc_t * | before | ||
) |
Inserts a position calculation structure into its collection.
pc | Data structure to insert. |
before | Data structure before which to insert (NULL = insert at end). |
Inserts pc
to its collection before before
. If before
is NULL, pc
is appended to the list.
void gmx::PositionCalculationCollection::Impl::removeCalculation | ( | gmx_ana_poscalc_t * | pc | ) |
Removes a position calculation structure from its collection.
pc | Data structure to remove. |
Removes pc
from its collection.
const gmx_mtop_t* gmx::PositionCalculationCollection::Impl::top_ |
Topology data.
Can be NULL if none of the calculations require topology data or if setTopology() has not been called.