## Bug #1527

Updated by Mark Abraham over 6 years ago

Commit commit:b8440aeb b8440aeb incorrectly change the sign of the kinetic contribution to dH/dl. The commit message says:

in update.c, in calc_ke_part_normal and calc_ke_part_visc

* sign error in mass change; if mass B is greater than mass A, then the

change in free energy is positive, not negative.

This is incorrect, if massB is greater the free-energy change is negative. The kinetic contribution is obtained from the derivative of p^2/(2*mass(lambda) which has the opposite sign.

The fix is only a sign change (plus a comment explaining this tricky sign issue).

Since mass contributions vanish is a thermodynamic cycle, I don't know if we should fix this for 4.6.6 or for 5.0.

in update.c, in calc_ke_part_normal and calc_ke_part_visc

* sign error in mass change; if mass B is greater than mass A, then the

change in free energy is positive, not negative.

This is incorrect, if massB is greater the free-energy change is negative. The kinetic contribution is obtained from the derivative of p^2/(2*mass(lambda) which has the opposite sign.

The fix is only a sign change (plus a comment explaining this tricky sign issue).

Since mass contributions vanish is a thermodynamic cycle, I don't know if we should fix this for 4.6.6 or for 5.0.