This file was filled with stuff that works better elsewhere.
Moved the options structs into gmx namespace
Refs #2877
Change-Id: Ib796ef8e9896804c56936f23f67dcd3fc12900fd
#include <string>
#include "gromacs/mdrun/legacymdrunoptions.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gmxapi/context.h"
#include "gmxapi/session.h"
#include "gromacs/mdlib/calc_verletbuf.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/constraintrange.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/updategroups.h"
#include "gromacs/mdlib/vsite.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
*/
static DlbState determineInitialDlbState(const gmx::MDLogger &mdlog,
DlbOption dlbOption, gmx_bool bRecordLoad,
- const MdrunOptions &mdrunOptions,
+ const gmx::MdrunOptions &mdrunOptions,
const t_inputrec *ir)
{
DlbState dlbState = DlbState::offCanTurnOn;
static void set_dd_limits_and_grid(const gmx::MDLogger &mdlog,
t_commrec *cr, gmx_domdec_t *dd,
const DomdecOptions &options,
- const MdrunOptions &mdrunOptions,
+ const gmx::MdrunOptions &mdrunOptions,
const gmx_mtop_t *mtop,
const t_inputrec *ir,
const matrix box,
gmx_domdec_t *init_domain_decomposition(const gmx::MDLogger &mdlog,
t_commrec *cr,
const DomdecOptions &options,
- const MdrunOptions &mdrunOptions,
+ const gmx::MdrunOptions &mdrunOptions,
const gmx_mtop_t *mtop,
const t_inputrec *ir,
const matrix box,
struct gmx_localtop_t;
struct gmx_mtop_t;
struct gmx_vsite_t;
-struct MdrunOptions;
struct t_block;
struct t_blocka;
struct t_commrec;
namespace gmx
{
class MDLogger;
+struct MdrunOptions;
class LocalAtomSetManager;
} // namespace
init_domain_decomposition(const gmx::MDLogger &mdlog,
t_commrec *cr,
const DomdecOptions &options,
- const MdrunOptions &mdrunOptions,
+ const gmx::MdrunOptions &mdrunOptions,
const gmx_mtop_t *mtop,
const t_inputrec *ir,
const matrix box,
#include "gromacs/mdlib/broadcaststructs.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/groupcoord.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/update.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/mdatoms.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdtypes/fcdata.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/random/threefry.h"
#include "gromacs/random/uniformintdistribution.h"
#include "gromacs/gmxpreprocess/readir.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdatoms.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/pull_params.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/broadcaststructs.h"
#include "gromacs/mdlib/groupcoord.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sighandler.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdtypes/enerdata.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
*
* Call on master only.
*/
-static FILE *open_imd_out(const char *fn,
- t_gmx_IMD_setup *IMDsetup,
- int nat_total,
- const gmx_output_env_t *oenv,
- const ContinuationOptions &continuationOptions)
+static FILE *open_imd_out(const char *fn,
+ t_gmx_IMD_setup *IMDsetup,
+ int nat_total,
+ const gmx_output_env_t *oenv,
+ const gmx::ContinuationOptions &continuationOptions)
{
FILE *fp;
}
}
-void init_IMD(t_inputrec *ir,
- const t_commrec *cr,
- const gmx_multisim_t *ms,
- const gmx_mtop_t *top_global,
- FILE *fplog,
- int defnstimd,
- const rvec x[],
- int nfile,
- const t_filenm fnm[],
- const gmx_output_env_t *oenv,
- const MdrunOptions &mdrunOptions)
+void init_IMD(t_inputrec *ir,
+ const t_commrec *cr,
+ const gmx_multisim_t *ms,
+ const gmx_mtop_t *top_global,
+ FILE *fplog,
+ int defnstimd,
+ const rvec x[],
+ int nfile,
+ const t_filenm fnm[],
+ const gmx_output_env_t *oenv,
+ const gmx::MdrunOptions &mdrunOptions)
{
int i;
int nat_total;
// user asked for should be handled with a fatal error, not just a
// warning.
- const ImdOptions &options = mdrunOptions.imdOptions;
+ const auto &options = mdrunOptions.imdOptions;
/* It seems we have a .tpr file that defines an IMD group and thus allows IMD sessions.
* Check whether we can actually provide the IMD functionality for this setting: */
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018,2019, 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.
struct gmx_multisim_t;
struct gmx_output_env_t;
struct gmx_wallcycle;
-struct MdrunOptions;
struct t_commrec;
struct t_filenm;
struct t_gmx_IMD;
struct t_inputrec;
class t_state;
+namespace gmx
+{
+struct MdrunOptions;
+}
+
static const char IMDstr[] = "IMD:"; /**< Tag output from the IMD module with this string. */
/*! \brief Writes out the group of atoms selected for interactive manipulation.
const gmx_mtop_t *top_global,
FILE *fplog, int defnstimd, const rvec x[],
int nfile, const t_filenm fnm[], const gmx_output_env_t *oenv,
- const MdrunOptions &mdrunOptions);
+ const gmx::MdrunOptions &mdrunOptions);
/*! \brief IMD required in this time step?
#include "gromacs/gmxlib/network.h"
#include "gromacs/math/vec.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/mdtypes/awh_params.h"
#include "gromacs/mdtypes/commrec.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018,2019, 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.
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/smalloc.h"
+struct gmx_mtop_t;
+struct t_commrec;
+struct t_inputrec;
+class t_state;
+
//! Convenience wrapper for gmx_bcast of a single value.
template <typename T>
void block_bc(const t_commrec *cr, T &data)
gmx_bcast(numElements*sizeof(T), v->data(), cr);
}
+//! \brief Broadcasts the, non-dynamic, state from the master to all ranks in cr->mpi_comm_mygroup
+//
+// This is intended to be used with MPI parallelization without
+// domain decompostion (currently with NM and TPI).
+void broadcastStateWithoutDynamics(const t_commrec *cr, t_state *state);
+
+//! \brief Broadcast inputrec and mtop and allocate node-specific settings
+void init_parallel(t_commrec *cr, t_inputrec *inputrec,
+ gmx_mtop_t *mtop);
+
#endif
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, 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.
#include <memory>
#include "gromacs/compat/pointers.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/simulationsignal.h"
struct gmx_walltime_accounting;
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
#include "gromacs/mdlib/lincs.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/settle.h"
#include "gromacs/mdlib/shake.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
+#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/block.h"
#include "gromacs/topology/ifunc.h"
#include "gromacs/topology/mtop_lookup.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/ebin.h"
#include "gromacs/mdlib/mdebin_bar.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdtypes/energyhistory.h"
#include "gromacs/mdtypes/fcdata.h"
#include "gromacs/mdtypes/group.h"
#include "gromacs/math/vecdump.h"
#include "gromacs/mdlib/force_flags.h"
#include "gromacs/mdlib/forcerec_threading.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/mdlib/rf_util.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/dispersioncorrection.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/simulationsignal.h"
#include "gromacs/mdlib/tgroup.h"
struct t_extmass;
struct t_forcerec;
struct t_grpopts;
+struct t_inputrec;
struct t_lambda;
struct t_nrnb;
class t_state;
void rerun_parallel_comm(t_commrec *cr, t_trxframe *fr,
gmx_bool *bLastStep);
+//! \brief Allocate and initialize node-local state entries
+void set_state_entries(t_state *state, const t_inputrec *ir);
+
/* Set the lambda values in the global state from a frame read with rerun */
void setCurrentLambdasRerun(int64_t step, const t_lambda *fepvals,
const t_trxframe *rerun_fr, const double *lam0,
#include "gromacs/fileio/xtcio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/math/vec.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/trajectory_writing.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/imdoutputprovider.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/topology.h"
gmx_mdoutf_t init_mdoutf(FILE *fplog, int nfile, const t_filenm fnm[],
- const MdrunOptions &mdrunOptions,
+ const gmx::MdrunOptions &mdrunOptions,
const t_commrec *cr,
gmx::IMDOutputProvider *outputProvider,
const t_inputrec *ir, gmx_mtop_t *top_global,
class energyhistory_t;
struct gmx_mtop_t;
struct gmx_output_env_t;
-struct MdrunOptions;
struct ObservablesHistory;
struct t_commrec;
struct t_filenm;
namespace gmx
{
class IMDOutputProvider;
+struct MdrunOptions;
}
typedef struct gmx_mdoutf *gmx_mdoutf_t;
* Returns a pointer to a data structure with all output file pointers
* and names required by mdrun.
*/
-gmx_mdoutf_t init_mdoutf(FILE *fplog,
- int nfile,
- const t_filenm fnm[],
- const MdrunOptions &mdrunOptions,
- const t_commrec *cr,
- gmx::IMDOutputProvider *outputProvider,
- const t_inputrec *ir,
- gmx_mtop_t *mtop,
- const gmx_output_env_t *oenv,
- gmx_wallcycle_t wcycle);
+gmx_mdoutf_t init_mdoutf(FILE *fplog,
+ int nfile,
+ const t_filenm fnm[],
+ const gmx::MdrunOptions &mdrunOptions,
+ const t_commrec *cr,
+ gmx::IMDOutputProvider *outputProvider,
+ const t_inputrec *ir,
+ gmx_mtop_t *mtop,
+ const gmx_output_env_t *oenv,
+ gmx_wallcycle_t wcycle);
/*! \brief Getter for file pointer */
ener_file_t mdoutf_get_fp_ene(gmx_mdoutf_t of);
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/force_flags.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/vsite.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/ppforceworkload.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/mdlib/update.h"
struct gmx_enerdata_t;
struct gmx_output_env_t;
struct gmx_pme_t;
-struct MdrunOptions;
struct nonbonded_verlet_t;
struct t_forcerec;
struct t_mdatoms;
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/md_support.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/rbin.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/fileio/tngio.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdoutf.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/update.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdlib/boxdeformation.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/mdtypes/commrec.h"
struct gmx_vsite_t;
struct gmx_wallcycle;
struct gmx_walltime_accounting;
-struct MdrunOptions;
struct ObservablesHistory;
struct ReplicaExchangeParameters;
struct t_commrec;
class MDLogger;
class MDAtoms;
class StopHandlerBuilder;
+struct MdrunOptions;
//! Function type for integrator code.
using IntegratorFunctionType = void();
#include "gromacs/commandline/pargs.h"
#include "gromacs/domdec/domdec.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"
#include "gromacs/mdlib/md_support.h"
#include "gromacs/mdlib/mdatoms.h"
#include "gromacs/mdlib/mdoutf.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/mdsetup.h"
#include "gromacs/mdlib/membed.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/observableshistory.h"
#include "gromacs/mdtypes/pullhistory.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/mdlib/md_support.h"
#include "gromacs/mdlib/mdatoms.h"
#include "gromacs/mdlib/mdoutf.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/mdsetup.h"
#include "gromacs/mdlib/membed.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/observableshistory.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/mimic/MimicCommunicator.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
#include "gromacs/mdlib/md_support.h"
#include "gromacs/mdlib/mdatoms.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/mdsetup.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/shellfc.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
const t_commrec *cr,
const gmx_multisim_t *ms,
t_inputrec *ir,
- const MdrunOptions &mdrunOptions,
+ const gmx::MdrunOptions &mdrunOptions,
t_state *state_global, gmx_mtop_t *top_global,
em_state_t *ems, gmx_localtop_t *top,
t_nrnb *nrnb,
#include "gromacs/mdlib/md_support.h"
#include "gromacs/mdlib/mdatoms.h"
#include "gromacs/mdlib/mdoutf.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/mdsetup.h"
#include "gromacs/mdlib/membed.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/observableshistory.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/mimic/MimicUtils.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/boxdeformation.h"
+#include "gromacs/mdlib/broadcaststructs.h"
#include "gromacs/mdlib/calc_verletbuf.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
#include "gromacs/mdlib/makeconstraints.h"
#include "gromacs/mdlib/md_support.h"
#include "gromacs/mdlib/mdatoms.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/membed.h"
#include "gromacs/mdlib/ppforceworkload.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/mdlib/sighandler.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/stophandler.h"
-#include "gromacs/mdrun/legacymdrunoptions.h"
#include "gromacs/mdrun/logging.h"
#include "gromacs/mdrun/multisim.h"
#include "gromacs/mdrun/simulationcontext.h"
#include "gromacs/mdtypes/fcdata.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/observableshistory.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/nbnxm/gpu_data_mgmt.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2017,2018,2019, 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.
#include "gromacs/domdec/domdec.h"
#include "gromacs/hardware/hw_info.h"
#include "gromacs/math/vec.h"
-#include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/force_flags.h"
#include "gromacs/mdlib/mdatoms.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/mdtypes/group.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/random/threefry.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2019, 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.
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-
/*! \libinternal \file
*
- * \brief This file declares types and functions for initializing an MD run
+ * \brief This file declares helper functionality for legacy option handling for mdrun
+ *
+ * It is likely that much of this content will move closer to the
+ * functionality that supports the respective features. For example,
+ * modules that change behaviour according to whether it is a rerun
+ * could register themselves with the rerun module and get notified at
+ * setup time to set their own boolean, rather than rely on a central
+ * glob of mdrun options being passed around.
*
- * \author Berk Hess <hess@kth.se>
+ * \ingroup module_mdtypes
* \inlibraryapi
*/
+#ifndef GMX_MDTYPES_MDRUNOPTIONS_H
+#define GMX_MDTYPES_MDRUNOPTIONS_H
-#ifndef GMX_MDLIB_MDRUN_H
-#define GMX_MDLIB_MDRUN_H
-
-#include "gromacs/timing/wallcycle.h"
+#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
-struct gmx_mtop_t;
-struct t_commrec;
-struct t_inputrec;
-class t_state;
+namespace gmx
+{
//! \internal \brief Options and settings for continuing from checkpoint
struct ContinuationOptions
int verboseStepPrintInterval = 100;
};
-//! \brief Allocate and initialize node-local state entries
-void set_state_entries(t_state *state, const t_inputrec *ir);
-
-//! \brief Broadcast inputrec and mtop and allocate node-specific settings
-void init_parallel(t_commrec *cr, t_inputrec *inputrec,
- gmx_mtop_t *mtop);
-
-//! \brief Broadcasts the, non-dynamic, state from the master to all ranks in cr->mpi_comm_mygroup
-//
-// This is intended to be used with MPI parallelization without
-// domain decompostion (currently with NM and TPI).
-void broadcastStateWithoutDynamics(const t_commrec *cr, t_state *state);
+} // end namespace gmx
#endif
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/observableshistory.h"
#include "gromacs/mdtypes/pullhistory.h"
#include "gromacs/pulling/pull.h"
static FILE *open_pull_out(const char *fn, struct pull_t *pull,
const gmx_output_env_t *oenv,
gmx_bool bCoord,
- const ContinuationOptions &continuationOptions)
+ const gmx::ContinuationOptions &continuationOptions)
{
FILE *fp;
int nsets, m;
return fp;
}
-void init_pull_output_files(pull_t *pull,
- int nfile,
- const t_filenm fnm[],
- const gmx_output_env_t *oenv,
- const ContinuationOptions &continuationOptions)
+void init_pull_output_files(pull_t *pull,
+ int nfile,
+ const t_filenm fnm[],
+ const gmx_output_env_t *oenv,
+ const gmx::ContinuationOptions &continuationOptions)
{
/* Check for px and pf filename collision, if we are writing
both files */
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
#include "gromacs/utility/basedefinitions.h"
struct pull_t;
-struct ContinuationOptions;
struct gmx_output_env_t;
struct ObservablesHistory;
struct t_filenm;
+namespace gmx
+{
+struct ContinuationOptions;
+}
+
/*! \brief Set up and open the pull output files, when requested.
*
* NOTE: This should only be called on the master rank and only when
* \param oenv Output options.
* \param continuationOptions Options for continuing from checkpoint file
*/
-void init_pull_output_files(pull_t *pull,
- int nfile,
- const t_filenm fnm[],
- const gmx_output_env_t *oenv,
- const ContinuationOptions &continuationOptions);
+void init_pull_output_files(pull_t *pull,
+ int nfile,
+ const t_filenm fnm[],
+ const gmx_output_env_t *oenv,
+ const gmx::ContinuationOptions &continuationOptions);
/*! \brief Print the pull output (x and/or f)
*
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/forceoutput.h"
#include "gromacs/mdtypes/inputrec.h"
#include <cstdio>
#include "gromacs/math/vectypes.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdtypes/pull_params.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
-struct ContinuationOptions;
struct gmx_mtop_t;
struct gmx_output_env_t;
struct pull_coord_work_t;
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/groupcoord.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/cyclecounter.h"
std::unique_ptr<gmx::EnforcedRotation>
init_rot(FILE *fplog, t_inputrec *ir, int nfile, const t_filenm fnm[],
const t_commrec *cr, gmx::LocalAtomSetManager * atomSets, const t_state *globalState, gmx_mtop_t *mtop, const gmx_output_env_t *oenv,
- const MdrunOptions &mdrunOptions)
+ const gmx::MdrunOptions &mdrunOptions)
{
int nat_max = 0; /* Size of biggest rotation group */
rvec *x_pbc = nullptr; /* Space for the pbc-correct atom positions */
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2008, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
struct gmx_enfrot;
struct gmx_mtop_t;
struct gmx_output_env_t;
-struct MdrunOptions;
struct t_commrec;
struct t_filenm;
struct t_inputrec;
namespace gmx
{
class LocalAtomSetManager;
+struct MdrunOptions;
+
class EnforcedRotation
{
public:
std::unique_ptr<gmx::EnforcedRotation>
init_rot(FILE *fplog, t_inputrec *ir, int nfile, const t_filenm fnm[],
const t_commrec *cr, gmx::LocalAtomSetManager * atomSets, const t_state *globalState, gmx_mtop_t *mtop, const gmx_output_env_t *oenv,
- const MdrunOptions &mdrunOptions);
+ const gmx::MdrunOptions &mdrunOptions);
/*! \brief Calculates the enforced rotation potential(s).
*
#include "gromacs/gmxlib/network.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/groupcoord.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/mdtypes/observableshistory.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/mdtypes/swaphistory.h"
t_commrec *cr,
gmx::LocalAtomSetManager *atomSets,
const gmx_output_env_t *oenv,
- const MdrunOptions &mdrunOptions)
+ const gmx::MdrunOptions &mdrunOptions)
{
t_swapcoords *sc;
t_swap *s;
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2013, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
struct gmx_mtop_t;
struct gmx_output_env_t;
struct gmx_wallcycle;
-struct MdrunOptions;
struct swaphistory_t;
struct t_commrec;
struct t_inputrec;
namespace gmx
{
class LocalAtomSetManager;
+struct MdrunOptions;
}
/*! \brief Initialize ion / water position swapping ("Computational Electrophysiology").
t_commrec *cr,
gmx::LocalAtomSetManager *atomSets,
const gmx_output_env_t *oenv,
- const MdrunOptions &mdrunOptions);
+ const gmx::MdrunOptions &mdrunOptions);
/*! \brief Finalizes ion / water position swapping.
#include "gromacs/domdec/domdec.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdrun/legacymdrunoptions.h"
#include "gromacs/mdrun/logging.h"
#include "gromacs/mdrun/runner.h"