nanothickness film

I want to simulate nanothickness film in Lammps. So I am using periodic boundary conditions in x and y directions and boundary condition s in z direction to ensure that required film thickness is what I need.

Is it a right approach to get nanothickness film in z direction