From 0336ab2d9dad7fe9db608620ad7b1ee146f70bce Mon Sep 17 00:00:00 2001 From: David van der Spoel Date: Sat, 30 Aug 2014 16:17:38 +0200 Subject: [PATCH] Fixes issue with vsiten and verlet buffers. 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kernel/calc_verletbuf.c b/src/kernel/calc_verletbuf.c index b685d37a51..64a79f7530 100644 --- a/src/kernel/calc_verletbuf.c +++ b/src/kernel/calc_verletbuf.c @@ -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. -- 2.22.0