Fix two dimensions of cell in NPT

Hello all,

Is there any way to fix length and angles of cubic cell in NPT simulation?
I mean we do not allow the variation of length in x and y direction, but the length can be varied in z direction to reach its equilibrium density. in the meanwhile we need to constrain the angle to be 90 degrees. Is that possible?

Thanks,
Karan