Ewald Summation for Slab Geometry

Hey everyone,

I’m currently working on replicating the results from a paper by Yeh and Berkowitz (DOI: [10.1063/1.479595]) using LAMMPS and DPD, focusing specifically on the forces between two particles. While attempting to fine-tune the parameters for the reciprocal space, I encountered some unexpected behavior.
Initially, when I set the kspace_style to ewald with a tolerance of 1e-6, I observed results consistent with those presented in the paper. However, as I experimented with adjusting parameters like gewald and kmax/ewald using the kspace_modify command, I started getting different outcomes. Sometimes, the forces between particles would oscillate, and in other cases, they would steadily increase.
Throughout my experiments, I maintained the same setting of kspace_modify slab 3.0 to ensure consistency.
I’m reaching out for insights into why these variations are occurring. If anyone has experience with LAMMPS simulations or a similar situation, I’d greatly appreciate any advice or suggestions.

Thanks in advance for your help!


This is my input:

dimension 3
units lj

atom_style hybrid atomic charge

variable z equal 1.0 #Where i place my particle

region domain block -5 5 -5 5 0 30 units box

create_box 3 domain
change_box all boundary p p f

create_atoms 1 single 0 0 0
create_atoms 2 single 0 0 $z

group pos id 1
group neg id 2

set type 1 charge 1.0
set type 2 charge -1.0
mass * 1.0

pair_style hybrid/overlay coul/long 3.0 dpd 1.0 1.0 419084618

kspace_style ewald 1e-6
#kspace_modify kmax/ewald 1 1 1
#kspace_modify gewald .969
kspace_modify slab 3.0
pair_coeff * * dpd 25.0 4.5
pair_coeff * * coul/long

compute force pos group/group neg kspace yes

thermo_style custom step pe ecoul c_force[*]
thermo 1

This is just how using the lattice sum approach to computing long-range electrostatics works. You should read about it in text books.

You cannot use arbitrary values for these settings, you have to make certain that both, the real space (through the cutoff) and the reciprocal space sums are sufficiently converged with respect to the choice of the damping factor “gewald”. The default for ewald (and pppm) of specifying a convergence parameter uses an estimator algorithm to find those settings automatically.