Dump_nodify pbc yes with simple fcc

Hello,

I am having troubles with how dump files appear. I dump the entire simulation box in the .xyz format and vizualize in OVITO. Some atoms appear to be sticking outside the simulation box (pink in the picture attached). Exctly these atoms are missing at “the other side” of the simulation box. Using dump_modify pbc yes does not seem to make any difference.
Is there a simple way how to get the sample “flat” at PBC?

Stefan

a) dump style xyz is a bad idea for a bulk system with periodic boundaries because it does not contain the box boundaries, better to use dump style atom or custom
b) whether you get “clean” surfaces depends on how exactly you define your box boundaries relative to the origin of your lattice. If you have lattice points exactly on a box boundary even the tiniest fluctuation of the position can have it move between periodic images.