wulfric.cell.SC_TRI#
- wulfric.cell.SC_TRI(a: float, b: float, c: float, alpha: float, beta: float, gamma: float, input_reciprocal=False)[source]#
Constructs primitive triclinic cell as defined in [1].
\[\begin{split}\begin{matrix} \boldsymbol{a}_1 &=& (a, &0, &0)\\ \boldsymbol{a}_2 &=& (b\cos\gamma, &b\sin\gamma, &0)\\ \boldsymbol{a}_3 &=& (c\cos\beta, &\dfrac{c(\cos\alpha - \cos\beta\cos\gamma)}{\sin\gamma}, &\dfrac{c}{\sin\gamma}\sqrt{\sin^2\gamma - \cos^2\alpha - \cos^2\beta + 2\cos\alpha\cos\beta\cos\gamma}) \end{matrix}\end{split}\]- Parameters:
- afloat
Length of the first lattice vector of the conventional cell.
- bfloat
Length of the second lattice vector of the conventional cell.
- cfloat
Length of the third lattice vector of the conventional cell.
- alphafloat
Angle between vectors \(a_2\) and \(a_3\) of the conventional cell in degrees.
- betafloat
Angle between vectors \(a_1\) and \(a_3\) of the conventional cell in degrees.
- gammafloat
Angle between vectors \(a_1\) and \(a_2\) of the conventional cell in degrees.
- input_reciprocalbool, default False
Whether to interpret input as reciprocal parameters.
- Returns:
- cell(3, 3) numpy.ndarray
Matrix of a primitive cell, rows are interpreted as vectors.
cell = [ [a1_x, a1_y, a1_z], [a2_x, a2_y, a2_z], [a3_x, a3_y, a3_z], ]
References
[1]Setyawan, W. and Curtarolo, S., 2010. High-throughput electronic band structure calculations: Challenges and tools. Computational materials science, 49(2), pp. 299-312.
Examples
>>> import wulfric >>> wulfric.cell.SC_TRI(a=3, b=5, c=7, alpha=45, beta=33, gamma=21) array([[ 3. , 0. , 0. ], [ 4.66790213, 1.79183975, 0. ], [ 5.87069398, -1.48176621, 3.51273699]])