From 239fe4f4e359533215dd7c2c1815e53f85751686 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Mon, 16 Jun 2014 09:17:35 +0200 Subject: [PATCH] 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 --- src/gmxlib/bondfree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.22.0