Kspace energy between groups for slab geometry

Hi Zhenxing,

I looked at Kspace slab with compute group/group. If you can guarantee that both groups are charge neutral, it is simple as you mentioned. It is more complicated if one or more groups have a net charge, and I haven’t been able to fully test/confirm what is right yet. I have some code (not yet fully tested) that I would be happy to send to you if you want to work on it.

Thanks,

Stan

Hi Stan,

Thank you for your help.

Yes I forgot the charge neutrality at the beginning.

I just noticed that the self-correction term and boundary term is added in compute_group_group.cpp and this is supposed to work with 3D geometry (because LAMMPS doesn’t complain if using 3D geometry). I think for slab geometry the boundary term can be handled exactly in the same way, except the extended volume should be used. Is it correct or I still miss something?

Thank you.

Sincerely,

Zhenxing

Not sure, I’ll have to take another look at it when I get a minute…

Stan