Unify constructor of nbnxn_atomdata_t
[alexxy/gromacs.git] / src / gromacs / nbnxm / benchmark / bench_setup.cpp
index 929625fc4151b02f5f11b4b5bdd61a706dc8c9f0..642818194676e3233a85c3d5f4400b7ea6a4b121 100644 (file)
@@ -200,21 +200,19 @@ static std::unique_ptr<nonbonded_verlet_t> setupNbnxmForBenchInstance(const Kern
     auto pairSearch = std::make_unique<PairSearch>(
             PbcType::Xyz, false, nullptr, nullptr, pairlistParams.pairlistType, false, numThreads, pinPolicy);
 
-    auto atomData = std::make_unique<nbnxn_atomdata_t>(pinPolicy);
+    auto atomData = std::make_unique<nbnxn_atomdata_t>(pinPolicy,
+                                                       gmx::MDLogger(),
+                                                       kernelSetup.kernelType,
+                                                       combinationRule,
+                                                       system.numAtomTypes,
+                                                       system.nonbondedParameters,
+                                                       1,
+                                                       numThreads);
 
     // Put everything together
     auto nbv = std::make_unique<nonbonded_verlet_t>(
             std::move(pairlistSets), std::move(pairSearch), std::move(atomData), kernelSetup, nullptr, nullptr);
 
-    nbnxn_atomdata_init(gmx::MDLogger(),
-                        nbv->nbat.get(),
-                        kernelSetup.kernelType,
-                        combinationRule,
-                        system.numAtomTypes,
-                        system.nonbondedParameters,
-                        1,
-                        numThreads);
-
     t_nrnb nrnb;
 
     GMX_RELEASE_ASSERT(!TRICLINIC(system.box), "Only rectangular unit-cells are supported here");