Remove mdpInputFileName_ from SimulationRunner, per TODO
authorAleksei Iupinov <a.yupinov@gmail.com>
Mon, 5 Feb 2018 09:59:54 +0000 (10:59 +0100)
committerAleksei Iupinov <a.yupinov@gmail.com>
Mon, 5 Feb 2018 10:02:11 +0000 (11:02 +0100)
Change Ib6511a338935b14be was the prerequisite.

Change-Id: Ief8717d45c5948a7666b232dd7ea3f1863823671

src/programs/mdrun/tests/moduletest.cpp
src/programs/mdrun/tests/moduletest.h

index fd5828c7b289cd61aa58262dfa21872f4c60cf32..1fb2864a177bf4ff3d189db2967725ccad3cefc5 100644 (file)
@@ -96,7 +96,6 @@ SimulationRunner::SimulationRunner(TestFileManager *fileManager) :
     groFileName_(),
     fullPrecisionTrajectoryFileName_(),
     ndxFileName_(),
-    mdpInputFileName_(fileManager->getTemporaryFilePath("input.mdp")),
     mdpOutputFileName_(fileManager->getTemporaryFilePath("output.mdp")),
     tprFileName_(fileManager->getTemporaryFilePath(".tpr")),
     logFileName_(fileManager->getTemporaryFilePath(".log")),
@@ -158,12 +157,13 @@ SimulationRunner::useGroFromDatabase(const char *name)
 int
 SimulationRunner::callGromppOnThisRank(const CommandLine &callerRef)
 {
-    gmx::TextWriter::writeFileFromString(mdpInputFileName_, mdpInputContents_);
+    const std::string mdpInputFileName(fileManager_.getTemporaryFilePath("input.mdp"));
+    gmx::TextWriter::writeFileFromString(mdpInputFileName, mdpInputContents_);
 
     CommandLine caller;
     caller.append("grompp");
     caller.merge(callerRef);
-    caller.addOption("-f", mdpInputFileName_);
+    caller.addOption("-f", mdpInputFileName);
     caller.addOption("-n", ndxFileName_);
     caller.addOption("-p", topFileName_);
     caller.addOption("-c", groFileName_);
index 917f70e9978040423f84ad7aa59b1d224f60f67a..386c98ddb5fc8abb03476c82a83f8cd94ee7d019 100644 (file)
@@ -133,9 +133,6 @@ class SimulationRunner
         std::string reducedPrecisionTrajectoryFileName_;
         std::string groOutputFileName_;
         std::string ndxFileName_;
-        std::string mdpInputFileName_;    /**< This file is temporary and will be overwritten with mdpInputContents_ when calling grompp.
-                                           * TODO: remove this when the multisim tests use -multidir.
-                                           */
         std::string mdpOutputFileName_;
         std::string tprFileName_;
         std::string logFileName_;
@@ -144,7 +141,7 @@ class SimulationRunner
         std::string swapFileName_;
         int         nsteps_;
         //@}
-        //! What will be written into mdpInputFileName_ before the grompp call
+        //! What will be written into a temporary mdp file before the grompp call
         std::string mdpInputContents_;
 
     private: