radtools.PDOS#

class radtools.PDOS(energy, pdos, projectors_group: str, projectors, ldos=None, spin_pol=False)[source]#

Partial density of states, projected on arbitrary projections.

Supports k-resolved density of states. Support spin-polarised and spin-unpolarised cases.

PDOS class is iterable (over projectors) and supports item call (return PDOS for key projector).

Operations of addition and subtraction are defined.

Parameters:
energyarray-like

Values of energy for the PDOS. Shape \(n_e\) is assumed.

pdosarray-like

Array with the values of PDOS. Shape is assumed to be:

  • Spin-polarized, k-resolved: \((n, 2, n_k, n_e)\)

  • Spin-unpolarized, k-resolved: \((n, n_k, n_e)\)

  • Spin-polarized, non k-resolved: \((n, 2, n_e)\)

  • Spin-unpolarized, non k-resolved: \((n, n_e)\)

where \(n\) is the number of projections, \(n_k\) is the number of k-points, \(n_e\) is the number of energy points.

projectors_groupstr

Name of the projectors group.

projectorslist

Names of the projectors. If projectors_group has the form "l" or "l_j", where l is "s", "p", "d", "f" and j is the total angular momentum, the projectors are assigned automatically, otherwise it is necessary to provide \(n\) projectors manually. The names of projectors are directly used in the plots.

ldosarray-like, optional

Local density of states. Sum of partial density of states over all projectors. Computed based on pdos if not provided. Shape is assumed to be:

  • Spin-polarized, k-resolved: \((2, n_k, n_e)\)

  • Spin-unpolarized, k-resolved: \((n_k, n_e)\)

  • Spin-polarized, non k-resolved: \((2, n_e)\)

  • Spin-unpolarized, non k-resolved: \((n_e)\)

where \(n_k\) is the number of k-points, \(n_e\) is the number of energy points.

spin_polbool, default False

Whether PDOS is spin-polarized or not.

Attributes:
energynumpy.ndarray

Values of energy for the PDOS. Has the shape \(n_e\).

ldosnumpy.ndarray

Local density of states.

pdosnumpy.ndarray

Partial density of states.

projectors_groupstr

Name of the projectors group.

projectorslist

Names of the projectors.

spin_polbool, default False

Whether PDOS is spin-polarized or not.

k_resolvedbool, default False

Check if pdos is k-resolved based on shape of pdos.

Methods:

dump_txt(output_name)

Save PDOS as .txt file.

normalize([zeros_to_none])

Normalize values of PDOS to 1 for each k and energy point.

normalized([zeros_to_none])

Return new instance with normalized PDOS.

squeeze()

Squeeze k-resolved PDOS.

squeezed()

Return new instance with squeezed PDOS.

Properties:

k_resolved

Check if pdos is k-resolved based on shape of pdos.

kpoints

Return k-points.

ldos

Local density of states.

n_e

Return number of energy points.

n_k

Return number of k-points.

pdos

Partial density of states.