From f4c94df918063cf855ba4575e1aebefb232ace50 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Wed, 6 Mar 2019 11:16:29 +0100 Subject: [PATCH] Eliminate mdlib/mdrun.h This file was filled with stuff that works better elsewhere. Moved the options structs into gmx namespace Refs #2877 Change-Id: Ib796ef8e9896804c56936f23f67dcd3fc12900fd --- 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 +++++----- 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 +- .../{mdlib/mdrun.h => mdtypes/mdrunoptions.h} | 42 +++++++------------ 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, 123 insertions(+), 122 deletions(-) rename src/gromacs/{mdlib/mdrun.h => mdtypes/mdrunoptions.h} (82%) diff --git a/src/api/cpp/context_impl.h b/src/api/cpp/context_impl.h index 0d90d1587c..cf80f0628a 100644 --- a/src/api/cpp/context_impl.h +++ b/src/api/cpp/context_impl.h @@ -44,7 +44,7 @@ #include #include -#include "gromacs/mdrun/legacymdrunoptions.h" +#include "gromacs/mdtypes/mdrunoptions.h" #include "gmxapi/context.h" #include "gmxapi/session.h" diff --git a/src/gromacs/domdec/domdec.cpp b/src/gromacs/domdec/domdec.cpp index 3a7a230a66..2090b4697e 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 MdrunOptions &mdrunOptions, + const gmx::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 MdrunOptions &mdrunOptions, + const gmx::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 MdrunOptions &mdrunOptions, + const gmx::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 56208a1930..5ea2ef1f8e 100644 --- a/src/gromacs/domdec/domdec.h +++ b/src/gromacs/domdec/domdec.h @@ -73,7 +73,6 @@ 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; @@ -87,6 +86,7 @@ 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 MdrunOptions &mdrunOptions, + const gmx::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 8ba72b64dc..4ae03b76b8 100644 --- a/src/gromacs/essentialdynamics/edsam.cpp +++ b/src/gromacs/essentialdynamics/edsam.cpp @@ -59,7 +59,6 @@ #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 389188933c..d4d2941a23 100644 --- a/src/gromacs/gmxana/gmx_disre.cpp +++ b/src/gromacs/gmxana/gmx_disre.cpp @@ -59,7 +59,6 @@ #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 297b2190e9..feea7e573c 100644 --- a/src/gromacs/gmxpreprocess/genion.cpp +++ b/src/gromacs/gmxpreprocess/genion.cpp @@ -49,7 +49,6 @@ #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 16f00271e7..d39aecc853 100644 --- a/src/gromacs/gmxpreprocess/readpull.cpp +++ b/src/gromacs/gmxpreprocess/readpull.cpp @@ -46,7 +46,6 @@ #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 ce4e7bc0cc..3f59bcdc52 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 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; @@ -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 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; @@ -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 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: */ diff --git a/src/gromacs/imd/imd.h b/src/gromacs/imd/imd.h index 70fc97f1a2..e154345371 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, 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. @@ -79,7 +79,6 @@ 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; @@ -87,6 +86,11 @@ 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. @@ -144,7 +148,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 MdrunOptions &mdrunOptions); + const gmx::MdrunOptions &mdrunOptions); /*! \brief IMD required in this time step? diff --git a/src/gromacs/mdlib/broadcaststructs.cpp b/src/gromacs/mdlib/broadcaststructs.cpp index 51fd02767e..4feac1f229 100644 --- a/src/gromacs/mdlib/broadcaststructs.cpp +++ b/src/gromacs/mdlib/broadcaststructs.cpp @@ -45,7 +45,6 @@ #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 d89d636d51..e4273078ba 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, 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. @@ -52,6 +52,11 @@ #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) @@ -97,4 +102,14 @@ 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 c9f9cfe5ac..bfd98a5c57 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, 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. @@ -58,7 +58,6 @@ #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 e75f429e78..a888364b74 100644 --- a/src/gromacs/mdlib/constr.cpp +++ b/src/gromacs/mdlib/constr.cpp @@ -62,7 +62,6 @@ #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" @@ -72,6 +71,7 @@ #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 b2f55c7158..f90aabe163 100644 --- a/src/gromacs/mdlib/energyoutput.cpp +++ b/src/gromacs/mdlib/energyoutput.cpp @@ -57,7 +57,6 @@ #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 ef7b727ce0..3ca8b6de29 100644 --- a/src/gromacs/mdlib/force.cpp +++ b/src/gromacs/mdlib/force.cpp @@ -58,7 +58,6 @@ #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 ac37a7b54e..185d968f57 100644 --- a/src/gromacs/mdlib/lincs.cpp +++ b/src/gromacs/mdlib/lincs.cpp @@ -63,7 +63,6 @@ #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 b843bf32c1..a7154d9afd 100644 --- a/src/gromacs/mdlib/md_support.cpp +++ b/src/gromacs/mdlib/md_support.cpp @@ -49,7 +49,6 @@ #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 eb6c45d615..e218d383c0 100644 --- a/src/gromacs/mdlib/md_support.h +++ b/src/gromacs/mdlib/md_support.h @@ -48,6 +48,7 @@ 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; @@ -107,6 +108,9 @@ 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 225dbc1ed8..93967223fa 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 MdrunOptions &mdrunOptions, + const gmx::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 115fa0bb33..f8c7a7754d 100644 --- a/src/gromacs/mdlib/mdoutf.h +++ b/src/gromacs/mdlib/mdoutf.h @@ -46,7 +46,6 @@ class energyhistory_t; struct gmx_mtop_t; struct gmx_output_env_t; -struct MdrunOptions; struct ObservablesHistory; struct t_commrec; struct t_filenm; @@ -55,6 +54,7 @@ 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 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); diff --git a/src/gromacs/mdlib/shellfc.cpp b/src/gromacs/mdlib/shellfc.cpp index ff3aa7a123..deee367081 100644 --- a/src/gromacs/mdlib/shellfc.cpp +++ b/src/gromacs/mdlib/shellfc.cpp @@ -58,7 +58,6 @@ #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 055b5a8d91..0457c20f0c 100644 --- a/src/gromacs/mdlib/sim_util.cpp +++ b/src/gromacs/mdlib/sim_util.cpp @@ -78,7 +78,6 @@ #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 b45431c9f0..fdaa251c48 100644 --- a/src/gromacs/mdlib/stat.cpp +++ b/src/gromacs/mdlib/stat.cpp @@ -48,7 +48,6 @@ #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 75c9806d5e..6e075020b3 100644 --- a/src/gromacs/mdlib/trajectory_writing.cpp +++ b/src/gromacs/mdlib/trajectory_writing.cpp @@ -41,7 +41,6 @@ #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 c1f2c983a5..2cce59af02 100644 --- a/src/gromacs/mdlib/update.cpp +++ b/src/gromacs/mdlib/update.cpp @@ -59,7 +59,6 @@ #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 d65b417c48..69602710e8 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 d853a25d75..a1d389b70d 100644 --- a/src/gromacs/mdrun/md.cpp +++ b/src/gromacs/mdrun/md.cpp @@ -84,7 +84,6 @@ #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" @@ -112,6 +111,7 @@ #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 eaefb86f22..c12962ab13 100644 --- a/src/gromacs/mdrun/mimic.cpp +++ b/src/gromacs/mdrun/mimic.cpp @@ -83,7 +83,6 @@ #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" @@ -112,6 +111,7 @@ #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 2f013cc59b..81e5971781 100644 --- a/src/gromacs/mdrun/minimize.cpp +++ b/src/gromacs/mdrun/minimize.cpp @@ -78,7 +78,6 @@ #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" @@ -91,6 +90,7 @@ #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 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, diff --git a/src/gromacs/mdrun/rerun.cpp b/src/gromacs/mdrun/rerun.cpp index 4340831023..fa2ad12538 100644 --- a/src/gromacs/mdrun/rerun.cpp +++ b/src/gromacs/mdrun/rerun.cpp @@ -84,7 +84,6 @@ #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" @@ -112,6 +111,7 @@ #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 df8da62702..d5f6614e63 100644 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@ -82,20 +82,19 @@ #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" @@ -106,6 +105,7 @@ #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 465fdd27f1..deb2fb1ca0 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, 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. @@ -52,7 +52,7 @@ #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" diff --git a/src/gromacs/mdrun/tpi.cpp b/src/gromacs/mdrun/tpi.cpp index e6b77668ab..227ce96fd7 100644 --- a/src/gromacs/mdrun/tpi.cpp +++ b/src/gromacs/mdrun/tpi.cpp @@ -71,7 +71,6 @@ #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" @@ -83,6 +82,7 @@ #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/mdlib/mdrun.h b/src/gromacs/mdtypes/mdrunoptions.h similarity index 82% rename from src/gromacs/mdlib/mdrun.h rename to src/gromacs/mdtypes/mdrunoptions.h index b4f85cfeac..8e7f626310 100644 --- a/src/gromacs/mdlib/mdrun.h +++ b/src/gromacs/mdtypes/mdrunoptions.h @@ -1,9 +1,7 @@ /* * 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. @@ -34,25 +32,28 @@ * 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 + * \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 @@ -133,17 +134,6 @@ struct MdrunOptions 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 diff --git a/src/gromacs/pulling/output.cpp b/src/gromacs/pulling/output.cpp index 4f5c58ec9d..55a140c4f6 100644 --- a/src/gromacs/pulling/output.cpp +++ b/src/gromacs/pulling/output.cpp @@ -46,6 +46,7 @@ #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" @@ -385,7 +386,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 ContinuationOptions &continuationOptions) + const gmx::ContinuationOptions &continuationOptions) { FILE *fp; int nsets, m; @@ -498,11 +499,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 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 */ diff --git a/src/gromacs/pulling/output.h b/src/gromacs/pulling/output.h index 3da5993b9f..fccbb10eb2 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, 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. @@ -51,11 +51,15 @@ #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 @@ -67,11 +71,11 @@ struct t_filenm; * \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) * diff --git a/src/gromacs/pulling/pull.cpp b/src/gromacs/pulling/pull.cpp index 89eac4578e..54ba106a62 100644 --- a/src/gromacs/pulling/pull.cpp +++ b/src/gromacs/pulling/pull.cpp @@ -59,7 +59,6 @@ #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 9ae87394d0..887ca01838 100644 --- a/src/gromacs/pulling/pull.h +++ b/src/gromacs/pulling/pull.h @@ -53,7 +53,6 @@ #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 a2c3210fb5..81a41009a0 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 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 */ diff --git a/src/gromacs/pulling/pull_rotation.h b/src/gromacs/pulling/pull_rotation.h index fe313c3906..2b2c4dc04e 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, 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. @@ -60,7 +60,6 @@ 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; @@ -70,6 +69,8 @@ class t_state; namespace gmx { class LocalAtomSetManager; +struct MdrunOptions; + class EnforcedRotation { public: @@ -111,7 +112,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 MdrunOptions &mdrunOptions); + const gmx::MdrunOptions &mdrunOptions); /*! \brief Calculates the enforced rotation potential(s). * diff --git a/src/gromacs/swap/swapcoords.cpp b/src/gromacs/swap/swapcoords.cpp index 212ddd300a..7673365bc8 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 MdrunOptions &mdrunOptions) + const gmx::MdrunOptions &mdrunOptions) { t_swapcoords *sc; t_swap *s; diff --git a/src/gromacs/swap/swapcoords.h b/src/gromacs/swap/swapcoords.h index 736b5f193f..df3a9c6145 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, 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. @@ -61,7 +61,6 @@ 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; @@ -72,6 +71,7 @@ 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 MdrunOptions &mdrunOptions); + const gmx::MdrunOptions &mdrunOptions); /*! \brief Finalizes ion / water position swapping. diff --git a/src/programs/mdrun/mdrun.cpp b/src/programs/mdrun/mdrun.cpp index 5f06e0ad3c..32be1b5ef9 100644 --- a/src/programs/mdrun/mdrun.cpp +++ b/src/programs/mdrun/mdrun.cpp @@ -59,7 +59,6 @@ #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