/* This test ensures that the compel protocol can be run, that all of * the swapcoords parameters from the .mdp file are understood, and that * the swap state variables can be written to and read from checkpoint. */ TEST_F(CompelTest, SwapCanRun) { std::string name = "OctaneSandwich"; useTopGroAndNdxFromDatabase(name.c_str()); mdpInputFileName = fileManager_.getInputFilePath((name + ".mdp").c_str()); EXPECT_EQ(0, callGrompp()); cptFileName = fileManager_.getTemporaryFilePath(".cpt"); groOutputFileName = fileManager_.getTemporaryFilePath(".gro"); swapFileName = fileManager_.getTemporaryFilePath("swap.xvg"); ::gmx::test::CommandLine swapCaller; swapCaller.append("mdrun"); swapCaller.addOption("-c", groOutputFileName); swapCaller.addOption("-swap", swapFileName); // Do an initial mdrun that writes a checkpoint file ::gmx::test::CommandLine firstCaller(swapCaller); firstCaller.addOption("-cpo", cptFileName); ASSERT_EQ(0, callMdrun(firstCaller)); // Continue mdrun from that checkpoint file ::gmx::test::CommandLine secondCaller(swapCaller); secondCaller.addOption("-cpi", cptFileName); nsteps = 2; ASSERT_EQ(0, callMdrun(secondCaller)); }
int SimulationRunner::callMdrun() { CommandLine caller; caller.append("mdrun"); return callMdrun(caller); }
int MdrunTestFixture::callMdrun() { CommandLine caller; caller.append("mdrun"); return callMdrun(caller); }