I built a model with periodic boundary. When I set the model size to be the same as the box size, the edge of the model seems to be disordered when viewing it by VMD, while I set the model size smaller than the box size (i.e., there is a gap between the model edge and the box edge), the model edge will be arranged well, but some atoms will move into this gap (I know this is possible, but it is not what I want).

I am wondering how to avoid the disorder of model edge since the model edge of corresponding papers is very smooth. Is this just a viewing problem of VMD?

I built a model with periodic boundary. When I set the model size to be the same as the box size, the edge of the model seems to be disordered when viewing it by VMD, while I set the model size smaller than the box size (i.e., there is a gap between the model edge and the box edge), the model edge will be arranged well, but some atoms will move into this gap (I know this is possible, but it is not what I want).

I am wondering how to avoid the disorder of model edge since the model edge of corresponding papers is very smooth. Is this just a viewing problem of VMD?

steve already explained this issue in a previous mail.

the problem is neither with LAMMPS or VMD but in your head:
you have not fully grasped
a) how periodic boundary conditions work
and
b) that there is an ambiguity when defining box/region boundaries to
exactly coincide with lattice points.

You don’t say how you created your atoms, whether using
the entire simulation box or a region you defined. The
create_atoms command lets you do both. Its doc page
explains how it treats the 2 cases differently wrt the
periodic boundaries, and how round-off effects for
atoms “exactly” on the boundary of the region can
be a factor in one of the cases, but not the other.