Constructor for the density of states object.
The BulkConfiguration or MoleculeConfiguration for which the density of states should be calculated.
The k-points for which the density of states should be calculated.
Type: MonkhorstPackGrid
Default:
MonkhorstPackGrid(nx,ny,nz), where nx, ny, nz is the sampling used for the self consistent calculation
Specifies the choice for the energy zero.
Type: FermiLevel | AbsoluteEnergy
Default:
FermiLevel
The number of bands above the Fermi level.
Type: A positive integer
Default:
All bands are included
Save the partial contributions to the density of states.
Type: True | False
Default:
True
A DensityOfStates object provides the following methods:
elements(): Query for the elements in the configuration used for generating the dos
energies(): Return the energies used for generating the last spectrum
energyMax(): Return the maximum eigenenergy
energyMin(): Return the minimum eigenenergy
energyZero(): Return the energy zero
evaluate(spin, projection_list): Return the default density of states spectrum
Type: Spin.Sum | Spin.Up | Spin.down
Default:
Spin.Sum
ProjectionList with projections to include in the density of states.
Type: ProjectionList
Default:
total density of states
fermiLevel(): Return the Fermi level in absolute energy
gaussianSpectrum(energies, spin, broadening, projection_list): Return the Density of States Spectrum using Gaussian broadening.
List of energies for which the spectrum should be calculated.
Type: list of PhysicalQuantity with unit energy
Default:
spectrum from emin to emax
Type: Spin.Up | Spin.down
Default:
Spin.Up
Type: PhysicalQuantity with unit energy
Default:
0.1*eV
ProjectionList with projections to include in the density of states.
Type: ProjectionList
Default:
total density of states
nlprint(stream): Print a string containing an ASCII table useful for plotting the density of states.
spins(): Return the spins associated to this analysis object
tetrahedronSpectrum(energies, spin, projection_list): Return the Density of States Spectrum using the tetrahedron method.
List of energies for which the spectrum should be calculated
Type: list of PhysicalQuantity with unit energy
Default:
list of energies from emin to emax
Type: Spin.Up | Spin.down
Default:
Spin.Up
ProjectionList with projections to include in the density of states.
Type: ProjectionList
Default:
total density of states
Calculate the Density of states of a silicon crystal.
# Set up Si in the diamond structure
si_crystal = BulkConfiguration(
bravais_lattice=FaceCenteredCubic(5.4306*Angstrom),
elements=[Silicon, Silicon],
cartesian_coordinates=[[ 0. , 0. , 0. ],
[ 1.35765, 1.35765, 1.35765]]*Angstrom
)
calculator = LCAOCalculator(
numerical_accuracy_parameters=
NumericalAccuracyParameters(k_point_sampling=(4, 4, 4))
)
si_crystal.setCalculator(calculator)
# Calculate the density of states
dos = DensityOfStates(si_crystal, kpoints = MonkhorstPackGrid(16,16,16))
# save the DOS to a file
nlsave('si_dos.nc', dos)
|
|
Note |
|---|---|
The spectrum can be shown by selecting the file si_dos.nc in
the result browser of VNL
|
Plot the Gaussian and tetrahedron spectrum within pylab
# read DOS object from file
dos = nlread('si_dos.nc', DensityOfStates)[0]
# make list of energies
energies = numpy.arange(-14,5,0.01)*eV
# calculate the DOS spectrum with two different methods
dos_t = dos.tetrahedronSpectrum(energies)
dos_g = dos.gaussianSpectrum(energies, broadening = 0.2*eV)
#plot the spectra using pylab
import pylab
pylab.figure()
pylab.plot(energies.inUnitsOf(eV), dos_t.inUnitsOf(eV**-1))
pylab.plot(energies.inUnitsOf(eV), dos_g.inUnitsOf(eV**-1))
pylab.xlabel("Energy (eV)")
pylab.ylabel("DOS (1/eV)")
pylab.show()
The routine utilizes the symmetries of the crystal to reduce the computational load.
The default spectrum is a Gaussian spectrum for molecules, and a tetrahedron spectrum for BulkConfigurations with more than 10 k-points.
The implementation of the tetrahedron method follows Ref. [25]