Merge release-4-6 into release-5-0
This merges commit
dced970, which changes many free-energy,
modifier and table-generation code paths, and its fix
349d8056.
That patch
349d8056 contains fixes to potential-shift and
potential-switch, as well as the shift/switch interactions
in combination with free energy. Since 5.0 has undergone
changes in the same areas (both nbnxn free energy, LJ-PME
and force-switch), this commit is a likely place for
bugs to have been introduced, so we keep it as a separate
commit.
Uncrustified the result of the merge.
Conflicts:
src/gmxlib/nonbonded/nb_free_energy.c
Resolved in favour of whichever branch seemed most right; changes from
dced970,
99aa704d and
5f59569a8 were all relevant here. We have
introduced some new LJ-PME-related variables so that code path is
reasonably similar to the coulomb path. We have also fixed a small
bug where the LJPME self-energy (i==j for verlet kernels) was not
multiplied by 0.5.
src/gromacs/gmxlib/nonbonded/nonbonded.c
Resolved as for
dced970
src/gromacs/gmxpreprocess/readir.c
Resolved as for
dced970
src/gromacs/mdlib/forcerec.c
Resolved from both branches
src/gromacs/mdlib/sim_util.c
Resolved from both branches, and from
349d8056
src/gromacs/mdlib/tables.c
Resolved from both branches, and added a few lines of code
to make LJ-PME work with shift modifiers.
As noted above, to avoid breaking the 5.0 branch, we have
manually added the changes corresponding to
349d8056 to make
sure force-switch (same as vdwtype=shift) results in correct
dispersion correction, and we have added a fix for the sign
of the LJPME grid c6 term in the generic nonbonded kernels.
This means
349d8056 should not be merged in again to 5.0 later.
Change-Id: Ida29b143a1bcb727ff38f9c63bf133bf749477b1