Fix value of Ewald shift
commit3f970c00ffaf60b47c140003e72f941b429d275b
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 20 Jul 2017 07:16:37 +0000 (20 09:16 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 15 Aug 2017 11:27:31 +0000 (15 13:27 +0200)
tree878881c0584d59026bac6e38cb9edaf4e2a1e85d
parent9c8874153cc3b2c5741074f274596db5b41b2caf
Fix value of Ewald shift

In all the short-ranged kernel flavours, sh_ewald is subtracted from
rinv, which have inconsistent dimensions. Fortunately, rcutoff is
often close to 1, and the inconsistent shifts often cancel in
practice, and energy differences computed on neighbour lists of the
same size will have the error cancel. The difference doesn't even
show up in the regressiontests, but would if we had a unit test
of a single interaction.

Fixes #2215

Change-Id: Ia2ea57f3bd9d521879783b207353d9d6f4ccb4a8
src/gromacs/ewald/pme-load-balancing.cpp
src/gromacs/mdlib/forcerec.cpp