nanotools.densityofstates module
Created on 2020-05-11
@author: Vincent Michaud-Rioux
- class nanotools.densityofstates.DensityOfStates(system, dos=NOTHING, energy=NOTHING, solver=NOTHING, classname: str = NOTHING)[source]
Bases:
Base
DensityOfStates
class.Examples:
from nanotools import DensityOfStates as DOS calc = DOS.from_totalenergy("nano_scf_out.json") calc.dos.pdos_return = True calc.system.kpoint.set_grid([10,10,10]) calc.system.pop.set_type("tm") calc.solve() fig = calc.plot_dos() fig.savefig("gaas_dos.png", dpi=600) # save fig fig = calc.plot_pdos(sumA=[0,1]) fig.savefig("gaas_pdos.png", dpi=600) # save fig
- system
Object containing system related parameters.
- Type:
- dos
Object containing the density of states.
- Type:
- energy
Object containing the total energy and its derivatives (force, stress, etc.).
- Type:
- solver
Object containing solver related parameters.
- Type:
- plot_dos(filename=None, show=True)[source]
Generates a plot of the density of states.
- Parameters:
filename (str, optional) – If not None, then the figure is saved to filename.
show (bool, optional) – If True block and show figure. If False, do not show figure.
- Returns:
A figure handle.
- Return type:
fig (
matplotlib.figure.Figure
)
- plot_pdos(sumA=None, sumL=None, sumM=None, filename=None, show=True)[source]
Generates a plot of the projected density of states.
The projected density of states is computed and plotted on the fly. If several optional inputs are specified, the Cartesian product of all parameters will be shown.
- Parameters:
sumA (1D array, optional) – Atom indices. If sumA = [0,1], then both the contributions of atom 1 and 2’s orbitals are computed and plotted.
sumL (1D array, optional) – Orbital angular momentum. If sumL = [0,1,2], then the contributions of s, p and d orbitals respectively are computed and plotted.
sumM (1D array, optional) – z-component of the orbital angular momentum. If sumM = 0, then both the contributions of z=0-orbitals are computed and plotted.
filename (str, optional) – If not None, then the figure is saved to filename.
show (bool, optional) – If True block and show figure. If False, do not show figure.
- Returns:
A figure handle.
- Return type:
fig (
matplotlib.figure.Figure
)
- solve(input='nano_dos_in', output='nano_dos_out')[source]
Performs a non.self-consistent calculation calling
rescuplus
.- Parameters:
filename (str) – The object is saved to an input file
filename
which is read byrescuplus
.output (str) – The results (with various extensions) are moved to files
output
and the results are loaded to the object.