NpT with only two directions?

GROMACS version: 2021.2
GROMACS modification: Yes, brew on Mac

Hello everyone,

My question is about the pcoupl. I intend to have the NpT ensemble, but need to fix one direction, for example, allowing the pressure coupling only in x and z but fix the box length in y.

The manual suggests the anisotropic pcoupltype, so currently I have my .mdp with the following lines:

pcoupl = Parrinello-Rahman
pcoupltype = anisotropic
tau_p = 5.0
ref_p = 1.0 1.0 1.0 0.0 0.0 0.0
compressibility = 4.5e-5 4.5e-5 4.5e-5 4.5e-5 4.5e-5 4.5e-5

My question is how to fix the y direction? Change the compressibility of y to a much higher value? It seems a rare case but I hope to avoid any fluctuation by the barostat in the y direction.

Thank you in advance.

You can fix any component by setting its compressibility to zero.

But often you want two directions to scale together. For that there is semi-isotropic coupling. But then the z-direction is the different one, not y.