from __future__ import annotations
from pathlib import Path
from typing import Iterable, Literal, Sequence
from scm.pisa.block import DriverBlock,EngineBlock,FixedBlock,FreeBlock,InputBlock
from scm.pisa.key import BoolKey,FloatKey,FloatListKey,IntKey,IntListKey,MultipleChoiceKey,PathStringKey,StringKey,BoolType
[docs]class Conductance(DriverBlock):
r"""
:ivar EnergyGrid: Energy grid for Transmission Function
:vartype EnergyGrid: Conductance._EnergyGrid
:ivar Files: path of files
:vartype Files: Conductance._Files
:ivar Output: options describing what should be printed
:vartype Output: Conductance._Output
:ivar Physics: Block describing the physics of the system
:vartype Physics: Conductance._Physics
:ivar Technical: options describing technical parts of the calculation
:vartype Technical: Conductance._Technical
"""
[docs] class _EnergyGrid(FixedBlock):
r"""
Energy grid for Transmission Function
:ivar Max: Max Energy (relative to Fermi energy)
:vartype Max: float | FloatKey
:ivar Min: Min energy (relative to Fermi energy)
:vartype Min: float | FloatKey
:ivar Num: Number of energy values in which the interval Min-Max is subdivided
:vartype Num: int | IntKey
"""
def __post_init__(self):
self.Max: float | FloatKey = FloatKey(name='Max', comment='Max Energy (relative to Fermi energy)', default=5.0, unit='eV')
self.Min: float | FloatKey = FloatKey(name='Min', comment='Min energy (relative to Fermi energy)', default=-5.0, unit='eV')
self.Num: int | IntKey = IntKey(name='Num', comment='Number of energy values in which the interval Min-Max is subdivided', default=200)
[docs] class _Files(FixedBlock):
r"""
path of files
:ivar HamiltonianElectrode:
:vartype HamiltonianElectrode: str | StringKey
:ivar HamiltonianMolecule:
:vartype HamiltonianMolecule: str | StringKey
:ivar Leads: Path (either absolute or relative) of the lead results file
:vartype Leads: str | StringKey
:ivar OverlapElectrode:
:vartype OverlapElectrode: str | StringKey
:ivar OverlapMolecule:
:vartype OverlapMolecule: str | StringKey
:ivar Scattering: Path (either absolute or relative) of the scattering region results
:vartype Scattering: str | StringKey
"""
def __post_init__(self):
self.HamiltonianElectrode: str | StringKey = StringKey(name='HamiltonianElectrode', default=' ')
self.HamiltonianMolecule: str | StringKey = StringKey(name='HamiltonianMolecule', default=' ')
self.Leads: str | StringKey = StringKey(name='Leads', comment='Path (either absolute or relative) of the lead results file', default=' ')
self.OverlapElectrode: str | StringKey = StringKey(name='OverlapElectrode', default=' ')
self.OverlapMolecule: str | StringKey = StringKey(name='OverlapMolecule', default=' ')
self.Scattering: str | StringKey = StringKey(name='Scattering', comment='Path (either absolute or relative) of the scattering region results', default=' ')
[docs] class _Output(FixedBlock):
r"""
options describing what should be printed
:ivar OldOutput:
:vartype OldOutput: BoolType | BoolKey
"""
def __post_init__(self):
self.OldOutput: BoolType | BoolKey = BoolKey(name='OldOutput', default=False)
[docs] class _Physics(FixedBlock):
r"""
Block describing the physics of the system
:ivar FermiEnergy: Block describing the physics of the system
:vartype FermiEnergy: Conductance._Physics._FermiEnergy
"""
[docs] class _FermiEnergy(FixedBlock):
r"""
Block describing the physics of the system
:ivar Electrode: Fermi energy of the electrode
:vartype Electrode: float | FloatKey
"""
def __post_init__(self):
self.Electrode: float | FloatKey = FloatKey(name='Electrode', comment='Fermi energy of the electrode', default=0.0)
def __post_init__(self):
self.FermiEnergy: Conductance._Physics._FermiEnergy = self._FermiEnergy(name='FermiEnergy', comment='Block describing the physics of the system')
[docs] class _Technical(FixedBlock):
r"""
options describing technical parts of the calculation
:ivar Eta: To avoid poles of the Green's function, a small imaginary number is added to the energy
:vartype Eta: float | FloatKey
:ivar overwriteLeads: If true, Hamiltonians H_L and H_R are taken from the DFTB-leads calculation. If False, they are taken from the DFTB scattering-region calculation
:vartype overwriteLeads: BoolType | BoolKey
:ivar setOffDiagonalToZero: If true, H_LR and S_LR are explicitly set to zero. If False, they are taken from the DFTB scattering-region calculation.
:vartype setOffDiagonalToZero: BoolType | BoolKey
"""
def __post_init__(self):
self.Eta: float | FloatKey = FloatKey(name='Eta', comment="To avoid poles of the Green's function, a small imaginary number is added to the energy", default=1e-05)
self.overwriteLeads: BoolType | BoolKey = BoolKey(name='overwriteLeads', comment='If true, Hamiltonians H_L and H_R are taken from the DFTB-leads calculation. If False, they are taken from the DFTB scattering-region calculation', default=True)
self.setOffDiagonalToZero: BoolType | BoolKey = BoolKey(name='setOffDiagonalToZero', comment='If true, H_LR and S_LR are explicitly set to zero. If False, they are taken from the DFTB scattering-region calculation.', default=True)
def __post_init__(self):
self.EnergyGrid: Conductance._EnergyGrid = self._EnergyGrid(name='EnergyGrid', comment='Energy grid for Transmission Function')
self.Files: Conductance._Files = self._Files(name='Files', comment='path of files')
self.Output: Conductance._Output = self._Output(name='Output', comment='options describing what should be printed')
self.Physics: Conductance._Physics = self._Physics(name='Physics', comment='Block describing the physics of the system')
self.Technical: Conductance._Technical = self._Technical(name='Technical', comment='options describing technical parts of the calculation')