From: Berk Hess Date: Mon, 16 Jun 2014 07:17:35 +0000 (+0200) Subject: Fixed sign error in posres dvdl X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=239fe4f4e359533215dd7c2c1815e53f85751686;p=alexxy%2Fgromacs.git Fixed sign error in posres dvdl For position restraints the sign of the contribution of the change in reference location was incorrect. Note that the contribution of the change in force constant was and is correct. Fixes #1408. Change-Id: I75210c3855d13fdd58e0a698d6c5d7c7116f456b --- diff --git a/src/gmxlib/bondfree.c b/src/gmxlib/bondfree.c index 2c25351ec2..e9f68b3c10 100644 --- a/src/gmxlib/bondfree.c +++ b/src/gmxlib/bondfree.c @@ -2297,7 +2297,7 @@ real posres(int nbonds, vtot += 0.5*kk*dx[m]*dx[m]; *dvdlambda += 0.5*(pr->posres.fcB[m] - pr->posres.fcA[m])*dx[m]*dx[m] - -fm*dpdl[m]; + + fm*dpdl[m]; /* Here we correct for the pbc_dx which included rdist */ if (bForceValid)