Dear all LAMMPS users,

I learned from LAMMPS manual that :

The methodology behind the kspace_modify *slab* option is explained in the paper by Yeh and Berkowitz, J Chem Phys, 111, 3155 (1999). https://aip.scitation.org/doi/10.1063/1.479595

and the current LAMMPS only supports the tinfoil boundary conditions.

Note that the long-range electrostatic solvers in LAMMPS assume conducting metal (tinfoil) boundary conditions for both charge and dipole interactions. Vacuum boundary conditions are not currently supported.

I noticed that in Eq. (3) of that JCP paper, the term J(M,S) vanishes for the tinfoil boundary conditions.

I roughly read the source code regarding the kspace_modify slab. It seems Eqs. (10, 11, 12) in Yeh and Berkowitz’s JCP paper are used to correct the calculation of long-range Coulombic interactions for slab geometry. I am afraid that Eqs. (10, 11, 12) only work for the vacuum boundary conditions.

Thus my question is, why kspace_modify slab does this kind of correction since this term vanishes for an infinite dielectric constant of the surrounding medium? Is it an inappropriate correction?

Any discussion on this is welcome.

Thanks in advance.

Fengchao Wang

Equation 3 and surrounding discussion in that JCP paper you reference is for fully periodic 3D systems, not for slab based systems. When you move to a slab based system, you need the correction term in Equation 10 because you are still using a 3D Ewald sum, not a true 2D Ewald sum and that term is a first order parallel plate capacitor correction to cancel out unwanted slab-slab interactions . Using a true 2D Ewald sum is very expensive, so it is convenient to use a 3D Ewald sum with the correction factor. This is what the paper says:

“The planewise sum combined with a sufficient empty space in z direction enables us effectively utilize the parallel plate capacitor approximation to eliminate contributions from image cells in z direction which are unwanted in 2DP systems. Therefore, we can use the regular EW3D method but with the correction term given by the Eq. 12 to calculate long-range Coulombic forces for systems which are periodic in two dimensions and are finite in the third.”

Stan

To put it more clearly, I would change the wording in the paper to:

we can use the regular EW3D method **with tinfoil BCs** but with the correction term given by the Eq. 12 to calculate long-range Coulombic forces for systems which are periodic in two dimensions and are finite in the third.

Stan

You can also verify LAMMPS gives the correct behavior for slab systems yourself by comparing to an analytic solution. Just place two oppositely charged particles in a slab system. They form two infinite sheets of charge due to periodic boundary conditions in the x and y directions. If the charges are far apart enough in the z-direction, the force in the z-direction converges to 2*pi*q^2/(Lx*Ly), (see Understanding Molecular Simulation, Frenkel and Smit, p. 318), and LAMMPS reproduces this result **only if** you include the correction factor given in Eq. 12 of the paper.

Stan