From 7c59c1c47e132de7516dc777fd7bd94a45c89759 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Wed, 6 Mar 2019 14:00:36 +0100 Subject: [PATCH] Revert "Eliminate mdlib/mdrun.h" This reverts commit f4c94df918063cf855ba4575e1aebefb232ace50. Somehow gerrit permissions were able to be bypassed, and this change fixes the change that did not go through review as expected. We'll investigate gerrit settings also. --- src/api/cpp/context_impl.h | 2 +- src/gromacs/domdec/domdec.cpp | 8 ++-- src/gromacs/domdec/domdec.h | 4 +- src/gromacs/essentialdynamics/edsam.cpp | 1 + src/gromacs/gmxana/gmx_disre.cpp | 1 + src/gromacs/gmxpreprocess/genion.cpp | 1 + src/gromacs/gmxpreprocess/readpull.cpp | 1 + src/gromacs/imd/imd.cpp | 36 ++++++++-------- src/gromacs/imd/imd.h | 10 ++--- src/gromacs/mdlib/broadcaststructs.cpp | 1 + src/gromacs/mdlib/broadcaststructs.h | 17 +------- src/gromacs/mdlib/checkpointhandler.h | 3 +- src/gromacs/mdlib/constr.cpp | 2 +- src/gromacs/mdlib/energyoutput.cpp | 1 + src/gromacs/mdlib/force.cpp | 1 + src/gromacs/mdlib/lincs.cpp | 1 + src/gromacs/mdlib/md_support.cpp | 1 + src/gromacs/mdlib/md_support.h | 4 -- src/gromacs/mdlib/mdoutf.cpp | 4 +- src/gromacs/mdlib/mdoutf.h | 22 +++++----- .../{mdtypes/mdrunoptions.h => mdlib/mdrun.h} | 42 ++++++++++++------- src/gromacs/mdlib/shellfc.cpp | 1 + src/gromacs/mdlib/sim_util.cpp | 1 + src/gromacs/mdlib/stat.cpp | 1 + src/gromacs/mdlib/trajectory_writing.cpp | 1 + src/gromacs/mdlib/update.cpp | 1 + src/gromacs/mdrun/legacymdrunoptions.h | 2 +- src/gromacs/mdrun/md.cpp | 2 +- src/gromacs/mdrun/mimic.cpp | 2 +- src/gromacs/mdrun/minimize.cpp | 4 +- src/gromacs/mdrun/rerun.cpp | 2 +- src/gromacs/mdrun/runner.cpp | 4 +- src/gromacs/mdrun/runner.h | 4 +- src/gromacs/mdrun/tpi.cpp | 2 +- src/gromacs/pulling/output.cpp | 13 +++--- src/gromacs/pulling/output.h | 18 ++++---- src/gromacs/pulling/pull.cpp | 1 + src/gromacs/pulling/pull.h | 1 + src/gromacs/pulling/pull_rotation.cpp | 4 +- src/gromacs/pulling/pull_rotation.h | 7 ++-- src/gromacs/swap/swapcoords.cpp | 4 +- src/gromacs/swap/swapcoords.h | 6 +-- src/programs/mdrun/mdrun.cpp | 1 + 43 files changed, 122 insertions(+), 123 deletions(-) rename src/gromacs/{mdtypes/mdrunoptions.h => mdlib/mdrun.h} (82%) diff --git a/src/api/cpp/context_impl.h b/src/api/cpp/context_impl.h index cf80f0628a..0d90d1587c 100644 --- a/src/api/cpp/context_impl.h +++ b/src/api/cpp/context_impl.h @@ -44,7 +44,7 @@ #include #include -#include "gromacs/mdtypes/mdrunoptions.h" +#include "gromacs/mdrun/legacymdrunoptions.h" #include "gmxapi/context.h" #include "gmxapi/session.h" diff --git a/src/gromacs/domdec/domdec.cpp b/src/gromacs/domdec/domdec.cpp index 2090b4697e..3a7a230a66 100644 --- a/src/gromacs/domdec/domdec.cpp +++ b/src/gromacs/domdec/domdec.cpp @@ -66,11 +66,11 @@ #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" @@ -1934,7 +1934,7 @@ static DlbState forceDlbOffOrBail(DlbState cmdlineDlbState, */ static DlbState determineInitialDlbState(const gmx::MDLogger &mdlog, DlbOption dlbOption, gmx_bool bRecordLoad, - const gmx::MdrunOptions &mdrunOptions, + const MdrunOptions &mdrunOptions, const t_inputrec *ir) { DlbState dlbState = DlbState::offCanTurnOn; @@ -2137,7 +2137,7 @@ static void setupUpdateGroups(const gmx::MDLogger &mdlog, static void set_dd_limits_and_grid(const gmx::MDLogger &mdlog, t_commrec *cr, gmx_domdec_t *dd, const DomdecOptions &options, - const gmx::MdrunOptions &mdrunOptions, + const MdrunOptions &mdrunOptions, const gmx_mtop_t *mtop, const t_inputrec *ir, const matrix box, @@ -2953,7 +2953,7 @@ static void set_dd_envvar_options(const gmx::MDLogger &mdlog, gmx_domdec_t *init_domain_decomposition(const gmx::MDLogger &mdlog, t_commrec *cr, const DomdecOptions &options, - const gmx::MdrunOptions &mdrunOptions, + const MdrunOptions &mdrunOptions, const gmx_mtop_t *mtop, const t_inputrec *ir, const matrix box, diff --git a/src/gromacs/domdec/domdec.h b/src/gromacs/domdec/domdec.h index 5ea2ef1f8e..56208a1930 100644 --- a/src/gromacs/domdec/domdec.h +++ b/src/gromacs/domdec/domdec.h @@ -73,6 +73,7 @@ struct gmx_domdec_zones_t; struct gmx_localtop_t; struct gmx_mtop_t; struct gmx_vsite_t; +struct MdrunOptions; struct t_block; struct t_blocka; struct t_commrec; @@ -86,7 +87,6 @@ class t_state; namespace gmx { class MDLogger; -struct MdrunOptions; class LocalAtomSetManager; } // namespace @@ -203,7 +203,7 @@ gmx_domdec_t * init_domain_decomposition(const gmx::MDLogger &mdlog, t_commrec *cr, const DomdecOptions &options, - const gmx::MdrunOptions &mdrunOptions, + const MdrunOptions &mdrunOptions, const gmx_mtop_t *mtop, const t_inputrec *ir, const matrix box, diff --git a/src/gromacs/essentialdynamics/edsam.cpp b/src/gromacs/essentialdynamics/edsam.cpp index 4ae03b76b8..8ba72b64dc 100644 --- a/src/gromacs/essentialdynamics/edsam.cpp +++ b/src/gromacs/essentialdynamics/edsam.cpp @@ -59,6 +59,7 @@ #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" diff --git a/src/gromacs/gmxana/gmx_disre.cpp b/src/gromacs/gmxana/gmx_disre.cpp index d4d2941a23..389188933c 100644 --- a/src/gromacs/gmxana/gmx_disre.cpp +++ b/src/gromacs/gmxana/gmx_disre.cpp @@ -59,6 +59,7 @@ #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" diff --git a/src/gromacs/gmxpreprocess/genion.cpp b/src/gromacs/gmxpreprocess/genion.cpp index feea7e573c..297b2190e9 100644 --- a/src/gromacs/gmxpreprocess/genion.cpp +++ b/src/gromacs/gmxpreprocess/genion.cpp @@ -49,6 +49,7 @@ #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" diff --git a/src/gromacs/gmxpreprocess/readpull.cpp b/src/gromacs/gmxpreprocess/readpull.cpp index d39aecc853..16f00271e7 100644 --- a/src/gromacs/gmxpreprocess/readpull.cpp +++ b/src/gromacs/gmxpreprocess/readpull.cpp @@ -46,6 +46,7 @@ #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" diff --git a/src/gromacs/imd/imd.cpp b/src/gromacs/imd/imd.cpp index 3f59bcdc52..ce4e7bc0cc 100644 --- a/src/gromacs/imd/imd.cpp +++ b/src/gromacs/imd/imd.cpp @@ -72,12 +72,12 @@ #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" @@ -979,11 +979,11 @@ static void imd_readcommand(t_gmx_IMD_setup *IMDsetup) * * 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 gmx::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 ContinuationOptions &continuationOptions) { FILE *fp; @@ -1283,17 +1283,17 @@ static void imd_check_integrator_parallel(t_inputrec *ir, const t_commrec *cr) } } -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) +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) { int i; int nat_total; @@ -1311,7 +1311,7 @@ void init_IMD(t_inputrec *ir, // user asked for should be handled with a fatal error, not just a // warning. - const auto &options = mdrunOptions.imdOptions; + const ImdOptions &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: */ diff --git a/src/gromacs/imd/imd.h b/src/gromacs/imd/imd.h index e154345371..70fc97f1a2 100644 --- a/src/gromacs/imd/imd.h +++ b/src/gromacs/imd/imd.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 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. @@ -79,6 +79,7 @@ struct gmx_mtop_t; struct gmx_multisim_t; struct gmx_output_env_t; struct gmx_wallcycle; +struct MdrunOptions; struct t_commrec; struct t_filenm; struct t_gmx_IMD; @@ -86,11 +87,6 @@ struct t_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. @@ -148,7 +144,7 @@ void init_IMD(t_inputrec *ir, const t_commrec *cr, 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); + const MdrunOptions &mdrunOptions); /*! \brief IMD required in this time step? diff --git a/src/gromacs/mdlib/broadcaststructs.cpp b/src/gromacs/mdlib/broadcaststructs.cpp index 4feac1f229..51fd02767e 100644 --- a/src/gromacs/mdlib/broadcaststructs.cpp +++ b/src/gromacs/mdlib/broadcaststructs.cpp @@ -45,6 +45,7 @@ #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" diff --git a/src/gromacs/mdlib/broadcaststructs.h b/src/gromacs/mdlib/broadcaststructs.h index e4273078ba..d89d636d51 100644 --- a/src/gromacs/mdlib/broadcaststructs.h +++ b/src/gromacs/mdlib/broadcaststructs.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by + * Copyright (c) 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. @@ -52,11 +52,6 @@ #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 void block_bc(const t_commrec *cr, T &data) @@ -102,14 +97,4 @@ void nblock_abc(const t_commrec *cr, int numElements, std::vector *v) 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 diff --git a/src/gromacs/mdlib/checkpointhandler.h b/src/gromacs/mdlib/checkpointhandler.h index bfd98a5c57..c9f9cfe5ac 100644 --- a/src/gromacs/mdlib/checkpointhandler.h +++ b/src/gromacs/mdlib/checkpointhandler.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2018,2019, by the GROMACS development team, led by + * Copyright (c) 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. @@ -58,6 +58,7 @@ #include #include "gromacs/compat/pointers.h" +#include "gromacs/mdlib/mdrun.h" #include "gromacs/mdlib/simulationsignal.h" struct gmx_walltime_accounting; diff --git a/src/gromacs/mdlib/constr.cpp b/src/gromacs/mdlib/constr.cpp index a888364b74..e75f429e78 100644 --- a/src/gromacs/mdlib/constr.cpp +++ b/src/gromacs/mdlib/constr.cpp @@ -62,6 +62,7 @@ #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" @@ -71,7 +72,6 @@ #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" diff --git a/src/gromacs/mdlib/energyoutput.cpp b/src/gromacs/mdlib/energyoutput.cpp index f90aabe163..b2f55c7158 100644 --- a/src/gromacs/mdlib/energyoutput.cpp +++ b/src/gromacs/mdlib/energyoutput.cpp @@ -57,6 +57,7 @@ #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" diff --git a/src/gromacs/mdlib/force.cpp b/src/gromacs/mdlib/force.cpp index 3ca8b6de29..ef7b727ce0 100644 --- a/src/gromacs/mdlib/force.cpp +++ b/src/gromacs/mdlib/force.cpp @@ -58,6 +58,7 @@ #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" diff --git a/src/gromacs/mdlib/lincs.cpp b/src/gromacs/mdlib/lincs.cpp index 185d968f57..ac37a7b54e 100644 --- a/src/gromacs/mdlib/lincs.cpp +++ b/src/gromacs/mdlib/lincs.cpp @@ -63,6 +63,7 @@ #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" diff --git a/src/gromacs/mdlib/md_support.cpp b/src/gromacs/mdlib/md_support.cpp index a7154d9afd..b843bf32c1 100644 --- a/src/gromacs/mdlib/md_support.cpp +++ b/src/gromacs/mdlib/md_support.cpp @@ -49,6 +49,7 @@ #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" diff --git a/src/gromacs/mdlib/md_support.h b/src/gromacs/mdlib/md_support.h index e218d383c0..eb6c45d615 100644 --- a/src/gromacs/mdlib/md_support.h +++ b/src/gromacs/mdlib/md_support.h @@ -48,7 +48,6 @@ struct gmx_signalling_t; struct t_extmass; struct t_forcerec; struct t_grpopts; -struct t_inputrec; struct t_lambda; struct t_nrnb; class t_state; @@ -108,9 +107,6 @@ bool multisim_int_all_are_equal(const gmx_multisim_t *ms, 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, diff --git a/src/gromacs/mdlib/mdoutf.cpp b/src/gromacs/mdlib/mdoutf.cpp index 93967223fa..225dbc1ed8 100644 --- a/src/gromacs/mdlib/mdoutf.cpp +++ b/src/gromacs/mdlib/mdoutf.cpp @@ -46,12 +46,12 @@ #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" @@ -83,7 +83,7 @@ struct gmx_mdoutf { gmx_mdoutf_t init_mdoutf(FILE *fplog, int nfile, const t_filenm fnm[], - const gmx::MdrunOptions &mdrunOptions, + const MdrunOptions &mdrunOptions, const t_commrec *cr, gmx::IMDOutputProvider *outputProvider, const t_inputrec *ir, gmx_mtop_t *top_global, diff --git a/src/gromacs/mdlib/mdoutf.h b/src/gromacs/mdlib/mdoutf.h index f8c7a7754d..115fa0bb33 100644 --- a/src/gromacs/mdlib/mdoutf.h +++ b/src/gromacs/mdlib/mdoutf.h @@ -46,6 +46,7 @@ class energyhistory_t; struct gmx_mtop_t; struct gmx_output_env_t; +struct MdrunOptions; struct ObservablesHistory; struct t_commrec; struct t_filenm; @@ -54,7 +55,6 @@ struct t_inputrec; namespace gmx { class IMDOutputProvider; -struct MdrunOptions; } typedef struct gmx_mdoutf *gmx_mdoutf_t; @@ -64,16 +64,16 @@ 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 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); +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); /*! \brief Getter for file pointer */ ener_file_t mdoutf_get_fp_ene(gmx_mdoutf_t of); diff --git a/src/gromacs/mdtypes/mdrunoptions.h b/src/gromacs/mdlib/mdrun.h similarity index 82% rename from src/gromacs/mdtypes/mdrunoptions.h rename to src/gromacs/mdlib/mdrun.h index 8e7f626310..b4f85cfeac 100644 --- a/src/gromacs/mdtypes/mdrunoptions.h +++ b/src/gromacs/mdlib/mdrun.h @@ -1,7 +1,9 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * 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 * 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. @@ -32,28 +34,25 @@ * 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 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. + * \brief This file declares types and functions for initializing an MD run * - * \ingroup module_mdtypes + * \author Berk Hess * \inlibraryapi */ -#ifndef GMX_MDTYPES_MDRUNOPTIONS_H -#define GMX_MDTYPES_MDRUNOPTIONS_H -#include "gromacs/utility/basedefinitions.h" +#ifndef GMX_MDLIB_MDRUN_H +#define GMX_MDLIB_MDRUN_H + +#include "gromacs/timing/wallcycle.h" #include "gromacs/utility/real.h" -namespace gmx -{ +struct gmx_mtop_t; +struct t_commrec; +struct t_inputrec; +class t_state; //! \internal \brief Options and settings for continuing from checkpoint struct ContinuationOptions @@ -134,6 +133,17 @@ struct MdrunOptions int verboseStepPrintInterval = 100; }; -} // end namespace gmx +//! \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); #endif diff --git a/src/gromacs/mdlib/shellfc.cpp b/src/gromacs/mdlib/shellfc.cpp index deee367081..ff3aa7a123 100644 --- a/src/gromacs/mdlib/shellfc.cpp +++ b/src/gromacs/mdlib/shellfc.cpp @@ -58,6 +58,7 @@ #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" diff --git a/src/gromacs/mdlib/sim_util.cpp b/src/gromacs/mdlib/sim_util.cpp index 0457c20f0c..055b5a8d91 100644 --- a/src/gromacs/mdlib/sim_util.cpp +++ b/src/gromacs/mdlib/sim_util.cpp @@ -78,6 +78,7 @@ #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" diff --git a/src/gromacs/mdlib/stat.cpp b/src/gromacs/mdlib/stat.cpp index fdaa251c48..b45431c9f0 100644 --- a/src/gromacs/mdlib/stat.cpp +++ b/src/gromacs/mdlib/stat.cpp @@ -48,6 +48,7 @@ #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" diff --git a/src/gromacs/mdlib/trajectory_writing.cpp b/src/gromacs/mdlib/trajectory_writing.cpp index 6e075020b3..75c9806d5e 100644 --- a/src/gromacs/mdlib/trajectory_writing.cpp +++ b/src/gromacs/mdlib/trajectory_writing.cpp @@ -41,6 +41,7 @@ #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" diff --git a/src/gromacs/mdlib/update.cpp b/src/gromacs/mdlib/update.cpp index 2cce59af02..c1f2c983a5 100644 --- a/src/gromacs/mdlib/update.cpp +++ b/src/gromacs/mdlib/update.cpp @@ -59,6 +59,7 @@ #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" diff --git a/src/gromacs/mdrun/legacymdrunoptions.h b/src/gromacs/mdrun/legacymdrunoptions.h index 69602710e8..d65b417c48 100644 --- a/src/gromacs/mdrun/legacymdrunoptions.h +++ b/src/gromacs/mdrun/legacymdrunoptions.h @@ -53,8 +53,8 @@ #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" diff --git a/src/gromacs/mdrun/md.cpp b/src/gromacs/mdrun/md.cpp index a1d389b70d..d853a25d75 100644 --- a/src/gromacs/mdrun/md.cpp +++ b/src/gromacs/mdrun/md.cpp @@ -84,6 +84,7 @@ #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" @@ -111,7 +112,6 @@ #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" diff --git a/src/gromacs/mdrun/mimic.cpp b/src/gromacs/mdrun/mimic.cpp index c12962ab13..eaefb86f22 100644 --- a/src/gromacs/mdrun/mimic.cpp +++ b/src/gromacs/mdrun/mimic.cpp @@ -83,6 +83,7 @@ #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" @@ -111,7 +112,6 @@ #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" diff --git a/src/gromacs/mdrun/minimize.cpp b/src/gromacs/mdrun/minimize.cpp index 81e5971781..2f013cc59b 100644 --- a/src/gromacs/mdrun/minimize.cpp +++ b/src/gromacs/mdrun/minimize.cpp @@ -78,6 +78,7 @@ #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" @@ -90,7 +91,6 @@ #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" @@ -354,7 +354,7 @@ static void init_em(FILE *fplog, const t_commrec *cr, const gmx_multisim_t *ms, t_inputrec *ir, - const gmx::MdrunOptions &mdrunOptions, + const MdrunOptions &mdrunOptions, t_state *state_global, gmx_mtop_t *top_global, em_state_t *ems, gmx_localtop_t *top, t_nrnb *nrnb, diff --git a/src/gromacs/mdrun/rerun.cpp b/src/gromacs/mdrun/rerun.cpp index fa2ad12538..4340831023 100644 --- a/src/gromacs/mdrun/rerun.cpp +++ b/src/gromacs/mdrun/rerun.cpp @@ -84,6 +84,7 @@ #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" @@ -111,7 +112,6 @@ #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" diff --git a/src/gromacs/mdrun/runner.cpp b/src/gromacs/mdrun/runner.cpp index d5f6614e63..df8da62702 100644 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@ -82,19 +82,20 @@ #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" @@ -105,7 +106,6 @@ #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" diff --git a/src/gromacs/mdrun/runner.h b/src/gromacs/mdrun/runner.h index deb2fb1ca0..465fdd27f1 100644 --- a/src/gromacs/mdrun/runner.h +++ b/src/gromacs/mdrun/runner.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,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. @@ -52,7 +52,7 @@ #include "gromacs/domdec/domdec.h" #include "gromacs/hardware/hw_info.h" #include "gromacs/math/vec.h" -#include "gromacs/mdtypes/mdrunoptions.h" +#include "gromacs/mdlib/mdrun.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/real.h" diff --git a/src/gromacs/mdrun/tpi.cpp b/src/gromacs/mdrun/tpi.cpp index 227ce96fd7..e6b77668ab 100644 --- a/src/gromacs/mdrun/tpi.cpp +++ b/src/gromacs/mdrun/tpi.cpp @@ -71,6 +71,7 @@ #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" @@ -82,7 +83,6 @@ #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" diff --git a/src/gromacs/pulling/output.cpp b/src/gromacs/pulling/output.cpp index 55a140c4f6..4f5c58ec9d 100644 --- a/src/gromacs/pulling/output.cpp +++ b/src/gromacs/pulling/output.cpp @@ -46,7 +46,6 @@ #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" @@ -386,7 +385,7 @@ static void set_legend_for_coord_components(const pull_coord_work_t *pcrd, int c static FILE *open_pull_out(const char *fn, struct pull_t *pull, const gmx_output_env_t *oenv, gmx_bool bCoord, - const gmx::ContinuationOptions &continuationOptions) + const ContinuationOptions &continuationOptions) { FILE *fp; int nsets, m; @@ -499,11 +498,11 @@ static FILE *open_pull_out(const char *fn, struct pull_t *pull, return fp; } -void init_pull_output_files(pull_t *pull, - int nfile, - const t_filenm fnm[], - const gmx_output_env_t *oenv, - const gmx::ContinuationOptions &continuationOptions) +void init_pull_output_files(pull_t *pull, + int nfile, + const t_filenm fnm[], + const gmx_output_env_t *oenv, + const ContinuationOptions &continuationOptions) { /* Check for px and pf filename collision, if we are writing both files */ diff --git a/src/gromacs/pulling/output.h b/src/gromacs/pulling/output.h index fccbb10eb2..3da5993b9f 100644 --- a/src/gromacs/pulling/output.h +++ b/src/gromacs/pulling/output.h @@ -3,7 +3,7 @@ * * 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,2019, 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. @@ -51,15 +51,11 @@ #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 @@ -71,11 +67,11 @@ struct ContinuationOptions; * \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 gmx::ContinuationOptions &continuationOptions); +void init_pull_output_files(pull_t *pull, + int nfile, + const t_filenm fnm[], + const gmx_output_env_t *oenv, + const ContinuationOptions &continuationOptions); /*! \brief Print the pull output (x and/or f) * diff --git a/src/gromacs/pulling/pull.cpp b/src/gromacs/pulling/pull.cpp index 54ba106a62..89eac4578e 100644 --- a/src/gromacs/pulling/pull.cpp +++ b/src/gromacs/pulling/pull.cpp @@ -59,6 +59,7 @@ #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" diff --git a/src/gromacs/pulling/pull.h b/src/gromacs/pulling/pull.h index 887ca01838..9ae87394d0 100644 --- a/src/gromacs/pulling/pull.h +++ b/src/gromacs/pulling/pull.h @@ -53,6 +53,7 @@ #include #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" diff --git a/src/gromacs/pulling/pull_rotation.cpp b/src/gromacs/pulling/pull_rotation.cpp index 81a41009a0..a2c3210fb5 100644 --- a/src/gromacs/pulling/pull_rotation.cpp +++ b/src/gromacs/pulling/pull_rotation.cpp @@ -61,11 +61,11 @@ #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" @@ -3594,7 +3594,7 @@ static int calc_mpi_bufsize(const gmx_enfrot *er) std::unique_ptr 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 gmx::MdrunOptions &mdrunOptions) + const MdrunOptions &mdrunOptions) { int nat_max = 0; /* Size of biggest rotation group */ rvec *x_pbc = nullptr; /* Space for the pbc-correct atom positions */ diff --git a/src/gromacs/pulling/pull_rotation.h b/src/gromacs/pulling/pull_rotation.h index 2b2c4dc04e..fe313c3906 100644 --- a/src/gromacs/pulling/pull_rotation.h +++ b/src/gromacs/pulling/pull_rotation.h @@ -3,7 +3,7 @@ * * 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,2019, 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. @@ -60,6 +60,7 @@ struct gmx_domdec_t; struct gmx_enfrot; struct gmx_mtop_t; struct gmx_output_env_t; +struct MdrunOptions; struct t_commrec; struct t_filenm; struct t_inputrec; @@ -69,8 +70,6 @@ class t_state; namespace gmx { class LocalAtomSetManager; -struct MdrunOptions; - class EnforcedRotation { public: @@ -112,7 +111,7 @@ class EnforcedRotation std::unique_ptr 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 gmx::MdrunOptions &mdrunOptions); + const MdrunOptions &mdrunOptions); /*! \brief Calculates the enforced rotation potential(s). * diff --git a/src/gromacs/swap/swapcoords.cpp b/src/gromacs/swap/swapcoords.cpp index 7673365bc8..212ddd300a 100644 --- a/src/gromacs/swap/swapcoords.cpp +++ b/src/gromacs/swap/swapcoords.cpp @@ -60,11 +60,11 @@ #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" @@ -1462,7 +1462,7 @@ void init_swapcoords( t_commrec *cr, gmx::LocalAtomSetManager *atomSets, const gmx_output_env_t *oenv, - const gmx::MdrunOptions &mdrunOptions) + const MdrunOptions &mdrunOptions) { t_swapcoords *sc; t_swap *s; diff --git a/src/gromacs/swap/swapcoords.h b/src/gromacs/swap/swapcoords.h index df3a9c6145..736b5f193f 100644 --- a/src/gromacs/swap/swapcoords.h +++ b/src/gromacs/swap/swapcoords.h @@ -2,7 +2,7 @@ * 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,2019, 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. @@ -61,6 +61,7 @@ struct gmx_domdec_t; struct gmx_mtop_t; struct gmx_output_env_t; struct gmx_wallcycle; +struct MdrunOptions; struct swaphistory_t; struct t_commrec; struct t_inputrec; @@ -71,7 +72,6 @@ struct ObservablesHistory; namespace gmx { class LocalAtomSetManager; -struct MdrunOptions; } /*! \brief Initialize ion / water position swapping ("Computational Electrophysiology"). @@ -101,7 +101,7 @@ void init_swapcoords( t_commrec *cr, gmx::LocalAtomSetManager *atomSets, const gmx_output_env_t *oenv, - const gmx::MdrunOptions &mdrunOptions); + const MdrunOptions &mdrunOptions); /*! \brief Finalizes ion / water position swapping. diff --git a/src/programs/mdrun/mdrun.cpp b/src/programs/mdrun/mdrun.cpp index 32be1b5ef9..5f06e0ad3c 100644 --- a/src/programs/mdrun/mdrun.cpp +++ b/src/programs/mdrun/mdrun.cpp @@ -59,6 +59,7 @@ #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" -- 2.22.0