radtools.Lattice#

class radtools.Lattice(*args, standardize=True, **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].

Creation may change the angles and the lengths of the cell vectors. It preserve the volume, right- or left- handedness, lattice type and variation of the cell.

The lattice vector`s lengths are preserved as a set.

The angles between the lattice vectors are preserved as a set with possible changes of the form: \(angle \rightarrow 180 - angle\).

The returned cell may not be the same as the input one, but it is translationally equivalent.

Lattice can be created in a three alternative ways:

>>> import radtools as rad
>>> l = rad.Lattice(cell = [[1, 0, 0], [0, 1, 0], [0, 0, 1]])
>>> l = rad.Lattice(a1 = [1,0,0], a2 = [0,1,0], a3 = [0,0,1])
>>> l = rad.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.

standardizebool, default True

Whether to standardize the cell. The consistence of the predefined k paths is not guaranteed in the cell is not unified.

Attributes:
eps_relfloat, default 1e-4

Relative epsilon

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:

lattice_points([relative, reciprocal, normalize])

Compute lattice points

type([eps_rel])

Identify the lattice type.

voronoi_cell([reciprocal, normalize])

Computes Voronoi edges around (0,0,0) point.

Properties:

a

Length of the first lattice vector \(\vert\vec{a}_1\vert\).

a1

First lattice vector \(\vec{a}_1\).

a2

Second lattice vector \(\vec{a}_2\).

a3

Third lattice vector \(\vec{a}_3\).

alpha

Angle between second and third lattice vector.

b

Length of the second lattice vector \(\vert\vec{a}_2\vert\).

b1

First reciprocal lattice vector.

b2

Second reciprocal lattice vector.

b3

Third reciprocal lattice vector.

beta

Angle between first and third lattice vector.

c

Length of the third lattice vector \(\vert\vec{a}_3\vert\).

cell

Unit cell of the lattice.

centring_type

Centring type.

conv_a

Length of the first vector of the conventional cell.

conv_a1

First vector of the conventional cell.

conv_a2

Second vector of the conventional cell.

conv_a3

Third vector of the conventional cell.

conv_alpha

Angle between second and third conventional lattice vector.

conv_b

Length of the second vector of the conventional cell.

conv_beta

Angle between first and third conventional lattice vector.

conv_c

Length of the third vector of the conventional cell.

conv_cell

Conventional cell.

conv_gamma

Angle between first and second conventional lattice vector.

conv_parameters

Return conventional cell parameters.

conv_unit_cell_volume

Volume of the conventional unit cell.

crystal_family

Crystal family.

eps

Epsilon parameter.

eps_rel

Relative epsilon

gamma

Angle between first and second lattice vector.

k_a

Length of the first reciprocal lattice vector \(\vert\vec{b}_1\vert\).

k_alpha

Angle between second and third reciprocal lattice vector.

k_b

Length of the second reciprocal lattice vector \(\vert\vec{b}_2\vert\).

k_beta

Angle between first and third reciprocal lattice vector.

k_c

Length of the third reciprocal lattice vector \(\vert\vec{b}_3\vert\).

k_gamma

Angle between first and second reciprocal lattice vector.

kpoints

Instance of Kpoints with the high symmetry points and path.

name

Human-readable name of the Bravais lattice type.

parameters

Return cell parameters.

pearson_symbol

Pearson symbol.

reciprocal_cell

Reciprocal cell.

reciprocal_cell_volume

Volume of the reciprocal cell.

reciprocal_parameters

Return reciprocal cell parameters.

unit_cell_volume

Volume of the unit cell.

variation

Variation of the lattice, if any.