Gromacs  2024.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions
energyreader.h File Reference
#include <cstdint>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "gromacs/fileio/enxio.h"
#include "gromacs/utility/classhelpers.h"
#include "gromacs/utility/unique_cptr.h"
#include "testutils/testasserts.h"
+ Include dependency graph for energyreader.h:
+ This graph shows which files directly or indirectly include this file:


Interfaces of related classes for tests that want to inspect energies produced by mdrun.

The responsibilities for reading and sharing information from .edr files in an exception-safe manner are shared between two classes. Intended usage is to call openEnergyFileToReadFields() to return an EnergyFrameReader that knows it expects to read the named .edr fields from each frame. Successive calls to its EnergyFrameReader::readNextFrame() and EnergyFrameReader::frame() methods will return EnergyFrame objects that contain the values for the .edr fields registered earlier.

Mark Abraham


class  gmx::test::EnergyFrameReader
 Manages returning an EnergyFrame containing required energy term values read from successive frames of an .edr file. More...


typedef std::unique_ptr
< EnergyFrameReader > 
 Convenience smart pointer typedef.
typedef unique_cptr< ener_file,
done_ener_file > 
 Convenience smart pointer typedef.
typedef unique_cptr
< t_enxframe, done_enxframe > 
 Convenience smart pointer typedef.


EnergyFrameReaderPtr gmx::test::openEnergyFileToReadTerms (const std::string &filename, const std::vector< std::string > &requiredEnergyTermNames)
 Open the file and return an object that can read the required terms from frames of an .edr file. More...
void gmx::test::done_enxframe (t_enxframe *fr)
 Helper function to clean up resources. More...