Hello, everyone. I use LAMMPS to simulate a salt solution system. The whole system is electrically neutral and has three-dimensional periodic boundaries. I use Ewald algorithm to calculate the long-range electrostatic potential. Could I get the electric potential or electric field strength at any position in the system through the command in LAMMPS?

Not directly (at least not to my knowledge).

You can get the electrostatic potential at the location of individual atoms via rerun where you turn off all other interactions and then compute pe/atom.

For computing it at any point you would have to introduce a (charged) probe particle and compute the electrostatic potential at its location.

An alternate approach could be adding an interface to a tool/library like APBS to LAMMPS.

Thanks for your reply! As far as I know, because a single atom is not electrically neutral, it is impossible to obtain its accurate potential value when considering long-range electrostatic force, or is there any other method?

You can make that probe charge as small as you want.

I already had told you that you could introduce a Poisson-Boltzmann solver like the ABPS library. This is what VMD does, for example. Of course, that would require some significant programming (but at least the PB solver is already done).

Thanks a lot！

I’m very far behind in bringing this up to date for LAMMPS 23Jun2022, but you can try my package (GitHub - srtee/lammps-USER-CONP2: updated constant potential plugin for LAMMPS) which has a `compute potential/atom`

implementation. Get in touch if you’d like to give that a go. I’m currently working on bringing this functionality (with documentation!) to the ELECTRODE package, but it will take a while to get that into the official code.

On the other hand, I’m not sure what the local electric potential will do for you in a fully 3D periodic simulation of a salt solution (it’s more useful in confined simulations, where the walls / electrodes serve as fixed reference points imposing boundary conditions on the potential).

It’s usually more straightforward to understand bulk structure in terms of RDFs, scattering factors, ADFs, and the like, which are easier both to compute and to communicate.