mt_to_lpars#
- anri.crystal.mt_to_lpars(metric)[source]#
Convert (direct or reciprocal) metric tensor back to (direct or reciprocal) lattice parameters.
- Parameters:
metric (
Array) – [3,3] direct or reciprocal metric tensor- Returns:
jax.Array– [6] Direct or reciprocal lattice parameters (a,b,c,alpha,beta,gamma) with angles in degrees
Notes
For a metric tensor \(\tens{G}\) (direct or reciprocal), given:
\[\begin{split} \tens{G} = \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}\]then:\[\begin{split} \begin{aligned} a &= \sqrt{\tens{G}_{0,0}} \\ b &= \sqrt{\tens{G}_{1,1}} \\ c &= \sqrt{\tens{G}_{2,2}} \\ \alpha &= \cos^{-1}{\frac{\tens{G}_{1,2}}{b c}} \\ \beta &= \cos^{-1}{\frac{\tens{G}_{0,2}}{a c}} \\ \gamma &= \cos^{-1}{\frac{\tens{G}_{0,1}}{a b}} \\ \end{aligned} \end{split}\]