nanotools.vbm module

Created on 2021-06-04

@author: Vincent Michaud-Rioux

class nanotools.vbm.ValenceBandMaximum(reference_calculator, calculators: List[TotalEnergy] = [], charge_deltas=array([0.001]), vbm=None)[source]

Bases: Base

ValenceBandMaximum class.

Examples:

from nanotools.vbm import ValenceBandMaximum as VBM
from nanotools.totalenergy import TotalEnergy
ecalc = TotalEnergy.read("nano_scf_init.json")
calc = VBM.from_totalenergy(ecalc)
calc.delta_charges = [0.001]
calc.solve()
vbm = calc.get_vbm()
print(f"The VBM is = {vbm}")
calculators

Stores the calculators for each element of charge_deltas.

Type:

List[nanotools.totalenergy.TotalEnergy]

charge_deltas

Charge variations in electrons.

Type:

nptyping.ndarray.NDArray[Any, Any]

reference_calculator

Total energy calculator.

Type:

nanotools.totalenergy.TotalEnergy

vbm

Valence band maximum.

Type:

pint.registry.Quantity

plot_vbm(filename=None, show=True)[source]

Generates a semilogx plot of the VBMs (one for each charge_delta).

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)