I am wondering whether it is possible to calculate the electrostatic potential at the position of a given atom by finite difference, following the discussion a few days ago.
The reason is like follows:
When using pair_lj_cut_coul_cut, it is a success to calculate the electrostatic potential, V = decut/dq, by obtaining ecut when q = 0.9999, and 1.0 respectively, and then getting the result by (ecut(q=0.9999)-ecut(q=1.0))/(0.9999-1.0). I calculated this debut/dq under the circumstances when q = 0.9999,0.99999,0.999999, and the results match those by theory and my own code.
So I wonder whether this is possible when I use pair_lj_cut_coul_long. It has a damped short-range potential, coupled with long-range term obtained in k-space. By theory V = d(ecoul+elong)/dq should be likely to get.
Looking forward to your thoughts.