Modernize atom enums
[alexxy/gromacs.git] / src / gromacs / topology / mtop_util.cpp
index b159337037222ff73f40be6d1fa20d5dd10e6e27..add097ca32eaab29a21a5a44a30299f4e8fba9f2 100644 (file)
@@ -353,9 +353,9 @@ int gmx_mtop_interaction_count(const gmx_mtop_t& mtop, const int unsigned if_fla
     return n;
 }
 
-std::array<int, eptNR> gmx_mtop_particletype_count(const gmx_mtop_t& mtop)
+gmx::EnumerationArray<ParticleType, int> gmx_mtop_particletype_count(const gmx_mtop_t& mtop)
 {
-    std::array<int, eptNR> count = { { 0 } };
+    gmx::EnumerationArray<ParticleType, int> count = { { 0 } };
 
     for (const auto& molblock : mtop.molblock)
     {
@@ -1004,7 +1004,7 @@ std::vector<int> get_atom_index(const gmx_mtop_t* mtop)
     {
         const t_atom& local = atomP.atom();
         int           index = atomP.globalAtomNumber();
-        if (local.ptype == eptAtom)
+        if (local.ptype == ParticleType::Atom)
         {
             atom_index.push_back(index);
         }