Questions regarding the boundary conditions and pressure calculations in 2D materials

A not fully periodic system is an “open” system with effectively an infinite volume. For that reason, neither global volume nor global pressure are well defined. LAMMPS well still output the volume of the cell, but that is not the volume of the system, only the volume that LAMMPS is “monitoring”. Since pressure depends on volume, that is also tainted. You can still apply fix nvt, nve, npt, but in the latter case you can only monitor Pxx and Pyy if z is non-periodic and adjust only those components of the cell size. That means using integrators, thermostats, and barostats is still valid but you will not represent the ensembles of their names since the system does not conform to how the ensembles are defined.