Fixed bug in free energy calculation for Morse potentials
[alexxy/gromacs.git] / 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;
     }