periodic surface showing defect for certain orientation

Dear all,

I am simulating crack propagation in single crystal BCC Fe for different orientations. Periodic boundary condition is applied only in z direction. The problem I face is for a certain orientation (orientation 1), on applying CNA/CSP gives a system with a high fraction of defected crystal structure in the z planes at & near the z plane boundary of the simulation cell. As we move towards the interior from the z plane boundary, the defect in the crystal structure decreases and becomes finally BCC. Whereas for the other orientations (orientation 2), all the z planes are throughout uniformly BCC. But since the z direction is under pbc, the crystal structure should have been uniform through all the z planes, whether they are at the centre or the end of the simulation cell. I also tried to run the simulation with minimize command, but the problem prevailed. The input files are given below:

orientation 1

log log_nve_o7.LAMMPS
units metal
dimension 3
boundary s s p
atom_style atomic
variable latparam equal 2.86
echo both

create geometry

lattice bcc ${latparam}
region whole block 0 200 0 200 0 36 units box
create_box 5 whole

lattice bcc ${latparam} orient x 1 -2 1 orient y 1 0 -1 orient z 1 1 1
create_atoms 1 region whole

pair_style eam/fs
pair_coeff * * Fe_2.eam.fs Fe Fe Fe Fe Fe
#minimize 0.0 5.0e-6 20000 30000
#write_restart minimize_orient7.rst

region 1 block INF INF INF 2 INF INF units box
group lower region 1
region 2 block INF INF 197 INF INF INF units box
group upper region 2
group boundary union lower upper
group mobile subtract all boundary

region leftupper block INF 30 100 INF INF INF units box
region leftlower block INF 30 INF 100 INF INF units box
group leftupper region leftupper
group leftlower region leftlower

set group leftupper type 2
set group leftlower type 3
set group lower type 4
set group upper type 5

neigh_modify exclude type 2 3
reset_timestep 0
timestep 0.001
velocity all create 5.0 764392
velocity upper set NULL 0.0 NULL
velocity lower set NULL 0.0 NULL
fix enforce boundary setforce NULL 0 NULL

fix 1 all nve
fix temp_1 all temp/rescale 1000 5.0 5.0 0.01 1
fix press_1 all press/berendsen z 0 0 3000
thermo 100
thermo_style custom step temp c_temp_bias lx ly lz press pxx pyy pzz pe vol etotal density
dump dump_1 all custom 4000 dump_o7_*.cust id type x y z vx vy vz fx fy fz

run 150000

orientation 2

everything is same except the orientation is as given below:
lattice bcc ${latparam} orient x 1 1 -2 orient y 1 1 1 orient z 1 -1 0




Please understand how periodicity and lattice spacing works.

You create a box with <100> parallel to the x/y/z axes, but fill the box with a re-oriented crystal. Hence the spacing of your crystal will not match your box dimensions, and the mismatch is causing your issue.