From 4070beebfa35b27b479689cf96acd54c77e24b17 Mon Sep 17 00:00:00 2001 From: David van der Spoel Date: Fri, 30 Nov 2018 15:10:57 +0100 Subject: [PATCH] Small update to mdrun tests. To be able to run tests with different cut-offs new variable rcoulomb and rvdw are introduced. To be able to do high precision tests (normal mode analysis) g96 files can be read now. Change-Id: I9265022f516b66815aa7bc516b71918fdc6f417a --- src/programs/mdrun/tests/moduletest.cpp | 8 ++++++++ src/programs/mdrun/tests/moduletest.h | 2 ++ src/programs/mdrun/tests/simulationdatabase.cpp | 8 ++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/programs/mdrun/tests/moduletest.cpp b/src/programs/mdrun/tests/moduletest.cpp index 88e64ffd8d..5733d41d64 100644 --- a/src/programs/mdrun/tests/moduletest.cpp +++ b/src/programs/mdrun/tests/moduletest.cpp @@ -137,6 +137,14 @@ SimulationRunner::useStringAsNdxFile(const char *ndxString) } void +SimulationRunner::useTopG96AndNdxFromDatabase(const std::string &name) +{ + topFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".top"); + groFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".g96"); + ndxFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".ndx"); +} + +void SimulationRunner::useTopGroAndNdxFromDatabase(const std::string &name) { topFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".top"); diff --git a/src/programs/mdrun/tests/moduletest.h b/src/programs/mdrun/tests/moduletest.h index edba08915b..e10be45266 100644 --- a/src/programs/mdrun/tests/moduletest.h +++ b/src/programs/mdrun/tests/moduletest.h @@ -98,6 +98,8 @@ class SimulationRunner void useStringAsMdpFile(const std::string &mdpString); //! Use a string as -n input to grompp void useStringAsNdxFile(const char *ndxString); + //! Use a standard .top and .g96 file as input to grompp + void useTopG96AndNdxFromDatabase(const std::string &name); //! Use a standard .top and .gro file as input to grompp void useTopGroAndNdxFromDatabase(const std::string &name); //! Use a standard .gro file as input to grompp diff --git a/src/programs/mdrun/tests/simulationdatabase.cpp b/src/programs/mdrun/tests/simulationdatabase.cpp index bc25a86139..a4d87197f7 100644 --- a/src/programs/mdrun/tests/simulationdatabase.cpp +++ b/src/programs/mdrun/tests/simulationdatabase.cpp @@ -229,6 +229,8 @@ MdpFieldValues prepareDefaultMdpFieldValues(const char *simulationName) mdpFieldValues.insert(MdpField("compressibility", "5e-5")); mdpFieldValues.insert(MdpField("constraints", "none")); mdpFieldValues.insert(MdpField("other", "")); + mdpFieldValues.insert(MdpField("rcoulomb", "0.7")); + mdpFieldValues.insert(MdpField("rvdw", "0.7")); return mdpFieldValues; } @@ -289,8 +291,8 @@ prepareMdpFileContents(const MdpFieldValues &mdpFieldValues) * energies were not computed with those from rerun on the same * coordinates. */ - return formatString(R"(rcoulomb = 0.7 - rvdw = 0.7 + return formatString(R"(rcoulomb = %s + rvdw = %s rlist = -1 bd-fric = 1000 verlet-buffer-tolerance = 0.000001 @@ -316,6 +318,8 @@ prepareMdpFileContents(const MdpFieldValues &mdpFieldValues) lincs-order = 2 lincs-iter = 5 %s)", + mdpFieldValues.at("rcoulomb").c_str(), + mdpFieldValues.at("rvdw").c_str(), mdpFieldValues.at("nsteps").c_str(), mdpFieldValues.at("integrator").c_str(), mdpFieldValues.at("tcoupl").c_str(), -- 2.11.4.GIT