Gromacs
5.1.5
|
#include <programs/mdrun/tests/moduletest.h>
Helper object for running grompp and mdrun in integration tests of mdrun functionality.
Objects of this class are intended to be owned by IntegrationTestFixture objects, and an IntegrationTestFixture object might own more than one SimulationRunner.
The setup phase creates various temporary files for input and output that are common for mdrun tests, using the file manager object of the fixture that owns this object. Individual tests should create any extra filenames similarly, so that the test users's current working directory does not get littered with files left over from tests.
Any method in this class may throw std::bad_alloc if out of memory.
Public Member Functions | |
SimulationRunner (IntegrationTestFixture *fixture_) | |
Constructor, which establishes the fixture that will own each object. | |
void | useEmptyMdpFile () |
Use an empty .mdp file as input to grompp. | |
void | useStringAsMdpFile (const char *mdpString) |
Use a given string as input to grompp. | |
void | useStringAsMdpFile (const std::string &mdpString) |
Use a given string as input to grompp. | |
void | useStringAsNdxFile (const char *ndxString) |
Use a string as -n input to grompp. | |
void | useTopGroAndNdxFromDatabase (const char *name) |
Use a standard .top and .gro file as input to grompp. | |
void | useGroFromDatabase (const char *name) |
Use a standard .gro file as input to grompp. | |
int | callGrompp () |
Calls grompp (on rank 0) to prepare for the mdrun test. | |
int | callGromppOnThisRank () |
Calls grompp (on this rank) to prepare for the mdrun test. | |
int | callMdrun (const CommandLine &callerRef) |
Calls mdrun for testing with a customized command line. | |
int | callMdrun () |
Convenience wrapper for calling mdrun for testing with default command line. | |
Public Attributes | |
Names for frequently used grompp and mdrun output files | |
These strings can be set to point to files present in the source tree, or to temporary files created for the test fixture. In the latter case, IntegrationTestFixture::fileManager_ should be used to fill these strings with paths to files, so that they are created in a temporary directory and (by default behaviour of TestFileManager) deleted when the test is complete. | |
std::string | topFileName_ |
std::string | groFileName_ |
std::string | fullPrecisionTrajectoryFileName_ |
std::string | reducedPrecisionTrajectoryFileName_ |
std::string | groOutputFileName_ |
std::string | ndxFileName_ |
std::string | mdpInputFileName_ |
std::string | mdpOutputFileName_ |
std::string | tprFileName_ |
std::string | logFileName_ |
std::string | edrFileName_ |
std::string | cptFileName_ |
std::string | swapFileName_ |
int | nsteps_ |