Adding vacuum on top of a liquid slab over a solid surface

Hello everyone,
I am simulating a liquid slab on top of a solid surface in the NVT ensemble. The thickness of the liquid slab is 40 Å in the normal direction to the solid surface and a vacuum layer of 100 Å is added on top of the slab to avoid interaction with the periodic image of the surface. The simulation box is periodic in the XYZ direction, and the surface is kept rigid. This system runs perfectly without any errors. However, when I checked the trajectory file, I noticed that about half of the liquid molecules had drifted to the top of the simulation box and started interacting with the periodic image of the solid surface. This happens even if I increase the vacuum region to 200 Å. I would like to know how to handle such systems in Gromacs. I do not want the liquid slab to detach from the surface (see the attached figure). Any help would be greatly appreciated. Thank you!

1 Like

If the system is periodic along Z, your liquid is correctly interacting with the opposite side of your slab. To avoid this, I would build a system with the liquid initially all on one side AND the box finite in Z.

Thank you for your response, Sasha. So, I should be using a reflecting wall in the Z direction and the periodicity in xy only.