Fixed bug in free energy calculation for Morse potentials
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Sat, 30 Jun 2012 13:18:31 +0000 (15:18 +0200)
committerDavid van der Spoel <spoel@xray.bmc.uu.se>
Sat, 30 Jun 2012 13:19:29 +0000 (15:19 +0200)
Introduced recently when FEP was added to the Morse potential.

Change-Id: I90edfd13835637c872af31f2c7abf900ce8a8e5f

src/gmxlib/bondfree.c

index 789702a9ca51df7399bf6131f9e392b73c1e8f3f..0b1c6799d64db089064fb54753becd2caf70d2b3 100644 (file)
@@ -159,7 +159,7 @@ real morse_bonds(int nbonds,
     if (temp == one)
     {
         /* bonds are constrainted. This may _not_ include bond constraints if they are lambda dependent */
-        *dvdlambda = cbB-cbA;
+        *dvdlambda += cbB-cbA;
         continue;
     }