Random atoms lost upon create_atoms

Dear LAMMPS users,

I attempted to create a BCC supercell (commands listed) with its axes along [1 -1 0], [1 1 -2], and [1 1 1] of the BCC lattice. However, upon “create_atoms” I found some unexpected vacancies. 273 atoms were created instead of 300 as expected. The problem does not appear when the block box aligns with [1 0 0], [0 1 0], and [0 0 1] directions of BCC.

Can someone tell what the problem is and how to resolve it? Thank you.

Jiayi Yan
Materials Science, KTH, Sweden

PS. Commands:

--------------- INITIALIZATION ------------------

clear
units metal
dimension 3
boundary p p p
atom_style atomic

------------------ ATOM DEFINITION -------------------

variable ao equal 2.8553
variable numx equal 10
variable numy equal 5
variable numz equal 1
variable boxlengthx equal {numx}*2^0.5 variable boxlengthy equal {numy}*6^0.5
variable boxlengthz equal ${numz}3^0.50.5

lattice bcc {ao} region simbox block 0 {boxlengthx} 0 {boxlengthy} 0 {boxlengthz}

create_box 1 simbox

lattice bcc ${ao} orient x 1 -1 0 orient y 1 1 -2 orient z 1 1 1

create_atoms 1 region simbox

------------------------ FORCE FIELDS -----------------------

pair_style eam/fs
pair_coeff * * Fe_2.eam.fs Fe
#---------------------------Settings----------------------------
compute csym all centro/atom bcc
compute eng all pe/atom
compute eatoms all reduce sum c_eng

#----------------------Run Minimization-------------------------
reset_timestep 0

thermo 10
thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms

dump 1 all custom 400 dump.relax.1.* id type xs ys zs c_csym c_eng

min_style cg
minimize 1e-15 1e-15 5000 5000

run 0
undump 1

vacancies.png

Dear LAMMPS users,

I attempted to create a BCC supercell (commands listed) with its axes along
[1 -1 0], [1 1 -2], and [1 1 1] of the BCC lattice. However, upon
"create_atoms" I found some unexpected vacancies. 273 atoms were created
instead of 300 as expected. The problem does not appear when the block box
aligns with [1 0 0], [0 1 0], and [0 0 1] directions of BCC.

Can someone tell what the problem is and how to resolve it? Thank you.

this is most likely due to placing the simulation box exactly on
lattice points. then points from rotated lattices may not always
result into exactly the same number and thus be outside the region by
a very narrow margin.

move your box by 0.1 lattice units and it should work since then
rounding won't matter.

axel.

Thanks! It worked after I added 0.1 on z_low and z_high.

Jiayi
Materials Science, KTH, Sweden

Also note the difference in how round-off is
done when using create_atoms box vs region.

From the doc page:

For the box style, the create_atoms command fills the entire simulation box with particles on the lattice. If your simulation box is periodic, you should insure its size is a multiple of the lattice spacings, to avoid unwanted atom overlaps at the box boundaries. If your box is periodic and a multiple of the lattice spacing in a particular dimension, LAMMPS is careful to put exactly one particle at the boundary (on either side of the box), not zero or two.

For the region style, a geometric volume is filled with particles on the lattice. This volume what is inside the simulation box and is also consistent with the region volume. See the region command for details. Note that a region can be specified so that its “volume” is either inside or outside a geometric boundary. Also note that if your region is the same size as a periodic simulation box (in some dimension), LAMMPS does not implement the same logic described above as for the box style, to insure exactly one particle at periodic boundaries. if this is what you desire, you should either use the box style, or tweak the region size to get precisely the particles you want.

You are using style region, when your region is simply the box.

So you could be using the box option, and the problem would likely not have

occurred.

Steve