From: Berk Hess Date: Mon, 24 Nov 2014 14:36:13 +0000 (+0100) Subject: Fixed twin-range + freeze + constraints X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=405cc128e748b0bae802262953df742abf955139;p=alexxy%2Fgromacs.git Fixed twin-range + freeze + constraints With twin-range cut-offs, atoms which are both frozen and constrained would experience very large or NaN forces, leading to constraint warnings and errors. Fixes #1639. Change-Id: I1871a87054fec1149c9ed75872451df79a8ac2d2 --- diff --git a/src/gromacs/mdlib/update.c b/src/gromacs/mdlib/update.c index 93b7f59c1e..c4bdfe3892 100644 --- a/src/gromacs/mdlib/update.c +++ b/src/gromacs/mdlib/update.c @@ -1515,6 +1515,10 @@ static void combine_forces(gmx_update_t upd, { xp[i][d] = state->x[i][d] + fac*f_lr[i][d]*md->invmass[i]; } + else + { + xp[i][d] = state->x[i][d]; + } } } constrain(NULL, FALSE, FALSE, constr, idef, ir, NULL, cr, step, 0, 1.0, md,