wulfric.cell.get_S_matrix#

wulfric.cell.get_S_matrix(cell, lattice_type=None, length_tolerance=1e-08, angle_tolerance=0.0001)[source]#

Computes standardization matrix \(\boldsymbol{S}\) as defined in [1].

See docs for each Bravais lattice for the details.

Parameters:
cell(3, 3) array-like

Matrix of a primitive cell, rows are interpreted as vectors.

lattice_typestr, optional

One of the 14 lattice types that correspond to the provided cell, case-insensitive. If not provided, then computed automatically from cell. If provided, then it user's responsibility to ensure that lattice_type is correct.

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:
S(3, 3) numpy.ndarray

Transformation matrix \(S\)

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
>>> cell = [[3, 0, 0],[0, 1, 0],[0, 0, 2]]
>>> wulf.cell.get_S_matrix(cell)
array([[0., 0., 1.],
       [1., 0., 0.],
       [0., 1., 0.]])