lpars_to_mt#
- anri.crystal.lpars_to_mt(lpars)[source]#
Convert lattice parameters to metric tensor.
- Parameters:
lpars (
Array) – [6] Lattice parameters (a,b,c,alpha,beta,gamma) with angles in degrees- Returns:
mt (
jax.Array) – [3,3] metric tensor
Notes
From IUCr dictionary [1]
\[\begin{split} \tens{G_{ij}} = \begin{bmatrix} \vec{a} \cdot \vec{a} & \vec{a} \cdot \vec{b} & \vec{a} \cdot \vec{c} \\ \vec{b} \cdot \vec{a} & \vec{b} \cdot \vec{b} & \vec{b} \cdot \vec{c} \\ \vec{c} \cdot \vec{a} & \vec{c} \cdot \vec{b} & \vec{c} \cdot \vec{c} \end{bmatrix} \end{split}\]From the general dot product definition: \(\vec{a} \cdot \vec{b} = \abs{\vec{a}}\abs{\vec{b}}\cos\theta\)
Handily, we always know the angles between the basis vectors, they are \(\left(\alpha, \beta, \gamma \right)\).
Also we know for a vector \(\vec{a}\) that \(\vec{a} \cdot \vec{a} = \abs{\vec{a}}^2\).
Therefore, we can rewrite:
\[\begin{split} \tens{G_{ij}} = \begin{bmatrix} a^2 & a b \cos\gamma & a c \cos\beta \\ a b \cos\gamma & b^2 & b c \cos\alpha \\ a c \cos\beta & b c \cos\alpha & c^2 \end{bmatrix} \end{split}\]References