Make global topology constant in mdoutf
authorPascal Merz <pascal.merz@me.com>
Tue, 24 Mar 2020 02:40:54 +0000 (20:40 -0600)
committerPascal Merz <pascal.merz@me.com>
Mon, 6 Apr 2020 16:15:39 +0000 (16:15 +0000)
init_mdoutf and gmx_mdoutf required non-const pointers to the
global topology. This is not needed, so this is changed to a const
pointer.

Refs #3467

src/gromacs/mdlib/mdoutf.cpp
src/gromacs/mdlib/mdoutf.h
src/gromacs/modularsimulator/trajectoryelement.cpp
src/gromacs/modularsimulator/trajectoryelement.h

index dac8b7754d04f354fe4c1763a19bd334966e1f5f..92874bb8f4140785802d9220034817a7dba6cbdc 100644 (file)
@@ -79,7 +79,7 @@ struct gmx_mdoutf
     FILE*                         fp_dhdl;
     int                           natoms_global;
     int                           natoms_x_compressed;
-    SimulationGroups*             groups; /* for compressed position writing */
+    const SimulationGroups*       groups; /* for compressed position writing */
     gmx_wallcycle_t               wcycle;
     rvec*                         f_global;
     gmx::IMDOutputProvider*       outputProvider;
@@ -97,7 +97,7 @@ gmx_mdoutf_t init_mdoutf(FILE*                         fplog,
                          gmx::IMDOutputProvider*       outputProvider,
                          const gmx::MdModulesNotifier& mdModulesNotifier,
                          const t_inputrec*             ir,
-                         gmx_mtop_t*                   top_global,
+                         const gmx_mtop_t*             top_global,
                          const gmx_output_env_t*       oenv,
                          gmx_wallcycle_t               wcycle,
                          const gmx::StartingBehavior   startingBehavior,
index a6f9371ce6eee68897c41e6fee0786434adee6f7..4e704efecfce1da0c2eb82a7af7a6ed0ba829431 100644 (file)
@@ -76,7 +76,7 @@ gmx_mdoutf_t init_mdoutf(FILE*                         fplog,
                          gmx::IMDOutputProvider*       outputProvider,
                          const gmx::MdModulesNotifier& mdModulesNotifier,
                          const t_inputrec*             ir,
-                         gmx_mtop_t*                   mtop,
+                         const gmx_mtop_t*             mtop,
                          const gmx_output_env_t*       oenv,
                          gmx_wallcycle_t               wcycle,
                          gmx::StartingBehavior         startingBehavior,
index 1195b294cb70b286d0bcead32fe0ebe83126b723..1da5d8ccc8a0902203da0129a1667aa323967fc0 100644 (file)
@@ -60,7 +60,7 @@ TrajectoryElement::TrajectoryElement(std::vector<SignallerCallbackPtr>     signa
                                      gmx::IMDOutputProvider*               outputProvider,
                                      const MdModulesNotifier&              mdModulesNotifier,
                                      const t_inputrec*                     inputrec,
-                                     gmx_mtop_t*                           top_global,
+                                     const gmx_mtop_t*                     top_global,
                                      const gmx_output_env_t*               oenv,
                                      gmx_wallcycle*                        wcycle,
                                      StartingBehavior                      startingBehavior,
index fd7060202439d0c6ff4fc8d8e98f75ecabbf29aa..be1a7bd7894df9f6d656296cf35b174edd9a0c57 100644 (file)
@@ -156,7 +156,7 @@ private:
                       IMDOutputProvider*                    outputProvider,
                       const MdModulesNotifier&              mdModulesNotifier,
                       const t_inputrec*                     inputrec,
-                      gmx_mtop_t*                           top_global,
+                      const gmx_mtop_t*                     top_global,
                       const gmx_output_env_t*               oenv,
                       gmx_wallcycle*                        wcycle,
                       StartingBehavior                      startingBehavior,