[lammps-users] Problem with boundary condition!

Dear Lammps_users

        I want to simulate a thin-film by setting the boundary x,y periodic and boundary z non-periodic.
    But when I use "boundary p p s", I get a ERROR: Lost atoms: original *** current ***.
    Finally I find that the boundary condition is the problem, because I use "boundary s s s" in the input getting its running.

        So how should I set the boundary condition to simulate a film.
        Any suggestions would be appreciated!

        My input script as follows:

I'm guessing the problem is that you are specifying a lattice
that isn't aligned with the coordinate axes. Thus when you
tile a box of integer dimensions (in the lattice constant), you
don't get a periodic system. If you run it with PBC, then
it is likely to have some atoms too close together across
the boundary, and it will blow up, resulting in lost atoms.

You have to insure that the atoms you are putting in the
box (at the orientation you choose) are indeed perioidic by
setting the box size appropriately.