# dispersion: diagonalization on paths and meshes¶

elphmod.dispersion.band_order(v, V, by_mean=True, dv=inf, status=True)

Sort bands by overlap of eigenvectors at neighboring k points.

elphmod.dispersion.dispersion(matrix, k, angle=60, vectors=False, gauge=False, rotate=False, order=False, hermitian=True, broadcast=True, shared_memory=False)

Diagonalize Hamiltonian or dynamical matrix for given k points.

Parameters
matrixfunction

Matrix to be diagonalized as a function of k in crystal coordinates with period $$2 \pi$$.

klist of 2-tuples

k points in crystal coordinates with period $$2 \pi$$.

anglefloat

Angle between the axes of the reciprocal lattice.

vectorsbool

Return eigenvectors?

gaugebool

Choose largest element of each eigenvector to be real? Not stable!

rotatebool

Align (phonon) eigenvectors with wave vector k via in-plane rotation. This is experimental and supposed to support the band-order algorithm.

orderbool

Order/disentangle bands via their k-local character. Depending on the topology of the band structure, this may not be possible.

hermitianbool

Assume matrix to be Hermitian? Currently, only the real part of the eigenvalues of non-Hermitian matrices is returned.

Broadcast result from rank 0 to all processes?

shared_memorybool

Store results in shared memory?

Returns
ndarray

Eigenvalues for the given k points.

ndarray, optional

Corresponding eigenvectors.

ndarray, optional

Indices which have been used to order the bands.

elphmod.dispersion.dispersion_full(matrix, size, angle=60, vectors=False, gauge=False, rotate=False, order=False, hermitian=True, broadcast=True, shared_memory=False)

Diagonalize Hamiltonian or dynamical matrix on uniform k-point mesh.

elphmod.dispersion.dispersion_full_nosym(matrix, size, *args, **kwargs)

Diagonalize Hamiltonian or dynamical matrix on uniform k-point mesh.

Use this routine to get eigenvectors less symmetric than the eigenvalues!

To do: The reshape part fails if dispersion() returns a scalar.

elphmod.dispersion.map_dispersions(V1, V2)

Map two similar arrays of eigenvectors onto each other.

elphmod.dispersion.sample(matrix, k)

Calculate Hamiltonian or dynamical matrix for given k points.

Parameters
matrixfunction

Matrix as a function of k.

klist of tuples

k points.

elphmod.dispersion.unfolding_weights(k, R, U0, U, blocks0, blocks, sgn=- 1)

Calculate weights for “unfolding” of supercell dispersions.

Parameters
klist of d-tuples

k points in arbitrary representation.

Rlist of d-tuples

Positions of the unit cells in the supercell. The representation must be compatible with the k points: If k is given in crystal coordinates with a period of $$2 \pi$$, R must be given in crystal coordinates with a period of 1. k and R can also be defined in Cartesian coordinates.

U0: ndarray

Eigenvectors of the symmetric system.

U: ndarray

Eigenvectors of the supercell system.

blocks0list of indexing objects

Mapping from indices of R to slices of U0.

blockslist of indexing objects

Mapping from indices of R to slices of U.

sgnint

Sign convention for Fourier transform in tight-binding model. The default sign -1 is suitable for data from Wannier90 as provided by el.Model.H(). Other conventions require +1.

Returns
ndarray

Weights of the supercell states.