Incorrect crystal orientation on outside of periodic simulation box

Hi,

I am having some issues understanding why atoms around the edge of a periodic simulation box are not in BCC orientation when I orient outside the typical [100] orientations. I have done some reading on this and found that the box should be a multiple of the minimum periodic distance. Periodic distance is then calculated as (SQRT(h^2 + k^2 + l^2). For example the [1 1 0] orientation would be a min periodic distance of (sqrt(2). I tried testing this for the iron BCC structure below and noticed that the default LAMMPS spacing was unexpected for the z direction. As such I modified the lattice command with the spacing term as below. I think make a region that is 20 x 20 0 x 20 with lattice units. Spacing in this case is 4.964, 4.05314. 7.0204 and box size is 99.28, 81.1, 140.4 as expected. However I am still seeing a few atoms on the outer layer not being in the expected BCC orientation (97% BCC).

What am I missing?

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

units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map hash
variable latparam equal 2.866

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

lattice bcc ${latparam} orient x 1 1 1 orient y 1 -1 0 orient z 1 1 -2 spacing 1.732051 1.414214 2.44949
region whole block 0 20 0 20 0 20
create_box 1 whole
create_atoms 1 region whole
mass 1 55.85

Thanks
Liam

Hi,

Due to numerical precision/error, the periodicity can be subtile to achieve.
Lammps take care of this, but only if you use “create_atoms" with the style “box”.

So, I expect your parameters to creat a fully periodic crystal if you replace

create_atoms 1 region whole

by

create_atoms 1 box

Julien

More details on this are given on the create_atoms doc page, for box
style vs region style.

Steve

Thanks to both of you. By using the box command and manually changing the spacing it is now perfect.

Appreciate the help.

Liam