wulfric.cell.get_conventional#
- wulfric.cell.get_conventional(cell, S_matrix=None, C_matrix=None, length_tolerance=1e-08, angle_tolerance=0.0001)[source]#
Computes standardizes conventional cell as defined in [1].
- Parameters:
- cell(3, 3) array-like
Matrix of a primitive cell, rows are interpreted as vectors.
- S_matrix(3, 3) array-like, optional
Transformation matrix S. If not provided, then computed automatically from
cell. If provided, then it is user's responsibility to ensure that the matrix is the correct one for the givencell.- C_matrix(3, 3) array-like, optional
Transformation matrix C. If not provided, then computed automatically from
cell. If provided, then it is user's responsibility to ensure that the matrix is the correct one for the givencell.- length_tolerancefloat, default \(10^{-8}\)
Tolerance for length variables (lengths of the lattice vectors). Default value is chosen in the contexts of condense matter physics, assuming that length is given in Angstroms. Please choose appropriate tolerance for your problem.
- angle_tolerancefloat, default \(10^{-4}\)
Tolerance for angle variables (angles of the lattice). Default value is chosen in the contexts of condense matter physics, assuming that angles are in degrees. Please choose appropriate tolerance for your problem.
- Returns:
- conv_cell(3, 3) numpy.ndarray
Conventional cell, rows are interpreted as vectors, columns - as coordinates. Independent from the initial cell, safe to modify.
conv_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 as wulf >>> orcf = wulf.cell.ORCF(a=1,b=2,c=3) >>> wulf.cell.get_conventional(orcf) array([[1., 0., 0.], [0., 2., 0.], [0., 0., 3.]])