nanotools.localdos module
Created on 2020-05-11
@author: Vincent Michaud-Rioux
- class nanotools.localdos.LDOSData(energies=None)[source]
Bases:
Base
LocalDOS
data class.- energies
Energies at which the LDOS is calculated.
- Type:
pint.registry.Quantity
- class nanotools.localdos.LocalDOS(system, ldos=NOTHING, energy=NOTHING, solver=NOTHING, classname: str = NOTHING)[source]
Bases:
Base
LocalDOS
class.Examples:
from nanotools import LocalDOS import numpy as np from nanotools.utils import ureg calc = LocalDOS.from_totalenergy("nano_scf_out.json") calc.system.kpoint.set_grid([45,45,1]) calc.ldos.energies = [(calc.energy.efermi.m - 0.001)] * ureg.electron_volt calc.solve() calc.plot_ldos(filename="ldos.png", show=True)
- system
Object containing system related parameters.
- Type:
- ldos
Object containing the local density of states data.
- energy
Object containing the total energy and its derivatives (force, stress, etc.).
- Type:
- solver
Object containing solver related parameters.
- Type:
- plot_ldos(value=None, index=0, filename=None, show=True)[source]
Generates an isosurface plot of the local density of states.
- Parameters:
value (float, optional) – The density level at which to generate the isosurface. If value is not provided (value=None), the function automatically selects a default value based on the maximum LDOS value. Specifically, it sets value to 75% of the maximum LDOS value (values.max().m * 0.75). This default ensures a meaningful isosurface is plotted, avoiding very high or low extremes.
index (int, optional) – Index of the LDOS dataset to be used. Defaults to 0.
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_ldos_in', output='nano_ldos_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.