pengwann.descriptors.DescriptorCalculator#
- class pengwann.descriptors.DescriptorCalculator(dos_array, num_wann, nspin, kpoints, u, h=None, occupation_matrix=None, energies=None)#
Compute descriptors of chemical bonding and local electronic structure.
This class can be used to calculate:
The Wannier-projected density of states (pDOS)
Wannier orbital Hamilton populations (WOHPs)
Wannier orbital bond indices (WOBIs)
- Parameters:
- dos_array
ndarrayoffloat The density of states discretised across energies, k-points and bands.
- num_wann
int The total number of Wannier functions.
- nspin
int The number of electrons per fully-occupied band. This should be set to 2 for non-spin-polarised calculations and set to 1 for spin-polarised calculations.
- kpoints
ndarrayoffloat The full k-point mesh used in the prior Wannier90 calculation.
- u
ndarrayofcomplex The U matrices that define the Wannier functions in terms of the canonical Bloch states.
- h
dictof {3-lengthtupleofintndarrayofcomplex} pairs orNone, optional The Hamiltonian in the Wannier basis. Required for the computation of WOHPs. Defaults to None.
- occupation_matrix
ndarrayoffloatorNone, optional The Kohn-Sham occupation matrix. Required for the computation of WOBIs. Defaults to None.
- energies
ndarrayoffloatorNone, optional The energies at which the dos_array has been evaluated. Defaults to None.
- dos_array
- Attributes:
energiesThe energies at which the DOS and all derived descriptors have been evaluated.
Methods
assign_descriptors(interactions[, ...])Compute DOS matrices, WOHPs and WOBIs for a set of AtomicInteraction objects.
from_eigenvalues(eigenvalues, num_wann, ...)Initialise a DescriptorCalculator object from a set of Kohn-Sham eigenvalues.
get_coefficient_matrix(i, bl_vector)Calculate the coefficient matrix for a given Wannier function.
get_density_matrix_element(c_star, c)Calculate an element of the Wannier density matrix.
get_dos_matrix(c_star, c[, resolve_k])Calculate the DOS matrix for a pair of Wannier functions.
parallelise(wannier_interactions, calc_p_ij, ...)Compute DOS matrices and elements of the Wannier density matrix in parallel.
See also
Notes
Upon initialisation, the spilling factor will be calculated. For Wannier functions derived from energetically isolated bands, the spilling factor should be (within machine precision) strictly 0. For disentangled bands, the spilling factor should still ideally be very close to 0. If the calculated spilling factor is > 0, a warning will be raised and all derived results should be treated with caution.
This class should not normally be initialised using the base constructor. See instead the
from_eigenvalues()classmethod.