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 LFDFT(DriverBlock):
r"""
:ivar ADFFile: Path to TAPE21 file from which lfdft reads data and to which lfdft writes data
:vartype ADFFile: str | StringKey
:ivar BField: Include a finite magnetic Field. For MCD calculations include a magnetic field in the z-direction. The DegeneracyThreshold should be small to see the splitting of levels due to the magnetic field.
:vartype BField: Iterable[float] | FloatListKey
:ivar DEBUG: debug
:vartype DEBUG: BoolType | BoolKey
:ivar DegeneracyThreshold: Energy difference threshold to determine degenerate levels
:vartype DegeneracyThreshold: float | FloatKey
:ivar MOIND: The indices of the MOs that participate for shell 1.
:vartype MOIND: Iterable[int] | IntListKey
:ivar MOIND1: The indices of the MOs that participate for shell 1.
:vartype MOIND1: Iterable[int] | IntListKey
:ivar MOIND2: The indices of the MOs that participate for shell 2.
:vartype MOIND2: Iterable[int] | IntListKey
:ivar MOIND3: The indices of the MOs that participate for shell 3.
:vartype MOIND3: Iterable[int] | IntListKey
:ivar MOIND4: The indices of the MOs that participate for shell 4.
:vartype MOIND4: Iterable[int] | IntListKey
:ivar NLVAL: n and l value of shell 1.
:vartype NLVAL: Iterable[int] | IntListKey
:ivar NLVAL1: n and l value of shell 1.
:vartype NLVAL1: Iterable[int] | IntListKey
:ivar NLVAL2: n and l value of shell 2.
:vartype NLVAL2: Iterable[int] | IntListKey
:ivar NLVAL3: n and l value of shell 3.
:vartype NLVAL3: Iterable[int] | IntListKey
:ivar NLVAL4: n and l value of shell 4.
:vartype NLVAL4: Iterable[int] | IntListKey
:ivar NSHEL: number of shells
:vartype NSHEL: int | IntKey
:ivar NSHELL: number of shells
:vartype NSHELL: int | IntKey
:ivar ORF: Orbital reduction factor
:vartype ORF: float | FloatKey
:ivar SOC: Include Spin-Orbit coupling for the shells, scaling it with the specified factor(s).
:vartype SOC: Iterable[float] | FloatListKey
:ivar SOCType: Choose the type of Spin-Orbit coupling calculation used for the shells.
:vartype SOCType: LFDFT._SOCType
"""
[docs] class _SOCType(FixedBlock):
r"""
Choose the type of Spin-Orbit coupling calculation used for the shells.
:ivar Shell1: Type of Spin-Orbit coupling for the first shell
:vartype Shell1: Literal["ZORA", "Core"]
:ivar Shell2: Type of Spin-Orbit coupling for the second shell
:vartype Shell2: Literal["ZORA", "Core"]
:ivar Shell3: Type of Spin-Orbit coupling for the third shell
:vartype Shell3: Literal["ZORA", "Core"]
:ivar Shell4: Type of Spin-Orbit coupling for the fourth shell
:vartype Shell4: Literal["ZORA", "Core"]
"""
def __post_init__(self):
self.Shell1: Literal["ZORA", "Core"] = MultipleChoiceKey(name='Shell1', comment='Type of Spin-Orbit coupling for the first shell', default='ZORA', choices=['ZORA', 'Core'])
self.Shell2: Literal["ZORA", "Core"] = MultipleChoiceKey(name='Shell2', comment='Type of Spin-Orbit coupling for the second shell', default='ZORA', choices=['ZORA', 'Core'])
self.Shell3: Literal["ZORA", "Core"] = MultipleChoiceKey(name='Shell3', comment='Type of Spin-Orbit coupling for the third shell', hidden=True, default='ZORA', choices=['ZORA', 'Core'])
self.Shell4: Literal["ZORA", "Core"] = MultipleChoiceKey(name='Shell4', comment='Type of Spin-Orbit coupling for the fourth shell', hidden=True, default='ZORA', choices=['ZORA', 'Core'])
def __post_init__(self):
self.ADFFile: str | StringKey = StringKey(name='ADFFile', comment='Path to TAPE21 file from which lfdft reads data and to which lfdft writes data', default='TAPE21')
self.BField: Iterable[float] | FloatListKey = FloatListKey(name='BField', comment='Include a finite magnetic Field. For MCD calculations include a magnetic field in the z-direction. The DegeneracyThreshold should be small to see the splitting of levels due to the magnetic field.', default=[0.0, 0.0, 0.0], unit='Tesla', gui_type='nfloat 3')
self.DEBUG: BoolType | BoolKey = BoolKey(name='DEBUG', comment='debug', hidden=True, default=False)
self.DegeneracyThreshold: float | FloatKey = FloatKey(name='DegeneracyThreshold', comment='Energy difference threshold to determine degenerate levels', default=0.001, unit='eV')
self.MOIND: Iterable[int] | IntListKey = IntListKey(name='MOIND', comment='The indices of the MOs that participate for shell 1.', hidden=True, default=[0, 0, 0, 0, 0, 0, 0])
self.MOIND1: Iterable[int] | IntListKey = IntListKey(name='MOIND1', comment='The indices of the MOs that participate for shell 1.', default=[0, 0, 0, 0, 0, 0, 0])
self.MOIND2: Iterable[int] | IntListKey = IntListKey(name='MOIND2', comment='The indices of the MOs that participate for shell 2.', default=[0, 0, 0, 0, 0, 0, 0])
self.MOIND3: Iterable[int] | IntListKey = IntListKey(name='MOIND3', comment='The indices of the MOs that participate for shell 3.', hidden=True, default=[0, 0, 0, 0, 0, 0, 0])
self.MOIND4: Iterable[int] | IntListKey = IntListKey(name='MOIND4', comment='The indices of the MOs that participate for shell 4.', hidden=True, default=[0, 0, 0, 0, 0, 0, 0])
self.NLVAL: Iterable[int] | IntListKey = IntListKey(name='NLVAL', comment='n and l value of shell 1.', hidden=True, default=[0, 0])
self.NLVAL1: Iterable[int] | IntListKey = IntListKey(name='NLVAL1', comment='n and l value of shell 1.', default=[0, 0])
self.NLVAL2: Iterable[int] | IntListKey = IntListKey(name='NLVAL2', comment='n and l value of shell 2.', default=[0, 0])
self.NLVAL3: Iterable[int] | IntListKey = IntListKey(name='NLVAL3', comment='n and l value of shell 3.', hidden=True, default=[0, 0])
self.NLVAL4: Iterable[int] | IntListKey = IntListKey(name='NLVAL4', comment='n and l value of shell 4.', hidden=True, default=[0, 0])
self.NSHEL: int | IntKey = IntKey(name='NSHEL', comment='number of shells', hidden=True, default=1)
self.NSHELL: int | IntKey = IntKey(name='NSHELL', comment='number of shells', default=1)
self.ORF: float | FloatKey = FloatKey(name='ORF', comment='Orbital reduction factor', hidden=True, default=1.0)
self.SOC: Iterable[float] | FloatListKey = FloatListKey(name='SOC', comment='Include Spin-Orbit coupling for the shells, scaling it with the specified factor(s).', default=[1.0, 1.0, 1.0, 1.0])
self.SOCType: LFDFT._SOCType = self._SOCType(name='SOCType', comment='Choose the type of Spin-Orbit coupling calculation used for the shells.')