fix check_assign_interactions_atom()
authorGilles Gouaillardet <gilles@rist.or.jp>
Fri, 21 Aug 2020 02:17:35 +0000 (11:17 +0900)
committerPaul Bauer <paul.bauer.q@gmail.com>
Wed, 26 Aug 2020 07:51:06 +0000 (07:51 +0000)
fix a bug introduced in gromacs/gromacs@c507ae4d3f4b0d516e53896dac35a52911a8a44b

Thanks Berk Hess for the guidance to the right fix

Refs. gromacs/gromacs#3635

src/gromacs/domdec/domdec_topology.cpp

index fe4f8c82ee82a9e53ba9bd4cf05cadd865f0d595..59815003f13adb6376e5c5adac4cb2fe9f0863b1 100644 (file)
@@ -1088,7 +1088,6 @@ static inline void check_assign_interactions_atom(int                       i,
             {
                 add_vsite(*dd->ga2la, index, rtil, ftype, nral, TRUE, i, i_gl, i_mol, iatoms.data(), idef);
             }
-            j += 1 + nral + 2;
         }
         else
         {
@@ -1248,8 +1247,8 @@ static inline void check_assign_interactions_atom(int                       i,
                     (*nbonded_local)++;
                 }
             }
-            j += 1 + nral;
         }
+        j += 1 + nral_rt(ftype);
     }
 }