2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2019, by the GROMACS development team, led by
5 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 * and including many others, as listed in the AUTHORS file in the
7 * top-level source directory and at http://www.gromacs.org.
9 * GROMACS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
14 * GROMACS is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with GROMACS; if not, see
21 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * If you want to redistribute modifications to GROMACS, please
25 * consider that scientific software is very special. Version
26 * control is crucial - bugs must be traceable. We will be happy to
27 * consider code for inclusion in the official distribution, but
28 * derived work must not be called official GROMACS. Details are found
29 * in the README & COPYING files - if they are missing, get the
30 * official version at http://www.gromacs.org.
32 * To help us fund GROMACS development, we humbly ask that you cite
33 * the research papers on the package. Check out http://www.gromacs.org.
35 /*! \libinternal \file
37 * \brief This file declares helper functionality for legacy option handling for mdrun
39 * It is likely that much of this content will move closer to the
40 * functionality that supports the respective features. For example,
41 * modules that change behaviour according to whether it is a rerun
42 * could register themselves with the rerun module and get notified at
43 * setup time to set their own boolean, rather than rely on a central
44 * glob of mdrun options being passed around.
46 * \ingroup module_mdtypes
49 #ifndef GMX_MDTYPES_MDRUNOPTIONS_H
50 #define GMX_MDTYPES_MDRUNOPTIONS_H
52 #include "gromacs/utility/basedefinitions.h"
53 #include "gromacs/utility/real.h"
58 //! Enumeration for mdrun appending behavior
59 enum class AppendingBehavior
61 //! Append only if user command-line and file input is correct
69 //! \internal \brief Options for writing checkpoint files
70 struct CheckpointOptions
72 //! True means keep all checkpoint file and add the step number to the name
73 gmx_bool keepAndNumberCheckpointFiles = FALSE;
74 //! The period in minutes for writing checkpoint files
78 //! \internal \brief Options for timing (parts of) mdrun
81 //! Reset timers at the start of this MD step, -1 means do not reset
83 //! If true, reset timers half-way the run
84 gmx_bool resetHalfway = FALSE;
87 //! \internal \brief Options for IMD
90 //! IMD listening port
92 //! If true, pause the simulation while no IMD client is connected
93 gmx_bool wait = FALSE;
94 //! If true, allow termination of the simulation from IMD client
95 gmx_bool terminatable = FALSE;
96 //! If true, allow COM pulling in the simulation from IMD client
97 gmx_bool pull = FALSE;
100 //! \internal \brief Collection of all options of mdrun that are not processed separately
103 //! Re-compute energies, and possibly forces, for frames from an input tracjectory
104 gmx_bool rerun = FALSE;
105 //! Re-construct virual sites durin a rerun simulation
106 gmx_bool rerunConstructVsites = FALSE;
107 //! Try to make the simulation binary reproducible
108 gmx_bool reproducible = FALSE;
109 //! Write confout.gro at the end of the run
110 gmx_bool writeConfout = TRUE;
111 //! User option for appending.
112 AppendingBehavior appendingBehavior = AppendingBehavior::Auto;
113 //! Options for checkpointing th simulation
114 CheckpointOptions checkpointOptions;
115 //! Number of steps to run, -2 is use inputrec, -1 is infinite
116 int64_t numStepsCommandline = -2;
117 //! Maximum duration of this simulation in wall-clock hours, -1 is no limit
118 real maximumHoursToRun = -1;
119 //! Options for timing the run
120 TimingOptions timingOptions;
121 //! If true and supported, will tune the PP-PME load balance
122 gmx_bool tunePme = TRUE;
123 //! True if the user explicitly set the -ntomp command line option
124 gmx_bool ntompOptionIsSet = FALSE;
126 ImdOptions imdOptions;
127 //! Increase the verbosity level in the logging and/or stdout/stderr
128 gmx_bool verbose = FALSE;
129 //! If verbose=true, print remaining runtime at this step interval
130 int verboseStepPrintInterval = 100;
133 } // end namespace gmx