Fixes issue with vsiten and verlet buffers.
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Sat, 30 Aug 2014 14:17:38 +0000 (16:17 +0200)
committerDavid van der Spoel <spoel@xray.bmc.uu.se>
Sat, 30 Aug 2014 14:17:38 +0000 (16:17 +0200)
A loop counter for a loop over vsiten did not take into
account that multiple entries make up one vsiten
particle. Part of #1579.

Change-Id: Ic9a79e89ea9ef8f9f529c9d4a6c5cf05f65e9c7d

src/kernel/calc_verletbuf.c

index b685d37a5177c9c6461b550fdc3d089dd308397d..64a79f753020fe105f857c9d359f385153a00a60 100644 (file)
@@ -268,6 +268,8 @@ static void get_vsite_masses(const gmx_moltype_t *moltype,
                             inv_mass += coeff*coeff/m_aj;
                         }
                         vsite_m[a1] = 1/inv_mass;
+                        /* Correct for loop increment of i */
+                        i += j - 1 - NRAL(ft);
                         break;
                     default:
                         /* Use the mass of the lightest constructing atom.