The possibility of finite difference application for electrostatic potential calculation

Hello list,

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.

Best,

Andrew

Hello list,

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.

i don't quite understand what "theory" you are referring to below.
also it is not clear what "ecut" refers do and in general what the
benefit of using finite differences would be. in any case, this is a
problem on your "side" and you can easily test it by setting up test
systems and computing pe/atom from LAMMPS and compare the results to
your FD method.

axel.