nanotools.bandstructure module
Created on 2020-05-11
@author: Vincent Michaud-Rioux
- class nanotools.bandstructure.BandStructure(system, energy=NOTHING, solver=NOTHING, classname: str = NOTHING)[source]
Bases:
Base
BandStructure
class.Examples:
from nanotools.bandstructure import BandStructure as BS calc = BS.from_totalenergy("nano_scf_out.json") calc.solve() fig = calc.plot_bs() # plot results fig.savefig("gaas_bs.png", dpi=600) # save fig
- system
Object containing system related parameters.
- Type:
- energy
Object containing the total energy and its derivatives (force, stress, etc.).
- Type:
- solver
Object containing solver related parameters.
- Type:
- plot_bs(filename=None, show=True)[source]
Generates a plot of the band structure.
- 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
)
- solve(input='nano_bs_in', output='nano_bs_out')[source]
Perform a 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.
- nanotools.bandstructure.plot_bs_driver(energy, hamiltonian, kpoint, weights=None, filename=None, show=True)[source]
Generates a plot of the band structure.
- Parameters:
energy (Energy) – Energy object containing the eigenvalues.
hamiltonian (Hamiltonian) – Hamiltonian object containing the spin treatment level.
kpoint (Kpoint) – Kpoint object containing the high-symmetry points, k-point coordinates and indices.
weights (NDArray, optional) – Array of weights, commensurate with energy.eigenvalues. If weights is not None, then bands have a width varying between 0 and .1 eV modulated by weights. This is used to plot spectral functions among other things.
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
)