Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
gmx::test::anonymous_namespace{exactcontinuation.cpp}::ContinuationFramePairManager< FrameReader > Class Template Reference


template<class FrameReader>
class gmx::test::anonymous_namespace{exactcontinuation.cpp}::ContinuationFramePairManager< FrameReader >

Manages comparing a pair of matching energy frames from a normal run and the same run in two parts.

The passed frame readers must contain logically equivalent contents, with no extra or missing frames from either the one- or two-part run.

This class has a similar interface with one in mdcomparison.h, but not enough to warrant extracting an interface class. Perhaps parts of this should be cast as a class that returns iterators to successive frames, so that the fancy footwork for pretending a two-part run is one sequence is separate from the comparison of that sequene with that of the one-part run?
Template Parameters
FrameReaderHas readNextFrame() and frame() methods useful for returning successive Frame objects

Public Types

typedef std::unique_ptr
< FrameReader > 
 Convenience typedef.

Public Member Functions

 ContinuationFramePairManager (FrameReaderPtr full, FrameReaderPtr firstPart, FrameReaderPtr secondPart)
bool shouldContinueComparing ()
 Probe for a pair of valid frames, and return true if both are found. More...
template<class Frame >
void compareAllFramePairs (std::function< void(const Frame &, const Frame &)> compareTwoFrames)
 Compare all possible pairs of frames using compareTwoFrames. More...

Member Function Documentation

template<class FrameReader >
template<class Frame >
void gmx::test::anonymous_namespace{exactcontinuation.cpp}::ContinuationFramePairManager< FrameReader >::compareAllFramePairs ( std::function< void(const Frame &, const Frame &)>  compareTwoFrames)

Compare all possible pairs of frames using compareTwoFrames.

Template Parameters
FrameThe type of frame used in the comparison (returned by FrameReader and used by compareTwoFrames).
template<class FrameReader >
bool gmx::test::anonymous_namespace{exactcontinuation.cpp}::ContinuationFramePairManager< FrameReader >::shouldContinueComparing ( )

Probe for a pair of valid frames, and return true if both are found.

Gives a test failure if exactly one frame is found, because it is an error for either run to have missing or extra frames. Note that the frame where the two-part run ends and begins is duplicated between the two output files by mdrun, and the test accommodates this.

This would be straightforward if velocity Verlet behaved like other integrators.

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