Merge release-2019 into master
[alexxy/gromacs.git] / src / gromacs / mdrun / legacymdrunoptions.h
index 27a6de629a3ef033a86802560cbb175e748ee4c9..26b4fb93c8212d084cf09aaf0a2e44433c31f990 100644 (file)
 
 #include "gromacs/commandline/filenm.h"
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/domdec/domdec.h"
+#include "gromacs/domdec/options.h"
 #include "gromacs/hardware/hw_info.h"
-#include "gromacs/mdlib/mdrun.h"
-#include "gromacs/mdrun/logging.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
 
 #include "replicaexchange.h"
 
@@ -112,8 +111,6 @@ class LegacyMdrunOptions
           { efXVG, "-tpid",     "tpidist",   ffOPTWR },
           { efEDI, "-ei",       "sam",       ffOPTRD },
           { efXVG, "-eo",       "edsam",     ffOPTWR },
-          { efXVG, "-devout",   "deviatie",  ffOPTWR },
-          { efXVG, "-runav",    "runaver",   ffOPTWR },
           { efXVG, "-px",       "pullx",     ffOPTWR },
           { efXVG, "-pf",       "pullf",     ffOPTWR },
           { efXVG, "-ro",       "rotation",  ffOPTWR },
@@ -132,22 +129,22 @@ class LegacyMdrunOptions
         //! Print a warning if any force is larger than this (in kJ/mol nm).
         real                             pforce = -1;
 
+        //! The value of the -append option
+        bool                             appendOption = true;
+
         /*! \brief Output context for writing text files
          *
          * \todo Clarify initialization, ownership, and lifetime. */
         gmx_output_env_t                *oenv = nullptr;
 
-        //! Handle to file used for logging.
-        LogFilePtr logFileGuard = nullptr;
-
         /*! \brief Command line options, defaults, docs and storage for them to fill. */
         /*! \{ */
-        rvec              realddxyz                                               = {0, 0, 0};
-        const char       *ddrank_opt_choices[static_cast<int>(DdRankOrder::nr)+1] =
+        rvec              realddxyz                                                  = {0, 0, 0};
+        const char       *ddrank_opt_choices[static_cast<int>(DdRankOrder::Count)+1] =
         { nullptr, "interleave", "pp_pme", "cartesian", nullptr };
-        const char       *dddlb_opt_choices[static_cast<int>(DlbOption::nr)+1] =
+        const char       *dddlb_opt_choices[static_cast<int>(DlbOption::Count)+1] =
         { nullptr, "auto", "no", "yes", nullptr };
-        const char       *thread_aff_opt_choices[threadaffNR+1] =
+        const char       *thread_aff_opt_choices[static_cast<int>(ThreadAffinity::Count) + 1] =
         { nullptr, "auto", "on", "off", nullptr };
         const char       *nbpu_opt_choices[5] =
         { nullptr, "auto", "cpu", "gpu", nullptr };
@@ -157,13 +154,12 @@ class LegacyMdrunOptions
         { nullptr, "auto", "cpu", "gpu", nullptr };
         const char       *bonded_opt_choices[5] =
         { nullptr, "auto", "cpu", "gpu", nullptr };
-        gmx_bool          bTryToAppendFiles     = TRUE;
         const char       *gpuIdsAvailable       = "";
         const char       *userGpuTaskAssignment = "";
 
         ImdOptions       &imdOptions = mdrunOptions.imdOptions;
 
-        t_pargs           pa[48] = {
+        t_pargs           pa[47] = {
 
             { "-dd",      FALSE, etRVEC, {&realddxyz},
               "Domain decomposition grid, 0 is optimize" },
@@ -214,8 +210,6 @@ class LegacyMdrunOptions
               "HIDDENA string containing a vector of the relative sizes in the z "
               "direction of the corresponding DD cells. Only effective with static "
               "load balancing." },
-            { "-gcom",    FALSE, etINT, {&mdrunOptions.globalCommunicationInterval},
-              "Global communication frequency" },
             { "-nb",      FALSE, etENUM, {nbpu_opt_choices},
               "Calculate non-bonded interactions on" },
             { "-nstlist", FALSE, etINT, {&nstlist_cmdline},
@@ -238,7 +232,7 @@ class LegacyMdrunOptions
               "Checkpoint interval (minutes)" },
             { "-cpnum",   FALSE, etBOOL, {&mdrunOptions.checkpointOptions.keepAndNumberCheckpointFiles},
               "Keep and number checkpoint files" },
-            { "-append",  FALSE, etBOOL, {&bTryToAppendFiles},
+            { "-append",  FALSE, etBOOL, {&appendOption},
               "Append to previous output files when continuing from checkpoint instead of adding the simulation part number to all file names" },
             { "-nsteps",  FALSE, etINT64, {&mdrunOptions.numStepsCommandline},
               "Run this number of steps (-1 means infinite, -2 means use mdp option, smaller is invalid)" },