Allow bonds with distance=0
authorBerk Hess <hess@kth.se>
Wed, 7 Feb 2018 12:15:19 +0000 (13:15 +0100)
committerBerk Hess <hess@kth.se>
Thu, 8 Feb 2018 09:25:30 +0000 (10:25 +0100)
commit58e265e7d88ffb580e11718e2fa8f06a4589efbf
tree2f2f8e553fc2e58d57d2d9e921bcc88ff219bdb7
parentdf419900bfc9ab55dd5bff2300f97557fefc441d
Allow bonds with distance=0

We should allow overlapping atoms in harmonic bonds. But the code
would cause a floating point exception and incorrect free-energy
derivatives.
Note that using sqrt(x) instead of x*invsqrt(x) is faster on Intel.

Change-Id: I87dd1e84f8f526ac40e482bccc94d89e33a1d112
src/gromacs/listed-forces/bonded.cpp