[lammps-users] Lost atoms with some scale values in the lattice command(modified input)

Dear LAMMPS Users,
The number of atoms changes with the same input except different scales(denoted as a) in the lattice command. I posted the problem just now, but a mistake was given in my input for the boundary command(not s s p, but p s p). Sorry for that.

dimension 3
units metal
boundary p s p
atom_style atomic
lattice fcc $a origin 0 0 0 orient x 1 1 -2 orient y 1 1 1 orient z 1 -1 0
region box block 0 3 0 1 0 3
create_box 1 box
create_atoms 1 box

if a=1,2,3,...or 3.625,3.635,3.675, the number is 192;
if a=3.615(lattice constant for Cu),3.665, the number is 190;
if a=3.605,3.645,3.655,3.695, the number is 191.

why are some atoms lost for some scale values?
Thank you for your time. Any help is appreciated.

Zhenhai Xu

Probably some round-off issue near the box edges. Can you viz and
tell which atom(s) are getting created vs non created?

Steve

Just posted a patch for this. It was a round-off issue.
Now, all the lattice values you tried give the same result,
generating 192 atoms, as they should.

Steve