Move OctaneSandwich.mdp and spc2-IMD.mdp into strings
authorAleksei Iupinov <a.yupinov@gmail.com>
Thu, 11 Jan 2018 16:38:28 +0000 (17:38 +0100)
committerAleksei Iupinov <a.yupinov@gmail.com>
Thu, 11 Jan 2018 17:01:41 +0000 (18:01 +0100)
Change-Id: I7a9a7c60591ecce964a9d4aa43f8e150033260c9

src/programs/mdrun/tests/OctaneSandwich.mdp [deleted file]
src/programs/mdrun/tests/interactiveMD.cpp
src/programs/mdrun/tests/spc2-IMD.mdp [deleted file]
src/programs/mdrun/tests/swapcoords.cpp

diff --git a/src/programs/mdrun/tests/OctaneSandwich.mdp b/src/programs/mdrun/tests/OctaneSandwich.mdp
deleted file mode 100644 (file)
index c4354e9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-dt                       = 0.005
-nsteps                   = 2
-define                   = -DPOSRES
-tcoupl                   = Berendsen
-tc-grps                  = System
-tau-t                    = 0.5
-ref-t                    = 300
-constraints              = all-bonds
-cutoff-scheme            = Verlet
-swapcoords               = Z
-swap_frequency           = 1
-split_group0             = Ch0
-split_group1             = Ch1
-massw_split0             = yes
-massw_split1             = no
-solvent_group            = SOL
-cyl0_r                   = 1
-cyl0_up                  = 0.5
-cyl0_down                = 0.5
-cyl1_r                   = 1
-cyl1_up                  = 0.5
-cyl1_down                = 0.5
-coupl_steps              = 5
-iontypes                 = 2
-iontype0-name            = NA+
-iontype0-in-A            = 8
-iontype0-in-B            = 11
-iontype1-name            = CL-
-iontype1-in-A            = -1
-iontype1-in-B            = -1
-threshold                = 1
index 45ef661ed68d5930e3d605a861997986e0dd58b4..4cc5ebcea29a73151d14918ff6d68efde06cf488 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -78,7 +78,18 @@ TEST_F(ImdTest, ImdCanRun)
 {
     std::string name = "spc2";
     runner_.useTopGroAndNdxFromDatabase(name.c_str());
-    runner_.mdpInputFileName_ = fileManager_.getInputFilePath((name + "-IMD.mdp").c_str());
+    std::string mdpContents = "\
+            -dt                       = 0.004\
+            -nsteps                   = 2\
+            -tcoupl                   = Berendsen\
+            -tc-grps                  = System\
+            -tau-t                    = 0.5\
+            -ref-t                    = 300\
+            -constraints              = all-bonds\
+            -cutoff-scheme            = Verlet\
+            -IMD-group                = SecondWaterMolecule\
+    ";
+    runner_.useStringAsMdpFile(mdpContents);
 
     EXPECT_EQ(0, runner_.callGrompp());
 
diff --git a/src/programs/mdrun/tests/spc2-IMD.mdp b/src/programs/mdrun/tests/spc2-IMD.mdp
deleted file mode 100644 (file)
index 72824a6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-dt                       = 0.004
-nsteps                   = 2
-tcoupl                   = Berendsen
-tc-grps                  = System
-tau-t                    = 0.5
-ref-t                    = 300
-constraints              = all-bonds
-cutoff-scheme            = Verlet
-IMD-group                = SecondWaterMolecule
index 669591baa79b68ca3615986ed63a66f6bdf6233b..26ba962cac5c80a4292cd3d9c6ec9655df36b265 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -78,7 +78,40 @@ TEST_F(CompelTest, SwapCanRun)
 {
     std::string name = "OctaneSandwich";
     runner_.useTopGroAndNdxFromDatabase(name.c_str());
-    runner_.mdpInputFileName_ = fileManager_.getInputFilePath((name + ".mdp").c_str());
+    std::string mdpContents = "\
+    dt                       = 0.005\
+    nsteps                   = 2\
+    define                   = -DPOSRES\
+    tcoupl                   = Berendsen\
+    tc-grps                  = System\
+    tau-t                    = 0.5\
+    ref-t                    = 300\
+    constraints              = all-bonds\
+    cutoff-scheme            = Verlet\
+    swapcoords               = Z\
+    swap_frequency           = 1\
+    split_group0             = Ch0\
+    split_group1             = Ch1\
+    massw_split0             = yes\
+    massw_split1             = no\
+    solvent_group            = SOL\
+    cyl0_r                   = 1\
+    cyl0_up                  = 0.5\
+    cyl0_down                = 0.5\
+    cyl1_r                   = 1\
+    cyl1_up                  = 0.5\
+    cyl1_down                = 0.5\
+    coupl_steps              = 5\
+    iontypes                 = 2\
+    iontype0-name            = NA+\
+    iontype0-in-A            = 8\
+    iontype0-in-B            = 11\
+    iontype1-name            = CL-\
+    iontype1-in-A            = -1\
+    iontype1-in-B            = -1\
+    threshold                = 1\
+    ";
+    runner_.useStringAsMdpFile(mdpContents);
 
     EXPECT_EQ(0, runner_.callGrompp());