Unify constructor of nbnxn_atomdata_t
[alexxy/gromacs.git] / api / nblib / gmxsetup.cpp
index 955b8cc1db35d10a50f875b18aba964ae7051798..3baa358e98d0fbe5393606240f53b8f6ec031bf5 100644 (file)
@@ -192,17 +192,14 @@ void NbvSetupUtil::setupNbnxmInstance(const size_t numParticleTypes, const NBKer
     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);
-
-    // Needs to be called with the number of unique ParticleTypes
-    nbnxn_atomdata_init(gmx::MDLogger(),
-                        atomData.get(),
-                        kernelSetup.kernelType,
-                        combinationRule,
-                        numParticleTypes,
-                        nonbondedParameters_,
-                        1,
-                        numThreads);
+    auto atomData = std::make_unique<nbnxn_atomdata_t>(pinPolicy,
+                                                       gmx::MDLogger(),
+                                                       kernelSetup.kernelType,
+                                                       combinationRule,
+                                                       numParticleTypes,
+                                                       nonbondedParameters_,
+                                                       1,
+                                                       numThreads);
 
     // Put everything together
     auto nbv = std::make_unique<nonbonded_verlet_t>(