nanotools.defect module
Created on 2020-05-11
@author: Vincent Michaud-Rioux
- class nanotools.defect.Defect(unitsys, bandgap=None, charges=NOTHING, chemicalpotentials=NOTHING, corrections=None, dielectric=None, efermi=None, formationenergies=None, name='defect', relax: bool = True, transitionlevels=None, site=0, supercell=NOTHING)[source]
Bases:
Base
Defect project class.
- charges
NDArray List of charged states
- Type:
numpy.ndarray
- name
string Project name (used to make main directory).
- Type:
str
- supercell
NDArray Supercell transformation.
- Type:
numpy.ndarray
- unitsys
TotalEnergy TotalEnergy object describing the unit cell.
- plot_transition_level_diagram(filename=None, show=True)[source]
Generates a plot of the transition level diagram.
- 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
)
- nanotools.defect.interp_periodic(avec, farr, pos)[source]
Interp a periodic function discretized on a 3D regular grid.
- Parameters:
avec (NDArray) – Lattice vectors (row-vectors).
farr (NDArray) – Function values.
pos (NDArray) – Target positions (Cartesian)
- Returns:
Function interpolated at the positions given by pos.
- Return type:
NDArray