How to keep box size in z direction constant while pressure coupling x and y?

GROMACS version: 2020.3
GROMACS modification: Yes

Hello, everyone!
I’m trying to simulate an interfacial system and I need to keep my z direction box size constant while I use pressure coupling for the other two dimensions. I imagined using semi-isotropic would be the way, but I’m not sure if I can set no coupling at all for z direction. Could anyone clarify if this is possible?

Thanks in advance.

Use semi-isotropic coupling and set the z compressibility value to zero.

Increasing the lateral pressure ( in z) up to 10 bar,

pcoupl = Parrinello-Rahman
pcoupltype = semiisotropic
tau_p = 5.0
compressibility = 0.0 4.5e-5
ref_p = 0.0 10.0 ; for 10 bar

Dr. Justin can you please check if this is the way to do so?

In the event that you want the x-y plane to remain at a fixed size, yes.