Gromacs
2026.0-dev-20241106-9ba7f4d
|
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.
Classes | |
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< real > | averageMsds () const |
Compute per-tau MSDs averaged over all added points. More... | |
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.