Gromacs  2024.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Member Functions
gmx::analysismodules::anonymous_namespace{msd.cpp}::MsdData Class Reference


Mean Squared Displacement data accumulator.

This class is used to accumulate individual MSD data points and emit tau-averaged results once data is finished collecting. Displacements at each observed time difference (tau) are recorded from the trajectory. Because it is not known in advance which time differences will be observed from the trajectory, this data structure is built adaptively. New columns corresponding to observed time differences are added as needed, and additional observations at formerly observed time differences are added to those columns. Separate time lags will likely have differing total data points.

Data columns per tau are accessed via operator[], which always guarantees a column is initialized and returns an MsdColumProxy to the column that can push data.


class  MsdColumnProxy
 Proxy to a MsdData tau column vector. Supports only push_back. More...

Public Member Functions

MsdColumnProxy operator[] (size_t index)
 Returns a proxy to the column for the given tau index. Guarantees that the column is initialized.
std::vector< realaverageMsds () const
 Compute per-tau MSDs averaged over all added points. More...

Member Function Documentation

std::vector< real > gmx::analysismodules::anonymous_namespace{msd.cpp}::MsdData::averageMsds ( ) const

Compute per-tau MSDs averaged over all added points.

The resulting vector is size(max tau index). Any indices that have no data points have MSD set to 0.

Average MSD per tau

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