Fix group-scheme bug with changing LJ parameters in FE
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 13 Oct 2014 10:12:40 +0000 (12:12 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 8 Dec 2014 21:11:50 +0000 (22:11 +0100)
commit77356f36a2845338c299ad7ef2e8b116512aee75
tree5e73375cf4a4559c9b5d52e0f5e918f9a4f580bd
parent540f3f43505e22c6160d2e46981b7dcbf3e9f021
Fix group-scheme bug with changing LJ parameters in FE

We don't optimize for the case when we have only changed one of charge
or type, so the other vector must always be valid even when it is not
changing. The logic of calling ewald_LRcorrection didn't do this
correctly, perhaps because the construction logic in md2atoms was
unclear.

Changed name, origin and logic for bFreeEnergy to
bHaveChargeOrTypePerturbed to better reflect the correct usage and
meaning. Avoided testing any pointers for NULL - we should use
explicit control-flow constructs.

Fixes #1596

Change-Id: I61172681048075d3022bd6c4b781c6c9153eeadd
src/gromacs/gmxlib/ewald_util.c
src/gromacs/legacyheaders/coulomb.h
src/gromacs/mdlib/force.c
src/gromacs/mdlib/mdatom.c