Turn SystemAtomIterator into proper iterator
[alexxy/gromacs.git] / src / gromacs / mdlib / shellfc.cpp
index 2b4793571524d7e70830d016331b49af8d6aff39..02e4c87c95f48aab58474cd22b40b8c473a7fcbb 100644 (file)
@@ -352,12 +352,11 @@ gmx_shellfc_t *init_shell_flexcon(FILE *fplog,
     /* Global system sized array, this should be avoided */
     snew(shell_index, mtop->natoms);
 
-    SystemAtomIterator aloop(*mtop);
     nshell = 0;
-    while (aloop.nextAtom())
+    for (const AtomProxy &atomP : AtomRange(*mtop))
     {
-        const t_atom &local = aloop.atom();
-        int           i     = aloop.globalAtomNumber();
+        const t_atom &local = atomP.atom();
+        int           i     = atomP.globalAtomNumber();
         if (local.ptype == eptShell)
         {
             shell_index[i] = nshell++;