Gromacs  2025-dev-20240718-982dfdc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Enumerations | Functions | Variables
gmx::analysismodules::anonymous_namespace{msd.cpp} Namespace Reference

Classes

class  MsdData
 Mean Squared Displacement data accumulator. More...
 
struct  MoleculeData
 Holds data needed for MSD calculations for a single molecule, if requested. More...
 
class  MsdCoordinateManager
 Handles coordinate operations for MSD calculations. More...
 
struct  MsdGroupData
 Holds per-group coordinates, analysis, and results. More...
 

Enumerations

enum  SingleDimDiffType : int {
  X = 0, Y, Z, Unused,
  Count
}
 Describes 1D MSDs, in the given dimension.
 
enum  TwoDimDiffType : int {
  NormalToX = 0, NormalToY, NormalToZ, Unused,
  Count
}
 Describes 2D MSDs, in the plane normal to the given dimension.
 

Functions

template<bool x, bool y, bool z>
double calcSingleSquaredDistance (const RVec c1, const RVec c2)
 Calculates 1,2, or 3D distance for two vectors. More...
 
template<bool x, bool y, bool z>
double calcAverageDisplacement (ArrayRef< const RVec > c1, ArrayRef< const RVec > c2)
 Calculate average displacement between sets of points. More...
 
void removePbcJumps (ArrayRef< RVec > currentCoords, ArrayRef< const RVec > previousCoords, t_pbc *pbc)
 Removes jumps across periodic boundaries for currentFrame, based on the positions in previousFrame. Updates currentCoords in place.
 

Variables

constexpr double c_diffusionConversionFactor = 1000.0
 Convert nm^2/ps to 10e-5 cm^2/s.
 
constexpr double c_3DdiffusionDimensionFactor = 6.0
 Three dimensional diffusion coefficient multiplication constant.
 
constexpr double c_2DdiffusionDimensionFactor = 4.0
 Two dimensional diffusion coefficient multiplication constant.
 
constexpr double c_1DdiffusionDimensionFactor = 2.0
 One dimensional diffusion coefficient multiplication constant.
 

Function Documentation

template<bool x, bool y, bool z>
double gmx::analysismodules::anonymous_namespace{msd.cpp}::calcAverageDisplacement ( ArrayRef< const RVec >  c1,
ArrayRef< const RVec >  c2 
)

Calculate average displacement between sets of points.

Each displacement c1[i] - c2[i] is calculated and the distances are averaged.

Template Parameters
xIf true, calculate x dimension of displacement
yIf true, calculate y dimension of displacement
zIf true, calculate z dimension of displacement
Parameters
[in]c1First vector
[in]c2Second vector
Returns
Per-particle averaged distance
template<bool x, bool y, bool z>
double gmx::analysismodules::anonymous_namespace{msd.cpp}::calcSingleSquaredDistance ( const RVec  c1,
const RVec  c2 
)
inline

Calculates 1,2, or 3D distance for two vectors.

Todo:
Remove NOLINTs once clang-tidy is updated to v11, it should be able to handle constexpr.
Template Parameters
xIf true, calculate x dimension of displacement
yIf true, calculate y dimension of displacement
zIf true, calculate z dimension of displacement
Parameters
[in]c1First point
[in]c2Second point
Returns
Euclidian distance for the given dimension.