Dear all,

I am using the following script to create TiN with NaCl structure.

variable a_TiN equal 4.22843688099911

clear

dimension 3

boundary p s p

units metal

atom_style atomic

atom_modify map array

variable Length_Y_TiN equal (8 * v_a_TiN) variable Length_XZ equal (8 * v_a_TiN)

region box block (-v_Length_XZ) (v_Length_XZ) (-v_Length_Y_TiN) ( v_Length_Y_TiN ) (-v_Length_XZ) (v_Length_XZ) units box

create_box 2 box

lattice fcc {a_TiN} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region Layer_N block (-v_Length_XZ) (v_Length_XZ) (-v_Length_Y_TiN) (v_Length_Y_TiN) (-v_Length_XZ) $(v_Length_XZ) units box

create_atoms 1 region Layer_N

lattice fcc {a_TiN} origin 0.5 0.0 0.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region Layer_Ti block (-v_Length_XZ) (v_Length_XZ) (-v_Length_Y_TiN) (v_Length_Y_TiN) (-v_Length_XZ) $(v_Length_XZ) units box

create_atoms 2 region Layer_Ti

However, when I want to use different crystallographic orientation I get a simulation box which is non-periodic in x and z directions:

lattice fcc {a_TiN} orient x 1 -1 0 orient y 1 1 1 orient z -1 -1 2
region Layer_N block (-v_Length_XZ) (v_Length_XZ) (-v_Length_Y_TiN) (v_Length_Y_TiN) (-v_Length_XZ) $(v_Length_XZ) units box

create_atoms 1 region Layer_N

lattice fcc {a_TiN} origin ??? ??? ??? orient x 1 -1 0 orient y 1 1 1 orient z -1 -1 2
region Layer_Ti block (-v_Length_XZ) (v_Length_XZ) (-v_Length_Y_TiN) (v_Length_Y_TiN) (-v_Length_XZ) $(v_Length_XZ) units box

create_atoms 2 region Layer_Ti

Actually, even without type 2 atom and simply reorienting just fcc structure with atom type 1, the boundary condition along x and z is non-periodic. By the way, I am not sure how to use the origin option to insert second fcc structure with atom type 2 after reorientation to get the NaCl structure.

Many thanks for your help and stay safe,

Reza.