Density of States Utilities

class aimstools.density_of_states.utilities.DOSContribution(symbol, values, l='total')[source]

Container class for density of states contributions.

Supports addition.

get_latex_symbol()[source]
l

Angular momentum.

set_symbol(symbol)[source]
symbol

Symbol to describe atomic species.

values

Contribution values as (nenergies, nspins, 7) array.

class aimstools.density_of_states.utilities.DOSPlot(main: bool = True, contributions: list = None, **kwargs)[source]

Context to draw DOS plot. Handles labelling, shifting and broadening.

draw()[source]
set_data_from_spectrum()[source]
set_dos_tick_locator()[source]
set_dos_window()[source]
set_energy_window()[source]
set_total_dos()[source]
set_xy_axes_labels()[source]
class aimstools.density_of_states.utilities.DOSSpectrum(atoms: ase.atoms.Atoms = None, energies: numpy.ndarray = None, contributions: list = None, type: str = None, fermi_level: float = None, reference: str = None, shift: float = None)[source]

Container class for density of states and associated data.

atoms
contributions

List of (index, ndarray) or (symbol, ndarray).

energies

Energies in eV as (nspins, nenergies) array.

fermi_level

Fermi level in eV.

get_atom_contribution(index, l='tot')[source]

Returns DOSContribution of given atom index and angular momentum l.

get_group_contribution(symbols, l='tot')[source]

Returns sum of MullikenContribution of given list of species.

get_species_contribution(symbol, l='tot')[source]

Returns sum of contributions for given species symbol and angular momentum l.

get_total_dos()[source]

Returns total sum of contributions.

reference

Reference energy description.

shift

Shift value to reference energy.

type

Classifies if spectrum contains species- or atom-projection or just total DOS.

aimstools.density_of_states.utilities.delta_function(energies, energy, width)[source]

Return a delta-function centered at ‘energy’.

aimstools.density_of_states.utilities.gradient_fill(x, y, axes, color, flip=True)[source]

Plot a linear alpha gradient beneath x y values. Here, x and y are transposed due to the nature of DOS graphs.

Parameters:
  • y (x,) – The data values of the line.
  • arguments are passed on to matplotlib's plot function. (Additional) –
aimstools.density_of_states.utilities.smear_dos(energies, dos, width=0.1)[source]

Broadens DOS by a delta function while maintaining the same area.