wulfric.Lattice#
- class wulfric.Lattice(*args, eps_rel=0.0001, angle_tol=0.0001, **kwargs)[source]#
General 3D lattice.
When created from the cell orientation of the cell is respected, however the lattice vectors may be renamed with respect to [1].
Since v0.2.2 the standardization of the lattice is not performed by default at the time of the lattice creation. The standardization is performed when is is required, for example, when the kpoints are computed.
Lattice can be created in a three alternative ways:
>>> import wulfric as wulf >>> l = wulf.Lattice(cell = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]) >>> l = wulf.Lattice(a1 = [1,0,0], a2 = [0,1,0], a3 = [0,0,1]) >>> l = wulf.Lattice(a=1, b=1, c=1, alpha=90, beta=90, gamma=90)
- Parameters:
- cell(3, 3) array-like
Unit cell, rows are vectors, columns are coordinates.
- a1(3,) array-like
First vector of unit cell (cell[0]).
- a2(3,) array-like
SEcond vector of unit cell (cell[1]).
- a3(3,) array-like
Third vector of unit cell (cell[2]).
- afloat, default=1
Length of the \(a_1\) vector.
- bfloat, default=1
Length of the \(a_2\) vector.
- cfloat, default=1
Length of the \(a_3\) vector.
- alphafloat, default=90
Angle between vectors \(a_2\) and \(a_3\). In degrees.
- betafloat, default=90
Angle between vectors \(a_1\) and \(a_3\). In degrees.
- gammafloat, default=90
Angle between vectors \(a_1\) and \(a_2\). In degrees.
- eps_relfloat, default 1e-4
Relative tolerance for distance.
- angle_tolfloat, default 1e-4
Absolute tolerance for angles, in degrees.
- Attributes:
eps_relfloat, default 1e-4Relative tolerance for the distance.
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.
Methods:
copy()Create a copy of the lattice.
Standardize cell with respect to the Bravais lattice type as defined in [Raad91bf4d954-1].
type([eps_rel, angle_tol])Identify the lattice type.
voronoi_cell([reciprocal, normalize])Computes Voronoi edges around (0,0,0) point.
Properties:
Transformation matrix that transforms primitive cell (
Lattice.cell()) to the conventional standardized cell.Transformation matrix that transforms the primitive cell to the standardized primitive cell.
Length of the first lattice vector \(\vert\boldsymbol{a_1}\vert\).
First lattice vector \(\boldsymbol{a_1}\).
Second lattice vector \(\boldsymbol{a_2}\).
Third lattice vector \(\boldsymbol{a_3}\).
Angle between second and third lattice vector.
Absolute tolerance for the angle.
Length of the second lattice vector \(\vert\boldsymbol{a_2}\vert\).
First reciprocal lattice vector.
Second reciprocal lattice vector.
Third reciprocal lattice vector.
Angle between first and third lattice vector.
Length of the third lattice vector \(\vert\boldsymbol{a_3}\vert\).
Unit cell of the lattice.
Centring type.
Length of the first vector of the conventional cell.
First vector of the conventional cell.
Second vector of the conventional cell.
Third vector of the conventional cell.
Angle between second and third conventional lattice vector.
Length of the second vector of the conventional cell.
Angle between first and third conventional lattice vector.
Length of the third vector of the conventional cell.
Conventional cell.
Angle between first and second conventional lattice vector.
Return conventional cell parameters.
Volume of the conventional unit cell.
Convention used for the standardization of the unit cell.
Crystal family.
Absolute tolerance for the distance.
Relative tolerance for the distance.
Angle between first and second lattice vector.
Length of the first reciprocal lattice vector \(\vert\boldsymbol{b_1}\vert\).
Angle between second and third reciprocal lattice vector.
Length of the second reciprocal lattice vector \(\vert\boldsymbol{b_2}\vert\).
Angle between first and third reciprocal lattice vector.
Length of the third reciprocal lattice vector \(\vert\boldsymbol{b_3}\vert\).
Angle between first and second reciprocal lattice vector.
Instance of
Kpointswith the high symmetry points and path.Human-readable name of the Bravais lattice type.
Return cell parameters.
Pearson symbol.
Reciprocal cell.
Reciprocal cell.
Volume of the reciprocal cell.
Return reciprocal cell parameters.
Volume of the unit cell.
Variation of the lattice, if any.