Use const ref for mtop and inputrec in EnergyOutput initialization
authorJoe Jordan <ejjordan12@gmail.com>
Mon, 1 Mar 2021 08:14:16 +0000 (08:14 +0000)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 1 Mar 2021 08:14:16 +0000 (08:14 +0000)
Some renaming for ir to inputrec is also done.

src/gromacs/mdlib/energyoutput.cpp
src/gromacs/mdlib/energyoutput.h
src/gromacs/mdlib/mdebin_bar.cpp
src/gromacs/mdlib/mdebin_bar.h
src/gromacs/mdlib/tests/energyoutput.cpp
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/mimic.cpp
src/gromacs/mdrun/minimize.cpp
src/gromacs/mdrun/rerun.cpp
src/gromacs/modularsimulator/energydata.cpp

index 5fce35b75093f893f2077c9ab12e6fa179699ff5..571edc54c8feb7bec602550012ebf1ec82312406 100644 (file)
@@ -124,8 +124,8 @@ namespace gmx
  * \todo Write free-energy output also to energy file (after adding more tests)
  */
 EnergyOutput::EnergyOutput(ener_file*               fp_ene,
-                           const gmx_mtop_t*        mtop,
-                           const t_inputrec*        ir,
+                           const gmx_mtop_t&        mtop,
+                           const t_inputrec&        inputrec,
                            const pull_t*            pull_work,
                            FILE*                    fp_dhdl,
                            bool                     isRerun,
@@ -157,18 +157,18 @@ EnergyOutput::EnergyOutput(ener_file*               fp_ene,
     int                     i, j, ni, nj, n, k, kk, ncon, nset;
     bool                    bBHAM, b14;
 
-    if (EI_DYNAMICS(ir->eI))
+    if (EI_DYNAMICS(inputrec.eI))
     {
-        delta_t_ = ir->delta_t;
+        delta_t_ = inputrec.delta_t;
     }
     else
     {
         delta_t_ = 0;
     }
 
-    groups = &mtop->groups;
+    groups = &mtop.groups;
 
-    bBHAM = (mtop->ffparams.numTypes() > 0) && (mtop->ffparams.functype[0] == F_BHAM);
+    bBHAM = (mtop.ffparams.numTypes() > 0) && (mtop.ffparams.functype[0] == F_BHAM);
     b14   = (gmx_mtop_ftype_count(mtop, F_LJ14) > 0 || gmx_mtop_ftype_count(mtop, F_LJC14_Q) > 0);
 
     ncon         = gmx_mtop_ftype_count(mtop, F_CONSTR);
@@ -178,7 +178,7 @@ EnergyOutput::EnergyOutput(ener_file*               fp_ene,
     nCrmsd_      = 0;
     if (bConstr)
     {
-        if (ncon > 0 && ir->eConstrAlg == ConstraintAlgorithm::Lincs)
+        if (ncon > 0 && inputrec.eConstrAlg == ConstraintAlgorithm::Lincs)
         {
             nCrmsd_ = 1;
         }
@@ -205,40 +205,40 @@ EnergyOutput::EnergyOutput(ener_file*               fp_ene,
 
     if (!isRerun)
     {
-        bEner_[F_EKIN] = EI_DYNAMICS(ir->eI);
-        bEner_[F_ETOT] = EI_DYNAMICS(ir->eI);
-        bEner_[F_TEMP] = EI_DYNAMICS(ir->eI);
+        bEner_[F_EKIN] = EI_DYNAMICS(inputrec.eI);
+        bEner_[F_ETOT] = EI_DYNAMICS(inputrec.eI);
+        bEner_[F_TEMP] = EI_DYNAMICS(inputrec.eI);
 
-        bEner_[F_ECONSERVED] = integratorHasConservedEnergyQuantity(ir);
-        bEner_[F_PDISPCORR]  = (ir->eDispCorr != DispersionCorrectionType::No);
+        bEner_[F_ECONSERVED] = integratorHasConservedEnergyQuantity(&inputrec);
+        bEner_[F_PDISPCORR]  = (inputrec.eDispCorr != DispersionCorrectionType::No);
         bEner_[F_PRES]       = true;
     }
 
-    bEner_[F_LJ]           = !bBHAM;
-    bEner_[F_BHAM]         = bBHAM;
-    bEner_[F_EQM]          = ir->bQMMM;
-    bEner_[F_RF_EXCL]      = (EEL_RF(ir->coulombtype) && ir->cutoff_scheme == CutoffScheme::Group);
-    bEner_[F_COUL_RECIP]   = EEL_FULL(ir->coulombtype);
-    bEner_[F_LJ_RECIP]     = EVDW_PME(ir->vdwtype);
+    bEner_[F_LJ]   = !bBHAM;
+    bEner_[F_BHAM] = bBHAM;
+    bEner_[F_EQM]  = inputrec.bQMMM;
+    bEner_[F_RF_EXCL] = (EEL_RF(inputrec.coulombtype) && inputrec.cutoff_scheme == CutoffScheme::Group);
+    bEner_[F_COUL_RECIP]   = EEL_FULL(inputrec.coulombtype);
+    bEner_[F_LJ_RECIP]     = EVDW_PME(inputrec.vdwtype);
     bEner_[F_LJ14]         = b14;
     bEner_[F_COUL14]       = b14;
     bEner_[F_LJC14_Q]      = false;
     bEner_[F_LJC_PAIRS_NB] = false;
 
 
-    bEner_[F_DVDL_COUL] = (ir->efep != FreeEnergyPerturbationType::No)
-                          && ir->fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Coul];
-    bEner_[F_DVDL_VDW] = (ir->efep != FreeEnergyPerturbationType::No)
-                         && ir->fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Vdw];
-    bEner_[F_DVDL_BONDED] = (ir->efep != FreeEnergyPerturbationType::No)
-                            && ir->fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Bonded];
+    bEner_[F_DVDL_COUL] = (inputrec.efep != FreeEnergyPerturbationType::No)
+                          && inputrec.fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Coul];
+    bEner_[F_DVDL_VDW] = (inputrec.efep != FreeEnergyPerturbationType::No)
+                         && inputrec.fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Vdw];
+    bEner_[F_DVDL_BONDED] = (inputrec.efep != FreeEnergyPerturbationType::No)
+                            && inputrec.fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Bonded];
     bEner_[F_DVDL_RESTRAINT] =
-            (ir->efep != FreeEnergyPerturbationType::No)
-            && ir->fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Restraint];
-    bEner_[F_DKDL] = (ir->efep != FreeEnergyPerturbationType::No)
-                     && ir->fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Mass];
-    bEner_[F_DVDL] = (ir->efep != FreeEnergyPerturbationType::No)
-                     && ir->fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Fep];
+            (inputrec.efep != FreeEnergyPerturbationType::No)
+            && inputrec.fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Restraint];
+    bEner_[F_DKDL] = (inputrec.efep != FreeEnergyPerturbationType::No)
+                     && inputrec.fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Mass];
+    bEner_[F_DVDL] = (inputrec.efep != FreeEnergyPerturbationType::No)
+                     && inputrec.fepvals->separate_dvdl[FreeEnergyPerturbationCouplingType::Fep];
 
     bEner_[F_CONSTR]   = false;
     bEner_[F_CONSTRNC] = false;
@@ -247,10 +247,10 @@ EnergyOutput::EnergyOutput(ener_file*               fp_ene,
     bEner_[F_COUL_SR] = true;
     bEner_[F_EPOT]    = true;
 
-    bEner_[F_DISPCORR]   = (ir->eDispCorr != DispersionCorrectionType::No);
+    bEner_[F_DISPCORR]   = (inputrec.eDispCorr != DispersionCorrectionType::No);
     bEner_[F_DISRESVIOL] = (gmx_mtop_ftype_count(mtop, F_DISRES) > 0);
     bEner_[F_ORIRESDEV]  = (gmx_mtop_ftype_count(mtop, F_ORIRES) > 0);
-    bEner_[F_COM_PULL]   = ((ir->bPull && pull_have_potential(*pull_work)) || ir->bRot);
+    bEner_[F_COM_PULL]   = ((inputrec.bPull && pull_have_potential(*pull_work)) || inputrec.bRot);
 
     MdModulesEnergyOutputToDensityFittingRequestChecker mdModulesAddOutputToDensityFittingFieldRequest;
     mdModulesNotifier.simulationSetupNotifications_.notify(&mdModulesAddOutputToDensityFittingFieldRequest);
@@ -269,16 +269,16 @@ EnergyOutput::EnergyOutput(ener_file*               fp_ene,
         }
     }
 
-    epc_            = isRerun ? PressureCoupling::No : ir->epc;
-    bDiagPres_      = !TRICLINIC(ir->ref_p) && !isRerun;
-    ref_p_          = (ir->ref_p[XX][XX] + ir->ref_p[YY][YY] + ir->ref_p[ZZ][ZZ]) / DIM;
-    bTricl_         = TRICLINIC(ir->compress) || TRICLINIC(ir->deform);
-    bDynBox_        = inputrecDynamicBox(ir);
-    etc_            = isRerun ? TemperatureCoupling::No : ir->etc;
-    bNHC_trotter_   = inputrecNvtTrotter(ir) && !isRerun;
-    bPrintNHChains_ = ir->bPrintNHChains && !isRerun;
-    bMTTK_          = (inputrecNptTrotter(ir) || inputrecNphTrotter(ir)) && !isRerun;
-    bMu_            = inputrecNeedMutot(ir);
+    epc_       = isRerun ? PressureCoupling::No : inputrec.epc;
+    bDiagPres_ = !TRICLINIC(inputrec.ref_p) && !isRerun;
+    ref_p_     = (inputrec.ref_p[XX][XX] + inputrec.ref_p[YY][YY] + inputrec.ref_p[ZZ][ZZ]) / DIM;
+    bTricl_    = TRICLINIC(inputrec.compress) || TRICLINIC(inputrec.deform);
+    bDynBox_   = inputrecDynamicBox(&inputrec);
+    etc_       = isRerun ? TemperatureCoupling::No : inputrec.etc;
+    bNHC_trotter_   = inputrecNvtTrotter(&inputrec) && !isRerun;
+    bPrintNHChains_ = inputrec.bPrintNHChains && !isRerun;
+    bMTTK_          = (inputrecNptTrotter(&inputrec) || inputrecNphTrotter(&inputrec)) && !isRerun;
+    bMu_            = inputrecNeedMutot(&inputrec);
     bPres_          = !isRerun;
 
     ebin_ = mk_ebin();
@@ -326,7 +326,7 @@ EnergyOutput::EnergyOutput(ener_file*               fp_ene,
     {
         imu_ = get_ebin_space(ebin_, asize(mu_nm), mu_nm, unit_dipole_D);
     }
-    if (ir->cos_accel != 0)
+    if (inputrec.cos_accel != 0)
     {
         ivcos_ = get_ebin_space(ebin_, asize(vcos_nm), vcos_nm, unit_vel);
         ivisc_ = get_ebin_space(ebin_, asize(visc_nm), visc_nm, unit_invvisc_SI);
@@ -406,7 +406,7 @@ EnergyOutput::EnergyOutput(ener_file*               fp_ene,
     }
 
     nTC_  = isRerun ? 0 : groups->groups[SimulationAtomGroupType::TemperatureCoupling].size();
-    nNHC_ = ir->opts.nhchainlength; /* shorthand for number of NH chains */
+    nNHC_ = inputrec.opts.nhchainlength; /* shorthand for number of NH chains */
     if (bMTTK_)
     {
         nTCP_ = 1; /* assume only one possible coupling system for barostat
@@ -535,31 +535,31 @@ EnergyOutput::EnergyOutput(ener_file*               fp_ene,
 
     /* check whether we're going to write dh histograms */
     dhc_ = nullptr;
-    if (ir->fepvals->separate_dhdl_file == SeparateDhdlFile::No)
+    if (inputrec.fepvals->separate_dhdl_file == SeparateDhdlFile::No)
     {
         /* Currently dh histograms are only written with dynamics */
-        if (EI_DYNAMICS(ir->eI))
+        if (EI_DYNAMICS(inputrec.eI))
         {
             snew(dhc_, 1);
 
-            mde_delta_h_coll_init(dhc_, ir);
+            mde_delta_h_coll_init(dhc_, inputrec);
         }
         fp_dhdl_ = nullptr;
-        snew(dE_, ir->fepvals->n_lambda);
+        snew(dE_, inputrec.fepvals->n_lambda);
     }
     else
     {
         fp_dhdl_ = fp_dhdl;
-        snew(dE_, ir->fepvals->n_lambda);
+        snew(dE_, inputrec.fepvals->n_lambda);
     }
-    if (ir->bSimTemp)
+    if (inputrec.bSimTemp)
     {
         int i;
-        snew(temperatures_, ir->fepvals->n_lambda);
-        numTemperatures_ = ir->fepvals->n_lambda;
-        for (i = 0; i < ir->fepvals->n_lambda; i++)
+        snew(temperatures_, inputrec.fepvals->n_lambda);
+        numTemperatures_ = inputrec.fepvals->n_lambda;
+        for (i = 0; i < inputrec.fepvals->n_lambda; i++)
         {
-            temperatures_[i] = ir->simtempvals->temperatures[i];
+            temperatures_[i] = inputrec.simtempvals->temperatures[i];
         }
     }
     else
@@ -567,9 +567,9 @@ EnergyOutput::EnergyOutput(ener_file*               fp_ene,
         numTemperatures_ = 0;
     }
 
-    if (EI_MD(ir->eI) && !simulationsShareState)
+    if (EI_MD(inputrec.eI) && !simulationsShareState)
     {
-        conservedEnergyTracker_ = std::make_unique<EnergyDriftTracker>(mtop->natoms);
+        conservedEnergyTracker_ = std::make_unique<EnergyDriftTracker>(mtop.natoms);
     }
 }
 
index d78919a559c27d94bd98f3ad4d5ce3bb954cb49d..8322e2dc1d1c5dd24b4c72cdaeaca35f52dd1817 100644 (file)
@@ -134,7 +134,7 @@ public:
      *
      * \param[in] fp_ene     Energy output file.
      * \param[in] mtop       Topology.
-     * \param[in] ir         Input parameters.
+     * \param[in] inputrec   Input parameters.
      * \param[in] pull_work  Pulling simulations data
      * \param[in] fp_dhdl    FEP file.
      * \param[in] isRerun    Is this is a rerun instead of the simulations.
@@ -143,8 +143,8 @@ public:
      * \param[in] mdModulesNotifier Notifications to MD modules.
      */
     EnergyOutput(ener_file*               fp_ene,
-                 const gmx_mtop_t*        mtop,
-                 const t_inputrec*        ir,
+                 const gmx_mtop_t&        mtop,
+                 const t_inputrec&        inputrec,
                  const pull_t*            pull_work,
                  FILE*                    fp_dhdl,
                  bool                     isRerun,
index f51603f8369cb697003aacd622d82a07c56341cc..1beddf1f98cb6ead6d90b9a8cde05b4cba1055c5 100644 (file)
@@ -380,23 +380,23 @@ static void mde_delta_h_handle_block(t_mde_delta_h* dh, t_enxblock* blk)
 }
 
 /* initialize the collection*/
-void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir)
+void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec& inputrec)
 {
     int       i, j, n;
     double*   lambda_vec;
-    int       ndhmax = ir->nstenergy / ir->nstcalcenergy;
-    t_lambda* fep    = ir->fepvals.get();
+    int       ndhmax = inputrec.nstenergy / inputrec.nstcalcenergy;
+    t_lambda* fep    = inputrec.fepvals.get();
 
-    dhc->temperature    = ir->opts.ref_t[0]; /* only store system temperature */
+    dhc->temperature    = inputrec.opts.ref_t[0]; /* only store system temperature */
     dhc->start_time     = 0.;
-    dhc->delta_time     = ir->delta_t * ir->fepvals->nstdhdl;
+    dhc->delta_time     = inputrec.delta_t * inputrec.fepvals->nstdhdl;
     dhc->start_time_set = FALSE;
 
     /* this is the compatibility lambda value. If it is >=0, it is valid,
        and there is either an old-style lambda or a slow growth simulation. */
-    dhc->start_lambda = ir->fepvals->init_lambda;
+    dhc->start_lambda = inputrec.fepvals->init_lambda;
     /* for continuous change of lambda values */
-    dhc->delta_lambda = ir->fepvals->delta_lambda * ir->fepvals->nstdhdl;
+    dhc->delta_lambda = inputrec.fepvals->delta_lambda * inputrec.fepvals->nstdhdl;
 
     if (dhc->start_lambda < 0)
     {
@@ -465,7 +465,7 @@ void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir)
         {
             for (auto i : keysOf(fep->separate_dvdl))
             {
-                if (ir->fepvals->separate_dvdl[i])
+                if (inputrec.fepvals->separate_dvdl[i])
                 {
                     dhc->ndh += 1;
                     dhc->ndhdl += 1;
@@ -473,25 +473,25 @@ void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir)
             }
         }
         /* add the lambdas */
-        dhc->nlambda = ir->fepvals->lambda_stop_n - ir->fepvals->lambda_start_n;
+        dhc->nlambda = inputrec.fepvals->lambda_stop_n - inputrec.fepvals->lambda_start_n;
         dhc->ndh += dhc->nlambda;
         /* another compatibility check */
         if (dhc->start_lambda < 0)
         {
             /* include one more for the specification of the state, by lambda or
                fep_state*/
-            if (ir->expandedvals->elmcmove > LambdaMoveCalculation::No)
+            if (inputrec.expandedvals->elmcmove > LambdaMoveCalculation::No)
             {
                 dhc->ndh += 1;
                 bExpanded = TRUE;
             }
             /* whether to print energies */
-            if (ir->fepvals->edHdLPrintEnergy != FreeEnergyPrintEnergy::No)
+            if (inputrec.fepvals->edHdLPrintEnergy != FreeEnergyPrintEnergy::No)
             {
                 dhc->ndh += 1;
                 bEnergy = TRUE;
             }
-            if (ir->epc > PressureCoupling::No)
+            if (inputrec.epc > PressureCoupling::No)
             {
                 dhc->ndh += 1; /* include pressure-volume work */
                 bPV = TRUE;
@@ -508,8 +508,8 @@ void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir)
         {
             dhc->dh_expanded = dhc->dh + n;
             mde_delta_h_init(dhc->dh + n,
-                             ir->fepvals->dh_hist_size,
-                             ir->fepvals->dh_hist_spacing,
+                             inputrec.fepvals->dh_hist_size,
+                             inputrec.fepvals->dh_hist_spacing,
                              ndhmax,
                              dhbtEXPANDED,
                              0,
@@ -520,8 +520,14 @@ void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir)
         if (bEnergy)
         {
             dhc->dh_energy = dhc->dh + n;
-            mde_delta_h_init(
-                    dhc->dh + n, ir->fepvals->dh_hist_size, ir->fepvals->dh_hist_spacing, ndhmax, dhbtEN, 0, 0, nullptr);
+            mde_delta_h_init(dhc->dh + n,
+                             inputrec.fepvals->dh_hist_size,
+                             inputrec.fepvals->dh_hist_spacing,
+                             ndhmax,
+                             dhbtEN,
+                             0,
+                             0,
+                             nullptr);
             n++;
         }
         /* add the dhdl's */
@@ -531,12 +537,12 @@ void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir)
             dhc->dh_dhdl = dhc->dh + n;
             for (auto i : keysOf(fep->separate_dvdl))
             {
-                if (ir->fepvals->separate_dvdl[i])
+                if (inputrec.fepvals->separate_dvdl[i])
                 {
                     /* we give it init_lambda for compatibility */
                     mde_delta_h_init(dhc->dh + n,
-                                     ir->fepvals->dh_hist_size,
-                                     ir->fepvals->dh_hist_spacing,
+                                     inputrec.fepvals->dh_hist_size,
+                                     inputrec.fepvals->dh_hist_spacing,
                                      ndhmax,
                                      dhbtDHDL,
                                      n_lambda_components,
@@ -560,7 +566,7 @@ void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir)
         /* add the lambdas */
         dhc->dh_du = dhc->dh + n;
         snew(lambda_vec, n_lambda_components);
-        for (i = ir->fepvals->lambda_start_n; i < ir->fepvals->lambda_stop_n; i++)
+        for (i = inputrec.fepvals->lambda_start_n; i < inputrec.fepvals->lambda_stop_n; i++)
         {
             int k = 0;
 
@@ -573,8 +579,8 @@ void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir)
             }
 
             mde_delta_h_init(dhc->dh + n,
-                             ir->fepvals->dh_hist_size,
-                             ir->fepvals->dh_hist_spacing,
+                             inputrec.fepvals->dh_hist_size,
+                             inputrec.fepvals->dh_hist_spacing,
                              ndhmax,
                              dhbtDH,
                              0,
@@ -586,8 +592,14 @@ void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir)
         if (bPV)
         {
             dhc->dh_pv = dhc->dh + n;
-            mde_delta_h_init(
-                    dhc->dh + n, ir->fepvals->dh_hist_size, ir->fepvals->dh_hist_spacing, ndhmax, dhbtPV, 0, 0, nullptr);
+            mde_delta_h_init(dhc->dh + n,
+                             inputrec.fepvals->dh_hist_size,
+                             inputrec.fepvals->dh_hist_spacing,
+                             ndhmax,
+                             dhbtPV,
+                             0,
+                             0,
+                             nullptr);
             n++;
         }
     }
index 7c852b7d3a945e30ddced140111bc5b2abd5e5df..8cc98920a56b2e8e5496d4743d8cb92288392801 100644 (file)
@@ -130,10 +130,10 @@ struct t_mde_delta_h_coll
 
 
 /* initialize a collection of delta h histograms/sets
-    dhc = the collection
-    ir = the input record */
+    dhc      = the collection
+    inputrec = the input record */
 
-void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec* ir);
+void mde_delta_h_coll_init(t_mde_delta_h_coll* dhc, const t_inputrec& inputrec);
 
 void done_mde_delta_h_coll(t_mde_delta_h_coll* dhc);
 
index 49417a41f5d695c8c65cdd113deefff529cbe30f..b82e610fe5b65b267554cdda622f70c7783a3ea1 100644 (file)
@@ -621,8 +621,8 @@ TEST_P(EnergyOutputTest, CheckOutput)
     MdModulesNotifier             mdModulesNotifier;
     std::unique_ptr<EnergyOutput> energyOutput =
             std::make_unique<EnergyOutput>(energyFile_,
-                                           &mtop_,
-                                           &inputrec_,
+                                           mtop_,
+                                           inputrec_,
                                            nullptr,
                                            nullptr,
                                            parameters.isRerun,
index 5a302d26276ad841c83e4dac0cf81853d1d3cf19..d35ff541aebde12b428aaecbb6fe50458654bec1 100644 (file)
@@ -324,8 +324,8 @@ void gmx::LegacySimulator::do_md()
                                    simulationsShareState,
                                    ms);
     gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
-                                   top_global,
-                                   ir,
+                                   *top_global,
+                                   *ir,
                                    pull_work,
                                    mdoutf_get_fp_dhdl(outf),
                                    false,
index c4feae9134c2ceb7c637cb58a2bd3ce27bc33a98..a55cb245d1c6dbe5d5f1af6a8c29e7e18aa12816 100644 (file)
@@ -255,8 +255,8 @@ void gmx::LegacySimulator::do_mimic()
                                    simulationsShareState,
                                    ms);
     gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
-                                   top_global,
-                                   ir,
+                                   *top_global,
+                                   *ir,
                                    pull_work,
                                    mdoutf_get_fp_dhdl(outf),
                                    true,
index c46bbec827592184c63ae2676dc71fe70ad8d464..71ea473d500390c3208bcf36a0e762021ff8f85b 100644 (file)
@@ -1250,8 +1250,8 @@ void LegacySimulator::do_cg()
                                    simulationsShareState,
                                    ms);
     gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
-                                   top_global,
-                                   inputrec,
+                                   *top_global,
+                                   *inputrec,
                                    pull_work,
                                    nullptr,
                                    false,
@@ -1967,8 +1967,8 @@ void LegacySimulator::do_lbfgs()
                                    simulationsShareState,
                                    ms);
     gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
-                                   top_global,
-                                   inputrec,
+                                   *top_global,
+                                   *inputrec,
                                    pull_work,
                                    nullptr,
                                    false,
@@ -2735,8 +2735,8 @@ void LegacySimulator::do_steep()
                                    simulationsShareState,
                                    ms);
     gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
-                                   top_global,
-                                   inputrec,
+                                   *top_global,
+                                   *inputrec,
                                    pull_work,
                                    nullptr,
                                    false,
index 2ef3a87e82234fa3dc6f2498d495d87999149844..a73f407dc72cacded5bba8bdef175c02ec7c15e9 100644 (file)
@@ -301,8 +301,8 @@ void gmx::LegacySimulator::do_rerun()
                                    simulationsShareState,
                                    ms);
     gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
-                                   top_global,
-                                   ir,
+                                   *top_global,
+                                   *ir,
                                    pull_work,
                                    mdoutf_get_fp_dhdl(outf),
                                    true,
index 49b53fade819076afb909790843580c5633d66b9..83e02e92f608518e66857dbe02b237d155023067 100644 (file)
@@ -168,8 +168,8 @@ void EnergyData::setup(gmx_mdoutf* outf)
 {
     pull_t* pull_work = nullptr;
     energyOutput_     = std::make_unique<EnergyOutput>(mdoutf_get_fp_ene(outf),
-                                                   top_global_,
-                                                   inputrec_,
+                                                   *top_global_,
+                                                   *inputrec_,
                                                    pull_work,
                                                    mdoutf_get_fp_dhdl(outf),
                                                    false,