[lammps-users] Atoms number changes with boundary condition?

Dear Lammps_users

    I meet a strange problem that the atoms number changes with boundary conditon.
      I tested in the in.eam in /bench directory.
      With "ppp" boundary, the total atoms in the box is 32000.
      While with "sss" boundary, the number changes to be 34461.
      What is problem on earth?
      If i want to calculate the energy of a surface,how should I do?

Best Regards

Zhenyu Yang
  State Key Laboratory of Nonlinear Mechanics (LNM)
  Institute of Mechanics, Chinese Academy of Sciences
  No.15 Beisihuanxi Road
  Beijing 100080, P. R. China
  FAX: 010-62579511
[email protected]...

It is perfectly normal. Think about how the periodic boundary is
implemented to understand this. For example in a fcc crystal if you have
periodic boundary in all three directions, then a unit cell only
contains 4 atoms (1 corner and 3 face), whereas the same crystal with 3
non-periodic boundaries will contain 14 atoms (8 corner and 6 face).

Hope this helps,

Zhenyu Yang wrote:

To augment Arun's comment, when LAMMPS puts atoms
in a box via create_atoms, it does something different if the
box is periodic or not. For periodic (if the box size is a multiple
of the unit cell), it puts no atoms at the upper edge, since
those same atoms exist at the lower edge (periodic image).

If the box is not periodic, it puts extra atoms at the upper edge.
So you see more atoms created when you run with "boundary s s s"