Unclarity on self-terms in Coulomb potential-shift and reaction-field
Summary
potential-shift for Coulomb doesn't appear to shift potentials correctly. Reaction-field electrostatics also are not properly switched (though that mechanism is different than potential shift)
GROMACS version
Reproduced in 2020.7 and on master branch - if I'm not mistaken about the nature of this bug (which is possible), it's been here a while
Steps to reproduce
I've provided a simple example - the topology describes two point charges of 1 and -1, with no LJ contribution. trajectory.pdb
walks one particle forward in space, traversing the relevant potential and force curve.
cutoff.mdp potential_shift.mdp
To reproduce one of these curves:
gmx grompp -f potential_shift.mdp -p topology.top -c structure.pdb -maxwarn 1 -o potential_shift.tpr
gmx mdrun -deffnm potential_shift -rerun trajectory.pdb
What is the current bug behavior?
Here's a close-up of the end of the potential curve for various parameter combos (cutoff is 1.2 nm)
Noting - forces look fine (attached here)
Lennard jones potentials also look fine, using a topology system with no charge and doing the same incremental distance scan
What did you expect the correct behavior to be?
- potential-shift should smoothly decay to 0, constantly shifted from the "cutoff" curve
- Reaction-field should also decay to 0
Possible fixes
(Any suggestions or thoughts are welcome. If you can, link to the line of code that might be responsible for the problem)