Density of states

Example:

calc = ...
dos = DOS(calc, width=0.2)
d = dos.get_dos()
e = dos.get_energies()

You can plot the result like this:

import matplotlib.pyplot as plt
plt.plot(e, d)
plt.xlabel('energy [eV]')
plt.ylabel('DOS')
plt.show()
../../_images/dos.png

Calculations involving moments of a DOS distribution may be facilitated by the use of get_distribution_moment() method, as in the following example:

from ase.dft import get_distribution_moment
volume = get_distribution_moment(e,d)
center, width = get_distribution_moment(e,d,(1,2))

More details

class ase.dft.dos.DOS(calc, width=0.1, window=None, npts=401)[source]

Electronic Density Of States object.

calc: calculator object
Any ASE compliant calculator object.
width: float
Width of guassian smearing. Use width=0.0 for linear tetrahedron interpolation.
window: tuple of two float
Use window=(emin, emax). If not specified, a window big enough to hold all the eigenvalues will be used.
npts: int
Number of points.
get_dos(spin=None)[source]

Get array of DOS values.

The spin argument can be 0 or 1 (spin up or down) - if not specified, the total DOS is returned.

get_energies()[source]

Return the array of energies used to sample the DOS.

The energies are reported relative to the Fermi level.

ase.dft.dos.ltidos(cell, eigs, energies, weights=None)[source]

DOS from linear tetrahedron interpolation.

cell: 3x3 ndarray-like
Unit cell.
eigs: (n1, n2, n3, nbands)-shaped ndarray
Eigenvalues on a Monkhorst-Pack grid (not reduced).
energies: 1-d array-like
Energies where the DOS is calculated (must be a uniform grid).
weights: (n1, n2, n3, nbands)-shaped ndarray
Weights. Defaults to 1.
ase.dft.get_distribution_moment(x, y, order=0)[source]

Return the moment of nth order of distribution.

1st and 2nd order moments of a band correspond to the band’s center and width respectively.

For integration, the trapezoid rule is used.