Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
gmx::test::anonymous_namespace{energyoutput.cpp}::EnergyOutputTest Class Reference

Inherits TestWithParam< EnergyOutputTestParameters >.

+ Collaboration diagram for gmx::test::anonymous_namespace{energyoutput.cpp}::EnergyOutputTest:

Description

Test fixture to test energy output.

The class is initialized to maximize amount of energy terms printed. The test is run for different combinations of temperature and pressure control schemes. Different number of printed steps is also tested.

Public Member Functions

void setStepData (double *testValue)
 Helper function to generate synthetic data to output. More...
 
void checkEdrFile (const char *fileName, int frameCount)
 Check if the contents of the .edr file correspond to the reference data. More...
 

Public Attributes

TestFileManager fileManager_
 File manager.
 
ener_file_t energyFile_
 Energy (.edr) file.
 
t_inputrec inputrec_
 Input data.
 
gmx_mtop_t mtop_
 Topology.
 
double time_
 Simulation time.
 
real tmass_
 Total mass.
 
std::unique_ptr< gmx_enerdata_tenerdata_
 Potential energy data.
 
gmx_ekindata_t ekindata_
 Kinetic energy data (for temperatures output)
 
t_state state_
 System state.
 
matrix box_
 PBC box.
 
tensor totalVirial_
 Total virial.
 
tensor pressure_
 Pressure.
 
std::vector< std::string > groupNameStrings_ = { "Protein", "Water", "Lipid" }
 Names for the groups.
 
std::vector< std::vector< char > > groupNameCStrings_
 Names for the groups as C strings.
 
std::vector< char * > groupNameHandles_
 Handles to the names as C strings in the way needed for SimulationGroups.
 
rvec muTotal_
 Total dipole momentum.
 
t_commrec cr_
 Communication record.
 
std::unique_ptr< Constraintsconstraints_
 Constraints object (for constraints RMSD output in case of LINCS)
 
std::string logFilename_
 Temporary output filename.
 
std::string edrFilename_
 Temporary energy output filename.
 
FILE * log_
 Pointer to a temporary output file.
 
unique_cptr< FILE, fcloseWrapperlogFileGuard_
 Log file wrapper.
 
TestReferenceData refData_
 Reference data.
 
TestReferenceChecker checker_
 Checker for reference data.
 

Member Function Documentation

void gmx::test::anonymous_namespace{energyoutput.cpp}::EnergyOutputTest::checkEdrFile ( const char *  fileName,
int  frameCount 
)
inline

Check if the contents of the .edr file correspond to the reference data.

The code below is based on the 'gmx dump' tool.

Parameters
[in]fileNameName of the file to check.
[in]frameCountNumber of frames to check.
void gmx::test::anonymous_namespace{energyoutput.cpp}::EnergyOutputTest::setStepData ( double *  testValue)
inline

Helper function to generate synthetic data to output.

Parameters
[in,out]testValueBase value fr energy data.

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