Theory Behind the Crystallographic Calculator

This app was build to translate between Miller and Miller-Bravais indices, to calculate the angle between given directions and calculate the normal to a given plane for both cubic and hexagonal crystal structures.

The hexagonal system is more conveniently described by 4 basis vectors, 3 of which are co-planar and therefore, not linearly independent. Hence, the tendency to describe planes in hexagonal crystal using the Miller-Bravais system (hkil) where \( i=-(h+k)\) and can be omitted in writting (hk.l) .

However, when attempting crystallographic computations this system proves cumbersome and transforming to Miller independent indices becomes more convenient. For instance, a  crystallographic direction described in Miller-Bravais indices as [UVTW] where \( T \equiv -(U+V)\) is a vector \(U\mathbf{a_1} + V\mathbf{a_2} + T\mathbf{a_3} + W\mathbf{c}\) in a system in which \(\mathbf{a_3} = -(\mathbf{a_1} + \mathbf{a_2})\). The same vector can be described in a frame defined by independent basis vectors \(\mathbf{a_1}, \mathbf{a_2}, \mathbf{c} \) as [uvw]:

\(U\mathbf{a_1} + V\mathbf{a_2} + T\mathbf{a_3} + W\mathbf{c} = u\mathbf{a_1} + v\mathbf{a_2} + w\mathbf{c} \)


  • The 1st block [uvw]⇔[UVTW] converts direction vectors written in Miller indices to Miller-Bravais indices and back through the following formulas:


Miller \([uvw]\) ⇒ Miller-Bravais  \( [UVTW]:\)

\( U=\frac{1}{3}(2u-v) \hspace{0.5cm}\)

\( V=\frac{1}{3}(2v-u)\hspace{0.5cm}\)

\( T=-(U+V) \hspace{0.5cm}\)

\( W=w \hspace{0.5cm}\)

Miller-Bravais \( [UVTW]\) ⇒ Miller  \(  [uvw]:\)

\( u = 2U+V \hspace{0.5cm}\)

\( v = 2V+W \hspace{0.5cm}\)

\( w=W\hspace{0.5cm}\)


  • The 2nd block, (hkl)⇔(hkil) converts Miller indices describing a set of planes to the equivalent Miller-Bravais indices through the following relationship:


\( i=-(h+k) \quad h=h \quad k=k \quad l=l. \)


  • The 3rd block, [u1 v1 w1] ∠ [u2 v2 w2], uses the dot product formula to calculate the cosine between two vectors \(\mathbf{V1}=u_1\mathbf{a} +v_1\mathbf{b} + w_1\mathbf{c} \) and \(\mathbf{V_2}=u_2\mathbf{a} +v_2\mathbf{b} + w_2\mathbf{c} \). The resulting angle is shown in both degrees and rads:


\( cos(\theta)=\displaystyle\frac{u_{1}u_{2}+v_{1}v_{2}+w_{1}w_{2}}{\sqrt{(u_1^2+v_1^2+w_1^2)(u_2^2+v_2^2+w_2^2)}}\)

  • The 4th block, [U1 V1 T1 W1] ∠ [U2 V2 T1 W2], uses the metric tensor g to calculate the general dot product in a hexagonal crystal. For more information behind tensors and reciprocal space check this pdf.


  • The 5th block, [uvw] ⊥ (hkl) , uses the fact that the reciprocal lattice vector g with components (h, k, l) is perpendicular to the plane with Miller indices (hkl). Conveniently, for a cubic crystal the real and reciprocal basis vector are along the same direction which means the direction of the vector g can be described in real space by (h, k, l) . Note the difference with the hexagonal frame for the final block.


  • The 6th block, [UVW] ⊥ (hkl), uses the same identity as before, with the added complication of having to translate the reciprocal space vector g to real space coordinates.  This is done with the aid of the reciprocal metric tensor. For more information check the pdf above on the 4th block. Please note that while obtaining the vector coordinates is a somewhat easy task, expressing these coordinates as Miller indices can be rather tedious. Here we go from fractional values to smallest possible integers by multiplying all values by 100 and rounding up to nearest integers, approximating therefore to two decimal places. Next we find the greatest common divisor of all three indices and reduce the values.