Kspace for non-periodic boundary condition

Dear all,
I am simulating a system that is non-periodic in z direction, but periodic in x and y directions and I want to consider coulombic forces in my simulation. (I want to see the interface between two fluids in my simulation in which one fluid is upper than another one)

boundary p p f
kspace_style pppm 0.0001
kspace_modify slab 3.0

when I run the code, the simulation starts but an error occurs after 142 st time step.
ERROR on proc 0: Bond atoms 21179 21180 missing on proc 0 at step 143 (src/ntopo_bond_all.cpp:59)
Last command: run 1000000

My question is that how can I apply non periodic boundary without atom lost, while I consider coulombic forces as well.

This is not so much a problem of setting up a slab calculation, but rather an issue of your geometry and/or force field. We don’t know how you have set up your system and what the forces and energies were during the first steps of your run, but something has happened so that one of the atoms in the problematic bond experienced a very strong force and thus was accelerated so much that it must have passed though multiple subdomains.

1 Like

Since you are dealing with fluids, you have to make sure that atoms are not escaping through Z direction, you can prevent escape by multiple ways like “fix one way zone” , “fix wall harmonic” .

You should consider running a fully periodic simulation, which will effectively have two interfaces per simulation box. If you want to study the interface under electric fields, see this recent and important work: Cookie Absent .