[Feature Request] Implement pair_modify rshift
Summary
This feature would allow to set a global parameter that would shift the computation of pair distances by a (small) positive amount (e.g. 1e-10) and thus would avoid divergences with overlapping particles. This would be useful for core-shell models (and would potentially make all supported pair styles compatible with it and no longer require /cs variants) or using potentials with a divergence at r=0 with fix adapt.
Detailed Description
This would add a new class member to pair.h, e.g. rshiftsq that would default to 0.0 and then is added to rsq before checking for the cutoff and computing forces and energies. It would require simple and straightforward changes to all (simple) pair styles. This can be done incrementally (and combined with other, equally simple, code optimizations).
Either the value of the zero shift needs to be provided or we could have a (unit style dependent) fixed setting (probably best derived from the value of angstrom).
Dear akohlmey, I'll be glad to work on this. Actually I'm implementing this feature by my side. It seems more complicate to build a working test case that could be compared with existing examples. For the moment I started from the examples/coreshell/in.coreshell : I'm trying to reproduce that data without the cs variant as suggested. Best