[lammps-users] Ewald summation for fix_wall

Dear all,
can we use Ewald summation in conjunction with fix wall? I made small changes in fix_wall_lj_93 to incorporate a long-range interaction and I want the technique of Ewald summation to do the calculations. Is there any way I could use kspace_style with fix_wall?
Thanks and regards.

What changes? Based on what theoretical grounds? To represent what?

Axel

Dear axel,
I am so sorry for my incomplete description of the problem.

I am studying surface directed spinodal decomposition in a binary mixture(A+B). The surface is attracting one of the component(say A) and so a wetting layer is formed at the surface. The surface potential I needed was a bit different than lj93, so I made some small changes in fix_wall_lj_93.cpp, like changing the exponent of just attractive part from 3 to 1 to study the potential dependent growth of wetting layer.
The attractive part of the potential now goes to zero as 1/r . I was advised to use Ewald summation technique to calculate the contribution of the attractive part to the potential energy of the system.
I have an impression that only some pair styles could be used with kspace style. Is there any workaround for my problem?
Looking forward to your valuable feedback.
Thanks and regards.

you have different periodicity orthogonal and parallel to your surface, so adding ewald summation to the interaction of the wall with the atoms makes no sense at all on multiple levels (it is non-periodic, you have an explicit and not a damped coulomb with 1/r, there is no representation of the wall charge in reciprocal space etc.).

but because of the non-periodicity and non-pairwise interaction of the wall potential you can have a very long cutoff for the wall potential to reach across the entire interface and thus have the wall-atom interactions handled exactly for the entire range (so even better than using a long-range solver to approximate that kind of interaction).

orthogonal to that you would still need to use long-range treatment, because of your charged particles, but that is possible by using the kspace_modify slab option (make sure you place the wall at a fixed position and not the edge, since the slab option enlarges the box to have 3x the volume in z-direction, since you need 2x the volume as empty space so the slab correction works reasonably accurate, but you need the wall where the atoms are).

I suggest to do the initial equlibration of this kind of system with a cutoff coulomb (to avoid complications) and possible a soft harmonic wall on the opposite side after sufficient vacuum. while this may not be fully accurate, this is much easier to control and adjust and once this system is running stable with the wall potential and is equilibrated at the proper conditions, you can switch to using long-range electrostatics with slab correction. the differences in the visualization after the switch should be minimal (or else there is a mistake somewhere) and then you can re-equilibrate and follow with your production simulation.

axel.

Thank you dr. Axel for such insight.