Pair_style coul/dsf probably wrong self-term

Hello everybody,
I’ve been trying to re-implement the pair style coul/dsf for the last few days and came across that the implemented e_self term (if I understand it correctly) should either be incorrect or not present.
The original paper (Fennell, Christopher J., and J. Daniel Gezelter, The Journal of chemical physics 124.23 (2006): 234104.) does not mention that the self term at all. Furthermore, if the same expression for the self energy from Wolf, D., et al, The Journal of chemical physics 110.17 (1999): 8254-8282. should be used, it should be
E_self = -(erfc(alpha r_c)/2r_c + alpha/pi^(1/2)) sum_i q_i^2. (like in pair_coul_wolf)
But at the moment
E_self = -(erfc(alpha r_c)/r_c + + alpha/pi^1/2 * e^(-alpha^2 r_c^2) + alpha/pi^(1/2)) sum_i q_i^2
is implemented.
I am wondering if this is a bug by the author or if I am missing something. In the first case I would make a merge_request on Monday.
Greetings and have a nice weekend!

Hi griesserj,

let me take a closer look at the relevant equation and papers. It’s been a while since then.

For now, as far as I can recall, the difference in the self term in the DSF and in the Wolf comes from the formula for V_DSF (Eq. 18) vs V_Wolf (Eq. 3) in the original Fennel and Gezelter’s paper. There is an extra term due to the shifted force at cutoff (f_shift) that goes into e_shift in the source code of coul/dsf. Although the original Fennel and Gezelter’s paper did not mention the self-energy term explicitly in the DSF equation, the way it is derived from Wolf’s incorporating the erfc damping function in V_DSF, motivates the inclusion of the f_shift term in e_self. We have tested the Coulombic energies given by coul/dsf vs PPPM in certain cases (https://pubs.acs.org/doi/abs/10.1021/ct300718x).

Thanks,
-Trung

Hey Trung,
I read the original paper by Wolf again and you are right, the correction to e_self is correctly implemented for a force shifted interaction. Thank you very much for this clarification and your appended Paper.

Greetings,

Jan