Can LAMMPS run MD with two dimensions of the simulation block fixed while the third dimension fluctuates to enforce a constant stress (1 dimensional barostat)

Is it possible to run LAMMPS using a sort of NPT-NVT hybrid ensemble where two dimensions of the simulation block are absolutely fixed (similar to NVT) while the third dimension is able to fluctuate to enforce a constant pressure (similar to NPT). I ask this because I want to run MD using such an ensemble to simulate a GB with a fixed cross sectional area but some enforced normal stress. To be more precise, consider a planar grain boundary with the GB plane aligned to the XY coordinate plane. I want the the block lengths in the X and Y directions to be absolutely fixed but I want the third dimension Z to fluctuating to enforce some pressure p normal to the GB plane. Sometimes this is done in the literature by running NVT and introducing vacuum gaps at the end of the block in the Z direction so the crystal can expand out into the vacuum to enforce zero stress however this method can not be applied to an arbitrary normal stress.

The fix npt comand has options for which box dimensions are barostatted and which are not.

E.g. z instead of iso.

Steve