Regarding Periodicity in Z-direction for HCP crystal

Hello all,

I am simulating Be system of particles whose lattice is described below(HCP). Z-dimension is kept in periodic. As a rule if any dimension is in periodicity, it should be defined in such a way that it should be in integral multiple of the lattice constant in that dimension. I used a multiple of ‘variable c’ (18.134 nm) but atoms are getting unstable. I want to know which variable multiple should be used for z-dimension to be periodic.

variable a equal 2.2568
variable b equal $a*sqrt(3.0)
variable c equal $a*1.5682

lattice custom 1.0 a1 $a 0.0 0.0 &
a2 0.0 $b 0.0 &
a3 0.0 0.0 $c &
basis 0.0 0.0 0.0 &
basis 0.5 0.5 0.0 &
basis 0.0 0.33333333 0.5 &
basis 0.5 0.83333333 0.5

The periodicity Q is also a function or you box

size. Unless the z dim on the box is a multiple

of c, then your lattice is not commensurate with

the box.