I am trying to calculate the energy of a redox particle using compute group/group (ver 29Oct20). My system is a capacitor containing electrolyte. It’s periodic in X-Y and I use slab corrections in the Z direction with PPPM. When I compute group/group the redox particle energy with respect to the rest of the system, the tabulated energy increases monotonically with increasing slab correction thickness. Based on how the slab correction method works, I would expect the energy to converge to some value as slab thickness is increased.
group A is the ion (+1 charge), group B is the whole system (neutral). It seems that background charge corrections are being included in the energy even though the system is neutral. I think this is related to subtracting A-A and B-B interactions in compute group/group. Setting ‘boundary yes’ in compute group/group does not fix the problem. The forces from compute group/group are correct, however. Is this a problem with LAMMPS or am I misunderstanding how background charge corrections are supposed to work?
Working example is attached showing how my compute result ‘c_real’ changes with slab thickness. atom data file available on request.
Pt100_proton_NaCl.lmp (2.43 KB)