Creating Atoms

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.

Not clear what your question is. I will say that if you are trying to
create lattices at different orientations, you should read the
lattice command doc page carefully. It talks about how periodicity
is addressed and how to figure out how the lattice command
sets its internal definition of the periodic repeat distances.

Also, there is no substitute for generating your atoms for a small system, immediately
dumping them to a file (write_dump command), and then
verifying all the atoms are where you expect them to be.
Especially with respect to periodic boundaries. With a dump
file you should also viz the results.

Steve