Merge "Merge release-2018 into master"
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 16 Jan 2018 16:30:35 +0000 (17:30 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 16 Jan 2018 16:30:35 +0000 (17:30 +0100)
src/programs/mdrun/tests/OctaneSandwich.mdp [deleted file]
src/programs/mdrun/tests/alanine_vsite.mdp [deleted file]
src/programs/mdrun/tests/interactiveMD.cpp
src/programs/mdrun/tests/moduletest.cpp
src/programs/mdrun/tests/moduletest.h
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
diff --git a/src/programs/mdrun/tests/alanine_vsite.mdp b/src/programs/mdrun/tests/alanine_vsite.mdp
deleted file mode 100644 (file)
index c51feae..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-; VARIOUS PREPROCESSING OPTIONS
-; Preprocessor information: use cpp syntax.
-; e.g.: -I/home/joe/doe -I/home/mary/roe
-include                  = 
-; e.g.: -DPOSRES -DFLEXIBLE (note these variable names are case sensitive)
-define                   = 
-
-; RUN CONTROL PARAMETERS
-integrator               = md
-; Start time and timestep in ps
-tinit                    = 0
-dt                       = 0.005
-nsteps                   = 20
-; For exact run continuation or redoing part of a run
-init-step                = 0
-; Part index is updated automatically on checkpointing (keeps files separate)
-simulation-part          = 1
-; mode for center of mass motion removal
-comm-mode                = Linear
-; number of steps for center of mass motion removal
-nstcomm                  = 100
-; group(s) for center of mass motion removal
-comm-grps                = 
-
-; LANGEVIN DYNAMICS OPTIONS
-; Friction coefficient (amu/ps) and random seed
-bd-fric                  = 0
-ld-seed                  = 1993
-
-; ENERGY MINIMIZATION OPTIONS
-; Force tolerance and initial step-size
-emtol                    = 10
-emstep                   = 0.01
-; Max number of iterations in relax-shells
-niter                    = 20
-; Step size (ps^2) for minimization of flexible constraints
-fcstep                   = 0
-; Frequency of steepest descents steps when doing CG
-nstcgsteep               = 1000
-nbfgscorr                = 10
-
-; TEST PARTICLE INSERTION OPTIONS
-rtpi                     = 0.05
-
-; OUTPUT CONTROL OPTIONS
-; Output frequency for coords (x), velocities (v) and forces (f)
-nstxout                  = 20
-nstvout                  = 20
-nstfout                  = 20
-; Output frequency for energies to log file and energy file
-nstlog                   = 0
-nstcalcenergy            = 100
-nstenergy                = 100
-; Output frequency and precision for .xtc file
-nstxtcout                = 0
-xtc-precision            = 1000
-; This selects the subset of atoms for the .xtc file. You can
-; select multiple groups. By default all atoms will be written.
-xtc-grps                 = 
-; Selection of energy groups
-energygrps               = 
-
-; NEIGHBORSEARCHING PARAMETERS
-; cut-off scheme (group: using charge groups, Verlet: particle based cut-offs)
-cutoff-scheme            = verlet
-; nblist update frequency
-nstlist                  = 10
-; ns algorithm (simple or grid)
-ns-type                  = Grid
-; Periodic boundary conditions: xyz, no, xy
-pbc                      = xyz
-periodic-molecules       = no
-; Allowed energy drift due to the Verlet buffer in kJ/mol/ps per atom,
-; a value of -1 means: use rlist
-verlet-buffer-drift      = -1
-; nblist cut-off        
-rlist                    = 0.9
-; long-range cut-off for switched potentials
-rlistlong                = -1
-nstcalclr                = -1
-
-; OPTIONS FOR ELECTROSTATICS AND VDW
-; Method for doing electrostatics
-coulombtype              = PME
-coulomb-modifier         = Potential-shift-Verlet
-rcoulomb-switch          = 0
-rcoulomb                 = 0.85
-; Relative dielectric constant for the medium and the reaction field
-epsilon-r                = 1
-epsilon-rf               = 0
-; Method for doing Van der Waals
-vdw-type                 = Cut-off
-vdw-modifier             = Potential-shift-Verlet
-; cut-off lengths       
-rvdw-switch              = 0
-rvdw                     = 0.85
-; Apply long range dispersion corrections for Energy and Pressure
-DispCorr                 = No
-; Extension of the potential lookup tables beyond the cut-off
-table-extension          = 1
-; Seperate tables between energy group pairs
-energygrp-table          = 
-; Spacing for the PME/PPPM FFT grid
-fourierspacing           = 0.12
-; FFT grid size, when a value is 0 fourierspacing will be used
-fourier_nx               = 24
-fourier_ny               = 24
-fourier_nz               = 24
-; EWALD/PME/PPPM parameters
-pme-order                = 4
-ewald-rtol               = 1e-05
-ewald-geometry           = 3d
-epsilon-surface          = 0
-optimize-fft             = no
-
-; IMPLICIT SOLVENT ALGORITHM
-implicit-solvent         = No
-
-; GENERALIZED BORN ELECTROSTATICS
-; Algorithm for calculating Born radii
-gb-algorithm             = Still
-; Frequency of calculating the Born radii inside rlist
-nstgbradii               = 1
-; Cutoff for Born radii calculation; the contribution from atoms
-; between rlist and rgbradii is updated every nstlist steps
-rgbradii                 = 1
-; Dielectric coefficient of the implicit solvent
-gb-epsilon-solvent       = 80
-; Salt concentration in M for Generalized Born models
-gb-saltconc              = 0
-; Scaling factors used in the OBC GB model. Default values are OBC(II)
-gb-obc-alpha             = 1
-gb-obc-beta              = 0.8
-gb-obc-gamma             = 4.85
-gb-dielectric-offset     = 0.009
-sa-algorithm             = Ace-approximation
-; Surface tension (kJ/mol/nm^2) for the SA (nonpolar surface) part of GBSA
-; The value -1 will set default value for Still/HCT/OBC GB-models.
-sa-surface-tension       = -1
-
-; OPTIONS FOR WEAK COUPLING ALGORITHMS
-; Temperature coupling  
-tcoupl                   = v-rescale
-nsttcouple               = -1
-nh-chain-length          = 10
-print-nose-hoover-chain-variables = no
-; Groups to couple separately
-tc_grps                  = system
-; Time constant (ps) and reference temperature (K)
-tau_t                    = 0.1
-ref_t                    = 300
-; pressure coupling     
-Pcoupl                   = Berendsen
-pcoupltype               = Isotropic
-nstpcouple               = -1
-; Time constant (ps), compressibility (1/bar) and reference P (bar)
-tau_p                    = 1
-compressibility          = 4.5e-5
-ref_p                    = 1
-; Scaling of reference coordinates, No, All or COM
-refcoord-scaling         = No
-
-; OPTIONS FOR QMMM calculations
-QMMM                     = no
-; Groups treated Quantum Mechanically
-QMMM-grps                = 
-; QM method             
-QMmethod                 = 
-; QMMM scheme           
-QMMMscheme               = normal
-; QM basisset           
-QMbasis                  = 
-; QM charge             
-QMcharge                 = 
-; QM multiplicity       
-QMmult                   = 
-; Surface Hopping       
-SH                       = 
-; CAS space options     
-CASorbitals              = 
-CASelectrons             = 
-SAon                     = 
-SAoff                    = 
-SAsteps                  = 
-; Scale factor for MM charges
-MMChargeScaleFactor      = 1
-
-; SIMULATED ANNEALING  
-; Type of annealing for each temperature group (no/single/periodic)
-annealing                = 
-; Number of time points to use for specifying annealing in each group
-annealing-npoints        = 
-; List of times at the annealing points for each group
-annealing-time           = 
-; Temp. at each annealing point, for each group.
-annealing-temp           = 
-
-; GENERATE VELOCITIES FOR STARTUP RUN
-gen-vel                  = no
-gen-temp                 = 300
-gen-seed                 = 173529
-
-; OPTIONS FOR BONDS    
-constraints              = all-bonds
-; Type of constraint algorithm
-constraint-algorithm     = Lincs
-; Do not constrain the start configuration
-continuation             = no
-; Use successive overrelaxation to reduce the number of shake iterations
-Shake-SOR                = no
-; Relative tolerance of shake
-shake-tol                = 0.0001
-; Highest order in the expansion of the constraint coupling matrix
-lincs_order              = 2
-; Number of iterations in the final step of LINCS. 1 is fine for
-; normal simulations, but use 2 to conserve energy in NVE runs.
-; For energy minimization with constraints it should be 4 to 8.
-lincs_iter               = 5
-; Lincs will write a warning to the stderr if in one step a bond
-; rotates over more degrees than
-lincs-warnangle          = 30
-; Convert harmonic bonds to morse potentials
-morse                    = no
-
-; ENERGY GROUP EXCLUSIONS
-; Pairs of energy groups for which all non-bonded interactions are excluded
-energygrp-excl           = 
-
-; WALLS                
-; Number of walls, type, atom types, densities and box-z scale factor for Ewald
-nwall                    = 0
-wall-type                = 9-3
-wall-r-linpot            = -1
-wall-atomtype            = 
-wall-density             = 
-wall-ewald-zfac          = 3
-
-; COM PULLING          
-; Pull type: no, umbrella, constraint or constant-force
-pull                     = no
-
-; ENFORCED ROTATION    
-; Enforced rotation: No or Yes
-rotation                 = no
-
-; NMR refinement stuff 
-; Distance restraints type: No, Simple or Ensemble
-disre                    = No
-; Force weighting of pairs in one distance restraint: Conservative or Equal
-disre-weighting          = Conservative
-; Use sqrt of the time averaged times the instantaneous violation
-disre-mixed              = no
-disre-fc                 = 1000
-disre-tau                = 0
-; Output frequency for pair distances to energy file
-nstdisreout              = 100
-; Orientation restraints: No or Yes
-orire                    = no
-; Orientation restraints force constant and tau for time averaging
-orire-fc                 = 0
-orire-tau                = 0
-orire-fitgrp             = 
-; Output frequency for trace(SD) and S to energy file
-nstorireout              = 100
-
-; Free energy variables
-free-energy              = no
-couple-moltype           = 
-couple-lambda0           = vdw-q
-couple-lambda1           = vdw-q
-couple-intramol          = no
-init-lambda              = -1
-init-lambda-state        = 0
-delta-lambda             = 0
-nstdhdl                  = 100
-fep-lambdas              = 
-mass-lambdas             = 
-coul-lambdas             = 
-vdw-lambdas              = 
-bonded-lambdas           = 
-restraint-lambdas        = 
-temperature-lambdas      = 
-init-lambda-weights      = 
-dhdl-print-energy        = no
-sc-alpha                 = 0
-sc-power                 = 1
-sc-r-power               = 6
-sc-sigma                 = 0.3
-sc-coul                  = no
-separate-dhdl-file       = yes
-dhdl-derivatives         = yes
-dh_hist_size             = 0
-dh_hist_spacing          = 0.1
-
-; Non-equilibrium MD stuff
-acc-grps                 = 
-accelerate               = 
-freezegrps               = 
-freezedim                = 
-cos-acceleration         = 0
-deform                   = 
-
-; simulated tempering variables
-simulated-tempering      = no
-simulated-tempering-scaling = geometric
-sim-temp-low             = 300
-sim-temp-high            = 300
-
-; Electric fields      
-; Format is number of terms (int) and for all terms an amplitude (real)
-; and a phase angle (real)
-E-x                      = 
-E-xt                     = 
-E-y                      = 
-E-yt                     = 
-E-z                      = 
-E-zt                     = 
-
-; AdResS parameters    
-adress                   = no
-
-; User defined thingies
-user1-grps               = 
-user2-grps               = 
-userint1                 = 0
-userint2                 = 0
-userint3                 = 0
-userint4                 = 0
-userreal1                = 0
-userreal2                = 0
-userreal3                = 0
-userreal4                = 0
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());
 
index d5244f3fbe522a0d1993dfe93fe921e3f26d7335..54f12888c25e2b8b0bba327d545a65286cde39cd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,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.
@@ -132,7 +132,7 @@ SimulationRunner::useStringAsMdpFile(const char *mdpString)
 void
 SimulationRunner::useStringAsMdpFile(const std::string &mdpString)
 {
-    gmx::TextWriter::writeFileFromString(mdpInputFileName_, mdpString);
+    mdpInputContents_ = mdpString;
 }
 
 void
@@ -158,6 +158,8 @@ SimulationRunner::useGroFromDatabase(const char *name)
 int
 SimulationRunner::callGromppOnThisRank(const CommandLine &callerRef)
 {
+    gmx::TextWriter::writeFileFromString(mdpInputFileName_, mdpInputContents_);
+
     CommandLine caller;
     caller.append("grompp");
     caller.merge(callerRef);
index c7649b6d47befc253b6bc30d99d5d02441e1bda9..917f70e9978040423f84ad7aa59b1d224f60f67a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,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.
@@ -133,7 +133,9 @@ class SimulationRunner
         std::string reducedPrecisionTrajectoryFileName_;
         std::string groOutputFileName_;
         std::string ndxFileName_;
-        std::string mdpInputFileName_;
+        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_;
@@ -142,6 +144,8 @@ class SimulationRunner
         std::string swapFileName_;
         int         nsteps_;
         //@}
+        //! What will be written into mdpInputFileName_ before the grompp call
+        std::string mdpInputContents_;
 
     private:
         TestFileManager &fileManager_;
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());