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 FCF(DriverBlock):
r"""
:ivar Convergence: Minimum fraction of the FC factors sum to be calculated
:vartype Convergence: float | FloatKey
:ivar DeltaClass: Minimum gain in FCF between classes to continue calculation
:vartype DeltaClass: float | FloatKey
:ivar Lambda: Optional. The minimum value of the electron-phonon coupling for a mode to be taken into account in the calculation. Together with the MODES option, this provides a way to significantly reduce the total number of Franck-Condon factors. As with the MODES option, always check if the results do not change too much.
:vartype Lambda: float | FloatKey
:ivar Modes: Optional. The first and last mode to be taken into account in the calculation. By default, all modes are taken into account. This option can be used to effectively specify and energy range for the Franck-Condon factors. When using this options, always check if the results (electron-phonon couplings, ground state to ground overlap integral, average sum of Franck-Condon factors, etc.) do not change too much.
:vartype Modes: Iterable[int] | IntListKey
:ivar NumericalQuality: Set the quality of several technical aspects of an FC calculation, including details for the prescreening, the amount of computed integrals, the maximum integral class evaluated, as well as the convergence criteria.
:vartype NumericalQuality: Literal["0-0", "Basic", "Normal", "Good", "Excellent"]
:ivar Rotate: Recommended to be used. Rotate the geometries to maximize the overlap of the nuclear coordinates.
:vartype Rotate: BoolType | BoolKey
:ivar State1: Filename of the result files of a numerical or analytical frequency calculation for the first (initial) state.
:vartype State1: str | StringKey
:ivar State2: Filename of the result files of a numerical or analytical frequency calculation for the second (final) state.
:vartype State2: str | StringKey
:ivar States: The filenames of two results files of a numerical or analytical frequency calculation. The calculations must have been performed on the same molecule, i.e. the type, mass and order of occurrence of all the atoms (or fragments) has to be the same in both files.
:vartype States: str | StringKey
:ivar Translate: Recommended to be used. Move the center of mass of both geometries to the origin.
:vartype Translate: BoolType | BoolKey
:ivar Prescreening: Optional. Controls the details of the FC factors prescreening algorithm
:vartype Prescreening: FCF._Prescreening
:ivar Printing: Optional. Printing Options.
:vartype Printing: FCF._Printing
:ivar Spectrum: Optional. Controls the details of the spectrum calculation
:vartype Spectrum: FCF._Spectrum
"""
[docs] class _Prescreening(FixedBlock):
r"""
Optional. Controls the details of the FC factors prescreening algorithm
:ivar Class1: Maximum quantum number for Class 1 FC integrals
:vartype Class1: int | IntKey
:ivar Class2: Maximum quantum number for Class 2 FC integrals
:vartype Class2: int | IntKey
:ivar MaxClass: Maximum class of integrals to be computed
:vartype MaxClass: int | IntKey
:ivar MaxFCI: Maximum number of FC integrals to be computed for each Class (in millions)
:vartype MaxFCI: int | IntKey
"""
def __post_init__(self):
self.Class1: int | IntKey = IntKey(name='Class1', comment='Maximum quantum number for Class 1 FC integrals')
self.Class2: int | IntKey = IntKey(name='Class2', comment='Maximum quantum number for Class 2 FC integrals')
self.MaxClass: int | IntKey = IntKey(name='MaxClass', comment='Maximum class of integrals to be computed')
self.MaxFCI: int | IntKey = IntKey(name='MaxFCI', comment='Maximum number of FC integrals to be computed for each Class (in millions)')
[docs] class _Printing(FixedBlock):
r"""
Optional. Printing Options.
:ivar FCFThresh: The minimum value for the printing of a FC factor.
:vartype FCFThresh: float | FloatKey
:ivar Verbose: Increase output verbosity.
:vartype Verbose: BoolType | BoolKey
"""
def __post_init__(self):
self.FCFThresh: float | FloatKey = FloatKey(name='FCFThresh', comment='The minimum value for the printing of a FC factor.', gui_name='FC factor threshold:', default=0.01)
self.Verbose: BoolType | BoolKey = BoolKey(name='Verbose', comment='Increase output verbosity.', gui_name='Verbose printing:', default=False)
[docs] class _Spectrum(FixedBlock):
r"""
Optional. Controls the details of the spectrum calculation
:ivar HWHM: Half-Width at Half-Maximum for the spectral lineshape function
:vartype HWHM: float | FloatKey
:ivar LineShape: Type of lineshape function
:vartype LineShape: Literal["Stick", "Gaussian", "Lorentzian"]
:ivar SpcLen: Number of points in the spectrum
:vartype SpcLen: int | IntKey
:ivar SpcMax: Maximum absolute energy difference between the states relative to the 0-0 transition
:vartype SpcMax: float | FloatKey
:ivar SpcMin: Minimum absolute energy difference between the states relative to the 0-0 transition
:vartype SpcMin: float | FloatKey
:ivar Type: Type of spectrum
:vartype Type: Literal["Absorption", "Emission"]
"""
def __post_init__(self):
self.HWHM: float | FloatKey = FloatKey(name='HWHM', comment='Half-Width at Half-Maximum for the spectral lineshape function', default=100.0)
self.LineShape: Literal["Stick", "Gaussian", "Lorentzian"] = MultipleChoiceKey(name='LineShape', comment='Type of lineshape function', default='Stick', choices=['Stick', 'Gaussian', 'Lorentzian'])
self.SpcLen: int | IntKey = IntKey(name='SpcLen', comment='Number of points in the spectrum', default=2001)
self.SpcMax: float | FloatKey = FloatKey(name='SpcMax', comment='Maximum absolute energy difference between the states relative to the 0-0 transition', default=9500.0)
self.SpcMin: float | FloatKey = FloatKey(name='SpcMin', comment='Minimum absolute energy difference between the states relative to the 0-0 transition', default=-500.0)
self.Type: Literal["Absorption", "Emission"] = MultipleChoiceKey(name='Type', comment='Type of spectrum', default='Absorption', choices=['Absorption', 'Emission'])
def __post_init__(self):
self.Convergence: float | FloatKey = FloatKey(name='Convergence', comment='Minimum fraction of the FC factors sum to be calculated')
self.DeltaClass: float | FloatKey = FloatKey(name='DeltaClass', comment='Minimum gain in FCF between classes to continue calculation', hidden=True)
self.Lambda: float | FloatKey = FloatKey(name='Lambda', comment='Optional. The minimum value of the electron-phonon coupling for a mode to be taken into account in the calculation. Together with the MODES option, this provides a way to significantly reduce the total number of Franck-Condon factors. As with the MODES option, always check if the results do not change too much.', gui_name='Minimum coupling:', default=0.0)
self.Modes: Iterable[int] | IntListKey = IntListKey(name='Modes', comment='Optional. The first and last mode to be taken into account in the calculation. By default, all modes are taken into account. This option can be used to effectively specify and energy range for the Franck-Condon factors. When using this options, always check if the results (electron-phonon couplings, ground state to ground overlap integral, average sum of Franck-Condon factors, etc.) do not change too much.', default=[0, 0], gui_type='nint 2')
self.NumericalQuality: Literal["0-0", "Basic", "Normal", "Good", "Excellent"] = MultipleChoiceKey(name='NumericalQuality', comment='Set the quality of several technical aspects of an FC calculation, including details for the prescreening, the amount of computed integrals, the maximum integral class evaluated, as well as the convergence criteria.', default='Normal', choices=['0-0', 'Basic', 'Normal', 'Good', 'Excellent'])
self.Rotate: BoolType | BoolKey = BoolKey(name='Rotate', comment='Recommended to be used. Rotate the geometries to maximize the overlap of the nuclear coordinates.', default=True)
self.State1: str | StringKey = StringKey(name='State1', comment='Filename of the result files of a numerical or analytical frequency calculation for the first (initial) state.')
self.State2: str | StringKey = StringKey(name='State2', comment='Filename of the result files of a numerical or analytical frequency calculation for the second (final) state.')
self.States: str | StringKey = StringKey(name='States', comment='The filenames of two results files of a numerical or analytical frequency calculation. The calculations must have been performed on the same molecule, i.e. the type, mass and order of occurrence of all the atoms (or fragments) has to be the same in both files.', hidden=True)
self.Translate: BoolType | BoolKey = BoolKey(name='Translate', comment='Recommended to be used. Move the center of mass of both geometries to the origin.', default=True)
self.Prescreening: FCF._Prescreening = self._Prescreening(name='Prescreening', comment='Optional. Controls the details of the FC factors prescreening algorithm', hidden=True)
self.Printing: FCF._Printing = self._Printing(name='Printing', comment='Optional. Printing Options.')
self.Spectrum: FCF._Spectrum = self._Spectrum(name='Spectrum', comment='Optional. Controls the details of the spectrum calculation')