The same script, but not the same model

Dear all lammpser:

I encountered a strange problem of building a crystalline model with periodic boundary condition by unsing the following script:

units metal
boundary p p p
atom_style atomic
lattice fcc 3.615 origin 0.0 0.5 0.5 orient x 1 -1 0 orient y 1 1 -2 orient z 1 1 1
region cell block 0 27 0 24 -2 20
region box block 0 27 0 24 0 18
create_box 1 cell
create_atoms 1 region box
pair_style eam/alloy/opt
pair_coeff * * potentials/Cu01.eam.alloy Cu
min_style cg
min_modify dmax 0.1 line backtrack
minimize 1.0e-10 1.0e-12 2000 5000

First, I run this script on my PC, a perfect model with ideal PBC obtained. But the same script can not obtain the same model on a multi-processors cluster, and I found the model by cluster has less atoms. So I just questioned how to deal with this problem. Is this a bug or something else? Any suggestion will be appreciated.

Dear all lammpser:

I encountered a strange problem of building a crystalline model with periodic boundary condition by unsing the following script:

units metal
boundary p p p
atom_style atomic
lattice fcc 3.615 origin 0.0 0.5 0.5 orient x 1 -1 0 orient y 1 1 -2 orient z 1 1 1
region cell block 0 27 0 24 -2 20
region box block 0 27 0 24 0 18
create_box 1 cell
create_atoms 1 region box
pair_style eam/alloy/opt
pair_coeff * * potentials/Cu01.eam.alloy Cu
min_style cg
min_modify dmax 0.1 line backtrack
minimize 1.0e-10 1.0e-12 2000 5000

First, I run this script on my PC, a perfect model with ideal PBC obtained. But the same script can not obtain the same model on a multi-processors cluster, and I found the model by cluster has less atoms. So I just questioned how to deal with this problem. Is this a bug or something else? Any suggestion will be appreciated.

This can happen when you choose your box and lattice so that atoms would be placed exactly on the boundaries and is caused by truncation errors in floating point numbers. Just shift your box or lattice by a tiny bit and the numbers will be consistent.

Axel

More specifically, it will not happen in you use create_atoms for the entire
simulation box since LAMMPS knows the box is periodic. But if you use
a region (as you are doing), then LAMMPS
ignores periodicity, so as Axel said you may need to adjust the region size.

See the create_atoms doc page for details.

Steve