Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
gmx::PositionCalculationCollection::Impl Class Reference
+ Collaboration diagram for gmx::PositionCalculationCollection::Impl:

Description

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_tcreateCalculation (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_tfirst_
 Pointer to the first data structure.
 
gmx_ana_poscalc_tlast_
 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.
 

Member Function Documentation

gmx_ana_poscalc_t * gmx::PositionCalculationCollection::Impl::createCalculation ( e_poscalc_t  type,
int  flags 
)

Creates a new position calculation.

Parameters
[in]typeType of calculation.
[in]flagsFlags 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.

ArrayRef<const int> gmx::PositionCalculationCollection::Impl::getFrameIndices ( int  size,
int  index[] 
)
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.

Parameters
pcData structure to insert.
beforeData 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.

Parameters
pcData structure to remove.

Removes pc from its collection.

Member Data Documentation

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.


The documentation for this class was generated from the following file: