Gromacs
2024.4
|
#include <programs/mdrun/tests/trajectorycomparison.h>
Function object to compare the fields of two frames vs each others or one frame vs reference data for equality given the matchSettings_
and tolerances_
.
If using two frames, they are required to have valid and matching values for time and step. According to matchSettings_
, box, position coordinates, velocities and/or forces will be compared between frames, using the tolerances_
. Comparisons will only occur when both frames have the requisite data, and will be expected to be equal within the matching component of tolerances_
. If a comparison fails, a GoogleTest expectation failure will be given. If a comparison is required by matchSettings_
but cannot be done because either (or both) frames lack the requisite data, descriptive expectation failures will be given.
When comparing a frame to reference data, according to matchSettings_
, box, position coordinates, velocities and/or forces will be compared to reference data, using the tolerances_
. If a comparison fails, a GoogleTest expectation failure will be given. If a comparison is required by matchSettings_
but cannot be done because the frame lacks the requisite data, descriptive expectation failures will be given.
Public Member Functions | |
TrajectoryComparison (const TrajectoryFrameMatchSettings &matchSettings, const TrajectoryTolerances &tolerances) | |
Constructor. | |
void | operator() (const TrajectoryFrame &reference, const TrajectoryFrame &test) const |
Compare reference with test given the matchSettings_ within tolerances_ . | |
void | operator() (const TrajectoryFrame &frame, TestReferenceChecker *checker) const |
Compare frame to reference given the matchSettings_ within tolerances_ . | |
Static Public Attributes | |
static const TrajectoryTolerances | s_defaultTrajectoryTolerances |
Defaults for trajectory comparisons. More... | |
|
static |
Defaults for trajectory comparisons.