Use const refs in init_nb_verlet
authorJoe Jordan <ejjordan12@gmail.com>
Fri, 19 Feb 2021 12:00:10 +0000 (12:00 +0000)
committerJoe Jordan <ejjordan12@gmail.com>
Fri, 19 Feb 2021 12:00:10 +0000 (12:00 +0000)
In addition to using more const refs instead of pointers
in some nbnmx setup code, names are made slightly more
verbose.

src/gromacs/mdrun/runner.cpp
src/gromacs/nbnxm/nbnxm.h
src/gromacs/nbnxm/nbnxm_setup.cpp
src/gromacs/nbnxm/pairlist_tuning.cpp
src/gromacs/nbnxm/pairlist_tuning.h

index 7e90c0a739d299a79bef89e025f133901d68cd09..f3bf5d4723bb2e5a04780cdef178a09a32e79de1 100644 (file)
@@ -1614,13 +1614,13 @@ int Mdrunner::mdrunner()
         }
 
         fr->nbv = Nbnxm::init_nb_verlet(mdlog,
-                                        inputrec.get(),
-                                        fr.get(),
+                                        *inputrec,
+                                        *fr,
                                         cr,
                                         *hwinfo_,
                                         runScheduleWork.simulationWork.useGpuNonbonded,
                                         deviceStreamManager.get(),
-                                        &mtop,
+                                        mtop,
                                         box,
                                         wcycle);
         // TODO: Move the logic below to a GPU bonded builder
index 960e6c2b395bfaa2856de78bc9f5c759d08a5843..7ea59e4e5a063c7dfd598df4c546b01415f10df1 100644 (file)
@@ -439,13 +439,13 @@ namespace Nbnxm
 
 /*! \brief Creates an Nbnxm object */
 std::unique_ptr<nonbonded_verlet_t> init_nb_verlet(const gmx::MDLogger& mdlog,
-                                                   const t_inputrec*    ir,
-                                                   const t_forcerec*    fr,
-                                                   const t_commrec*     cr,
+                                                   const t_inputrec&    inputrec,
+                                                   const t_forcerec&    forcerec,
+                                                   const t_commrec*     commrec,
                                                    const gmx_hw_info_t& hardwareInfo,
                                                    bool                 useGpuForNonbonded,
                                                    const gmx::DeviceStreamManager* deviceStreamManager,
-                                                   const gmx_mtop_t*               mtop,
+                                                   const gmx_mtop_t&               mtop,
                                                    matrix                          box,
                                                    gmx_wallcycle*                  wcycle);
 
index 89a4187719bb5d6e94236d409ae3c581f062cc0d..0cfaf9053bcb7dbf15997a745060850bf1960fec 100644 (file)
@@ -83,9 +83,9 @@ enum class NonbondedResource : int
  * If the return value is FALSE and fplog/cr != NULL, prints a fallback
  * message to fplog/stderr.
  */
-static gmx_bool nbnxn_simd_supported(const gmx::MDLogger& mdlog, const t_inputrec* ir)
+static bool nbnxn_simd_supported(const gmx::MDLogger& mdlog, const t_inputrec& inputrec)
 {
-    if (ir->vdwtype == evdwPME && ir->ljpme_combination_rule == eljpmeLB)
+    if (inputrec.vdwtype == evdwPME && inputrec.ljpme_combination_rule == eljpmeLB)
     {
         /* LJ PME with LB combination rule does 7 mesh operations.
          * This so slow that we don't compile SIMD non-bonded kernels
@@ -102,7 +102,7 @@ static gmx_bool nbnxn_simd_supported(const gmx::MDLogger& mdlog, const t_inputre
 }
 
 /*! \brief Returns the most suitable CPU kernel type and Ewald handling */
-static KernelSetup pick_nbnxn_kernel_cpu(const t_inputrec gmx_unused* ir,
+static KernelSetup pick_nbnxn_kernel_cpu(const t_inputrec gmx_unused& inputrec,
                                          const gmx_hw_info_t gmx_unused& hardwareInfo)
 {
     KernelSetup kernelSetup;
@@ -140,7 +140,7 @@ static KernelSetup pick_nbnxn_kernel_cpu(const t_inputrec gmx_unused* ir,
          */
         kernelSetup.kernelType = KernelType::Cpu4xN_Simd_4xN;
 
-        if (!GMX_SIMD_HAVE_FMA && (EEL_PME_EWALD(ir->coulombtype) || EVDW_PME(ir->vdwtype)))
+        if (!GMX_SIMD_HAVE_FMA && (EEL_PME_EWALD(inputrec.coulombtype) || EVDW_PME(inputrec.vdwtype)))
         {
             /* We have Ewald kernels without FMA (Intel Sandy/Ivy Bridge).
              * There are enough instructions to make 2x(4+4) efficient.
@@ -235,7 +235,7 @@ static KernelSetup pick_nbnxn_kernel(const gmx::MDLogger&     mdlog,
                                      gmx_bool                 use_simd_kernels,
                                      const gmx_hw_info_t&     hardwareInfo,
                                      const NonbondedResource& nonbondedResource,
-                                     const t_inputrec*        ir)
+                                     const t_inputrec&        inputrec)
 {
     KernelSetup kernelSetup;
 
@@ -253,9 +253,9 @@ static KernelSetup pick_nbnxn_kernel(const gmx::MDLogger&     mdlog,
     }
     else
     {
-        if (use_simd_kernels && nbnxn_simd_supported(mdlog, ir))
+        if (use_simd_kernels && nbnxn_simd_supported(mdlog, inputrec))
         {
-            kernelSetup = pick_nbnxn_kernel_cpu(ir, hardwareInfo);
+            kernelSetup = pick_nbnxn_kernel_cpu(inputrec, hardwareInfo);
         }
         else
         {
@@ -342,19 +342,19 @@ static int getMinimumIlistCountForGpuBalancing(NbnxmGpu* nbnxmGpu)
     }
 }
 
-static int getENbnxnInitCombRule(const t_forcerec* fr)
+static int getENbnxnInitCombRule(const t_forcerec& forcerec)
 {
-    if (fr->ic->vdwtype == evdwCUT
-        && (fr->ic->vdw_modifier == eintmodNONE || fr->ic->vdw_modifier == eintmodPOTSHIFT)
+    if (forcerec.ic->vdwtype == evdwCUT
+        && (forcerec.ic->vdw_modifier == eintmodNONE || forcerec.ic->vdw_modifier == eintmodPOTSHIFT)
         && getenv("GMX_NO_LJ_COMB_RULE") == nullptr)
     {
         /* Plain LJ cut-off: we can optimize with combination rules */
         return enbnxninitcombruleDETECT;
     }
-    else if (fr->ic->vdwtype == evdwPME)
+    else if (forcerec.ic->vdwtype == evdwPME)
     {
         /* LJ-PME: we need to use a combination rule for the grid */
-        if (fr->ljpme_combination_rule == eljpmeGEOM)
+        if (forcerec.ljpme_combination_rule == eljpmeGEOM)
         {
             return enbnxninitcombruleGEOM;
         }
@@ -371,13 +371,13 @@ static int getENbnxnInitCombRule(const t_forcerec* fr)
 }
 
 std::unique_ptr<nonbonded_verlet_t> init_nb_verlet(const gmx::MDLogger& mdlog,
-                                                   const t_inputrec*    ir,
-                                                   const t_forcerec*    fr,
-                                                   const t_commrec*     cr,
+                                                   const t_inputrec&    inputrec,
+                                                   const t_forcerec&    forcerec,
+                                                   const t_commrec*     commrec,
                                                    const gmx_hw_info_t& hardwareInfo,
-                                                   const bool           useGpuForNonbonded,
+                                                   bool                 useGpuForNonbonded,
                                                    const gmx::DeviceStreamManager* deviceStreamManager,
-                                                   const gmx_mtop_t*               mtop,
+                                                   const gmx_mtop_t&               mtop,
                                                    matrix                          box,
                                                    gmx_wallcycle*                  wcycle)
 {
@@ -400,25 +400,26 @@ std::unique_ptr<nonbonded_verlet_t> init_nb_verlet(const gmx::MDLogger& mdlog,
         nonbondedResource = NonbondedResource::Cpu;
     }
 
-    Nbnxm::KernelSetup kernelSetup =
-            pick_nbnxn_kernel(mdlog, fr->use_simd_kernels, hardwareInfo, nonbondedResource, ir);
+    Nbnxm::KernelSetup kernelSetup = pick_nbnxn_kernel(
+            mdlog, forcerec.use_simd_kernels, hardwareInfo, nonbondedResource, inputrec);
 
-    const bool haveMultipleDomains = havePPDomainDecomposition(cr);
+    const bool haveMultipleDomains = havePPDomainDecomposition(commrec);
 
-    bool           bFEP_NonBonded = (fr->efep != efepNO) && haveFepPerturbedNBInteractions(*mtop);
-    PairlistParams pairlistParams(kernelSetup.kernelType, bFEP_NonBonded, ir->rlist, haveMultipleDomains);
+    bool bFEP_NonBonded = (forcerec.efep != efepNO) && haveFepPerturbedNBInteractions(mtop);
+    PairlistParams pairlistParams(
+            kernelSetup.kernelType, bFEP_NonBonded, inputrec.rlist, haveMultipleDomains);
 
-    setupDynamicPairlistPruning(mdlog, ir, mtop, box, fr->ic, &pairlistParams);
+    setupDynamicPairlistPruning(mdlog, inputrec, mtop, box, *forcerec.ic, &pairlistParams);
 
-    const int enbnxninitcombrule = getENbnxnInitCombRule(fr);
+    const int enbnxninitcombrule = getENbnxnInitCombRule(forcerec);
 
     auto pinPolicy = (useGpuForNonbonded ? gmx::PinningPolicy::PinnedIfSupported
                                          : gmx::PinningPolicy::CannotBePinned);
 
     auto nbat = std::make_unique<nbnxn_atomdata_t>(pinPolicy);
 
-    int mimimumNumEnergyGroupNonbonded = ir->opts.ngener;
-    if (ir->opts.ngener - ir->nwall == 1)
+    int mimimumNumEnergyGroupNonbonded = inputrec.opts.ngener;
+    if (inputrec.opts.ngener - inputrec.nwall == 1)
     {
         /* We have only one non-wall energy group, we do not need energy group
          * support in the non-bondeds kernels, since all non-bonded energy
@@ -430,8 +431,8 @@ std::unique_ptr<nonbonded_verlet_t> init_nb_verlet(const gmx::MDLogger& mdlog,
                         nbat.get(),
                         kernelSetup.kernelType,
                         enbnxninitcombrule,
-                        fr->ntype,
-                        fr->nbfp,
+                        forcerec.ntype,
+                        forcerec.nbfp,
                         mimimumNumEnergyGroupNonbonded,
                         (useGpuForNonbonded || emulateGpu) ? 1 : gmx_omp_nthreads_get(emntNonbonded));
 
@@ -444,7 +445,8 @@ std::unique_ptr<nonbonded_verlet_t> init_nb_verlet(const gmx::MDLogger& mdlog,
         GMX_RELEASE_ASSERT(
                 (deviceStreamManager != nullptr),
                 "Device stream manager should be initialized in order to use GPU for non-bonded.");
-        gpu_nbv = gpu_init(*deviceStreamManager, fr->ic, pairlistParams, nbat.get(), haveMultipleDomains);
+        gpu_nbv = gpu_init(
+                *deviceStreamManager, forcerec.ic, pairlistParams, nbat.get(), haveMultipleDomains);
 
         minimumIlistCountForGpuBalancing = getMinimumIlistCountForGpuBalancing(gpu_nbv);
     }
@@ -452,14 +454,15 @@ std::unique_ptr<nonbonded_verlet_t> init_nb_verlet(const gmx::MDLogger& mdlog,
     auto pairlistSets = std::make_unique<PairlistSets>(
             pairlistParams, haveMultipleDomains, minimumIlistCountForGpuBalancing);
 
-    auto pairSearch = std::make_unique<PairSearch>(ir->pbcType,
-                                                   EI_TPI(ir->eI),
-                                                   DOMAINDECOMP(cr) ? &cr->dd->numCells : nullptr,
-                                                   DOMAINDECOMP(cr) ? domdec_zones(cr->dd) : nullptr,
-                                                   pairlistParams.pairlistType,
-                                                   bFEP_NonBonded,
-                                                   gmx_omp_nthreads_get(emntPairsearch),
-                                                   pinPolicy);
+    auto pairSearch =
+            std::make_unique<PairSearch>(inputrec.pbcType,
+                                         EI_TPI(inputrec.eI),
+                                         DOMAINDECOMP(commrec) ? &commrec->dd->numCells : nullptr,
+                                         DOMAINDECOMP(commrec) ? domdec_zones(commrec->dd) : nullptr,
+                                         pairlistParams.pairlistType,
+                                         bFEP_NonBonded,
+                                         gmx_omp_nthreads_get(emntPairsearch),
+                                         pinPolicy);
 
     return std::make_unique<nonbonded_verlet_t>(
             std::move(pairlistSets), std::move(pairSearch), std::move(nbat), kernelSetup, gpu_nbv, wcycle);
index ac00b1cd766296a52615acc42fb70efd40f67521..b2ffe801d25fde6e9991261d9b483dc788d5dbad 100644 (file)
@@ -383,42 +383,43 @@ static const int c_nbnxnDynamicListPruningMinLifetime = 4;
 
 /*! \brief Set the dynamic pairlist pruning parameters in \p ic
  *
- * \param[in]     ir          The input parameter record
+ * \param[in]     inputrec          The input parameter record
  * \param[in]     mtop        The global topology
  * \param[in]     box         The unit cell
  * \param[in]     useGpuList  Tells if we are using a GPU type pairlist
  * \param[in]     listSetup   The nbnxn pair list setup
  * \param[in]     userSetNstlistPrune  The user set ic->nstlistPrune (using an env.var.)
- * \param[in] ic              The nonbonded interactions constants
+ * \param[in]     interactionConst              The nonbonded interactions constants
  * \param[in,out] listParams  The list setup parameters
  */
-static void setDynamicPairlistPruningParameters(const t_inputrec*          ir,
-                                                const gmx_mtop_t*          mtop,
+static void setDynamicPairlistPruningParameters(const t_inputrec&          inputrec,
+                                                const gmx_mtop_t&          mtop,
                                                 const matrix               box,
                                                 const bool                 useGpuList,
                                                 const VerletbufListSetup&  listSetup,
                                                 const bool                 userSetNstlistPrune,
-                                                const interaction_const_t* ic,
+                                                const interaction_const_t& interactionConst,
                                                 PairlistParams*            listParams)
 {
     /* When applying multiple time stepping to the non-bonded forces,
      * we only compute them every mtsFactor steps, so all parameters here
      * should be a multiple of mtsFactor.
      */
-    listParams->mtsFactor = gmx::nonbondedMtsFactor(*ir);
+    listParams->mtsFactor = gmx::nonbondedMtsFactor(inputrec);
 
     const int mtsFactor = listParams->mtsFactor;
 
-    GMX_RELEASE_ASSERT(ir->nstlist % mtsFactor == 0, "nstlist should be a multiple of mtsFactor");
+    GMX_RELEASE_ASSERT(inputrec.nstlist % mtsFactor == 0,
+                       "nstlist should be a multiple of mtsFactor");
 
-    listParams->lifetime = ir->nstlist - mtsFactor;
+    listParams->lifetime = inputrec.nstlist - mtsFactor;
 
     /* When nstlistPrune was set by the user, we need to execute one loop
      * iteration to determine rlistInner.
      * Otherwise we compute rlistInner and increase nstlist as long as
      * we have a pairlist buffer of length 0 (i.e. rlistInner == cutoff).
      */
-    const real interactionCutoff = std::max(ic->rcoulomb, ic->rvdw);
+    const real interactionCutoff = std::max(interactionConst.rcoulomb, interactionConst.rvdw);
     int        tunedNstlistPrune = listParams->nstlistPrune;
     do
     {
@@ -429,14 +430,14 @@ static void setDynamicPairlistPruningParameters(const t_inputrec*          ir,
         int listLifetime         = tunedNstlistPrune - (useGpuList ? 0 : mtsFactor);
         listParams->nstlistPrune = tunedNstlistPrune;
         listParams->rlistInner   = calcVerletBufferSize(
-                *mtop, det(box), *ir, tunedNstlistPrune, listLifetime, -1, listSetup);
+                mtop, det(box), inputrec, tunedNstlistPrune, listLifetime, -1, listSetup);
 
         /* On the GPU we apply the dynamic pruning in a rolling fashion
          * every c_nbnxnGpuRollingListPruningInterval steps,
          * so keep nstlistPrune a multiple of the interval.
          */
         tunedNstlistPrune += (useGpuList ? c_nbnxnGpuRollingListPruningInterval : 1) * mtsFactor;
-    } while (!userSetNstlistPrune && tunedNstlistPrune < ir->nstlist
+    } while (!userSetNstlistPrune && tunedNstlistPrune < inputrec.nstlist
              && listParams->rlistInner == interactionCutoff);
 
     if (userSetNstlistPrune)
@@ -446,7 +447,7 @@ static void setDynamicPairlistPruningParameters(const t_inputrec*          ir,
     else
     {
         /* Determine the pair list size increase due to zero interactions */
-        real rlistInc = nbnxn_get_rlist_effective_inc(listSetup.cluster_size_j, mtop->natoms / det(box));
+        real rlistInc = nbnxn_get_rlist_effective_inc(listSetup.cluster_size_j, mtop.natoms / det(box));
 
         /* Dynamic pruning is only useful when the inner list is smaller than
          * the outer. The factor 0.99 ensures at least 3% list size reduction.
@@ -501,10 +502,10 @@ static std::string formatListSetup(const std::string& listName,
 }
 
 void setupDynamicPairlistPruning(const gmx::MDLogger&       mdlog,
-                                 const t_inputrec*          ir,
-                                 const gmx_mtop_t*          mtop,
+                                 const t_inputrec&          inputrec,
+                                 const gmx_mtop_t&          mtop,
                                  matrix                     box,
-                                 const interaction_const_t* ic,
+                                 const interaction_const_t& interactionConst,
                                  PairlistParams*            listParams)
 {
     GMX_RELEASE_ASSERT(listParams->rlistOuter > 0, "With the nbnxn setup rlist should be > 0");
@@ -518,7 +519,7 @@ void setupDynamicPairlistPruning(const gmx::MDLogger&       mdlog,
     /* Currently emulation mode does not support dual pair-lists */
     const bool useGpuList = sc_isGpuPairListType[listParams->pairlistType];
 
-    if (supportsDynamicPairlistGenerationInterval(*ir) && getenv("GMX_DISABLE_DYNAMICPRUNING") == nullptr)
+    if (supportsDynamicPairlistGenerationInterval(inputrec) && getenv("GMX_DISABLE_DYNAMICPRUNING") == nullptr)
     {
         /* Note that nstlistPrune can have any value independently of nstlist.
          * Actually applying rolling pruning is only useful when
@@ -532,7 +533,7 @@ void setupDynamicPairlistPruning(const gmx::MDLogger&       mdlog,
             char* end                = nullptr;
             listParams->nstlistPrune = strtol(env, &end, 10);
             if (!end || (*end != 0)
-                || !(listParams->nstlistPrune > 0 && listParams->nstlistPrune < ir->nstlist))
+                || !(listParams->nstlistPrune > 0 && listParams->nstlistPrune < inputrec.nstlist))
             {
                 gmx_fatal(FARGS,
                           "Invalid value passed in GMX_NSTLIST_DYNAMICPRUNING=%s, should be > 0 "
@@ -552,7 +553,7 @@ void setupDynamicPairlistPruning(const gmx::MDLogger&       mdlog,
         }
 
         setDynamicPairlistPruningParameters(
-                ir, mtop, box, useGpuList, ls, userSetNstlistPrune, ic, listParams);
+                inputrec, mtop, box, useGpuList, ls, userSetNstlistPrune, interactionConst, listParams);
 
         if (listParams->useDynamicPruning && useGpuList)
         {
@@ -576,7 +577,7 @@ void setupDynamicPairlistPruning(const gmx::MDLogger&       mdlog,
 
     std::string mesg;
 
-    const real interactionCutoff = std::max(ic->rcoulomb, ic->rvdw);
+    const real interactionCutoff = std::max(interactionConst.rcoulomb, interactionConst.rvdw);
     if (listParams->useDynamicPruning)
     {
         mesg += gmx::formatString(
@@ -584,40 +585,43 @@ void setupDynamicPairlistPruning(const gmx::MDLogger&       mdlog,
                 ls.cluster_size_i,
                 ls.cluster_size_j,
                 listParams->numRollingPruningParts > 1 ? ", rolling" : "");
-        mesg += formatListSetup("outer", ir->nstlist, ir->nstlist, listParams->rlistOuter, interactionCutoff);
         mesg += formatListSetup(
-                "inner", listParams->nstlistPrune, ir->nstlist, listParams->rlistInner, interactionCutoff);
+                "outer", inputrec.nstlist, inputrec.nstlist, listParams->rlistOuter, interactionCutoff);
+        mesg += formatListSetup(
+                "inner", listParams->nstlistPrune, inputrec.nstlist, listParams->rlistInner, interactionCutoff);
     }
     else
     {
         mesg += gmx::formatString("Using a %dx%d pair-list setup:\n", ls.cluster_size_i, ls.cluster_size_j);
-        mesg += formatListSetup("", ir->nstlist, ir->nstlist, listParams->rlistOuter, interactionCutoff);
+        mesg += formatListSetup(
+                "", inputrec.nstlist, inputrec.nstlist, listParams->rlistOuter, interactionCutoff);
     }
-    if (supportsDynamicPairlistGenerationInterval(*ir))
+    if (supportsDynamicPairlistGenerationInterval(inputrec))
     {
         const VerletbufListSetup listSetup1x1 = { 1, 1 };
         const real               rlistOuter   = calcVerletBufferSize(
-                *mtop, det(box), *ir, ir->nstlist, ir->nstlist - 1, -1, listSetup1x1);
+                mtop, det(box), inputrec, inputrec.nstlist, inputrec.nstlist - 1, -1, listSetup1x1);
         real rlistInner = rlistOuter;
         if (listParams->useDynamicPruning)
         {
             int listLifeTime = listParams->nstlistPrune - (useGpuList ? 0 : 1);
             rlistInner       = calcVerletBufferSize(
-                    *mtop, det(box), *ir, listParams->nstlistPrune, listLifeTime, -1, listSetup1x1);
+                    mtop, det(box), inputrec, listParams->nstlistPrune, listLifeTime, -1, listSetup1x1);
         }
 
         mesg += gmx::formatString(
                 "At tolerance %g kJ/mol/ps per atom, equivalent classical 1x1 list would be:\n",
-                ir->verletbuf_tol);
+                inputrec.verletbuf_tol);
         if (listParams->useDynamicPruning)
         {
-            mesg += formatListSetup("outer", ir->nstlist, ir->nstlist, rlistOuter, interactionCutoff);
             mesg += formatListSetup(
-                    "inner", listParams->nstlistPrune, ir->nstlist, rlistInner, interactionCutoff);
+                    "outer", inputrec.nstlist, inputrec.nstlist, rlistOuter, interactionCutoff);
+            mesg += formatListSetup(
+                    "inner", listParams->nstlistPrune, inputrec.nstlist, rlistInner, interactionCutoff);
         }
         else
         {
-            mesg += formatListSetup("", ir->nstlist, ir->nstlist, rlistOuter, interactionCutoff);
+            mesg += formatListSetup("", inputrec.nstlist, inputrec.nstlist, rlistOuter, interactionCutoff);
         }
     }
 
index 88a550a1a18f2ed3bfac899cfbdffb0d091a40eb..4e9a66dc26c6b7b22e442359facce559439a5e25 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2017,2019, by the GROMACS development team, led by
+ * Copyright (c) 2017,2019,2021, 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.
@@ -85,17 +85,17 @@ void increaseNstlist(FILE*               fplog,
 /*! \brief Set up the dynamic pairlist pruning
  *
  * \param[in,out] mdlog            MD logger
- * \param[in]     ir               The input parameter record
+ * \param[in]     inputrec         The input parameter record
  * \param[in]     mtop             The global topology
  * \param[in]     box              The unit cell
- * \param[in]     ic               The nonbonded interactions constants
+ * \param[in]     interactionConst The nonbonded interactions constants
  * \param[in,out] listParams       The list setup parameters
  */
 void setupDynamicPairlistPruning(const gmx::MDLogger&       mdlog,
-                                 const t_inputrec*          ir,
-                                 const gmx_mtop_t*          mtop,
+                                 const t_inputrec&          inputrec,
+                                 const gmx_mtop_t&          mtop,
                                  matrix                     box,
-                                 const interaction_const_t* ic,
+                                 const interaction_const_t& interactionConst,
                                  PairlistParams*            listParams);
 
 #endif /* NBNXM_PAIRLIST_TUNING_H */