AbsSpectrumCalculator#

Linear absorption spectrum

Linear absorption spectrum of a molecule or an aggregate of molecules.

class quantarhei.spectroscopy.abscalculator.LinSpectrumCalculator(timeaxis: Any, system: Any = None, dynamics: str = 'secular', relaxation_tensor: Any = None, rate_matrix: Any = None, effective_hamiltonian: Any = None)[source]#

Bases: EnergyUnitsManaged

Linear absorption spectrum

Parameters:
  • timeaxis (quantarhei.TimeAxis) – TimeAxis on which the calculation will be performed

  • system (quantarhei.Molecule or quantathei.Aggregate) – System for which the absorption spectrum will be calculated.

Examples

Calcutor has to be created using a Molecule, Aggregate or OpenSystem

>>> time = TimeAxis(0.0, 1000, 1.0)
>>> absc = AbsSpectrumCalculator(time)
Traceback (most recent call last):
    ...
TypeError: system must be of type [<class 'quantarhei.builders.molecules.Molecule'>, <class 'quantarhei.builders.aggregates.Aggregate'>, <class 'quantarhei.builders.opensystem.OpenSystem'>]
>>> with energy_units("1/cm"):
...     mol = Molecule([0.0, 10000.0])
>>> absc = AbsSpectrumCalculator(time, mol)

The method bootstrap() must be called before calculate()

>>> abs = absc.calculate()
Traceback (most recent call last):
    ...
quantarhei.exceptions.QuantarheiError: Calculator must be bootstrapped first: call bootstrap() method of this object.

Molecule does not provide RWA information automatically

>>> HH = mol.get_Hamiltonian()
>>> HH.has_rwa
False

Setting the RWA frequency can be therefore done explicitely

>>> absc.bootstrap(rwa=1.0)
>>> print(absc.rwa)
1.0

When RWA is specified for the Hamiltonian

>>> HH.set_rwa([0, 1])

setting RWA explicitely in bootstrap() is ignored. The value from the Molecule is used.

>>> absc.bootstrap(rwa=1.1)
>>> print("%5.5f" % absc.rwa)
1.88365

RWA can be set by the Molecule

>>> with energy_units("1/cm"):
...     mol = Molecule([0.0, 10000.0])
>>> absc = AbsSpectrumCalculator(time, mol)
>>> mol.set_electronic_rwa([0, 1])
>>> absc.bootstrap()
property TimeAxis: Any#
property system: Any#
bootstrap(rwa: float = 0.0, prop: Any = None, lab: Any = None, HWHH: Any = None, axis: Any = None, gauss: Any = None, adiabatic: Any = None, fluor: Any = None, **kwargs: Any) None[source]#

This function sets some additional information before calculation

>>> time = TimeAxis(0.0, 1000, 1.0)
>>> with energy_units("1/cm"):
...     mol = Molecule([0.0, 10000.0])
>>> absc = AbsSpectrumCalculator(time, mol)
>>> absc.bootstrap()
Traceback (most recent call last):
    ...
quantarhei.exceptions.QuantarheiError: RWA not set by system nor explicitely.
calculate(raw: bool = False, from_dynamics: bool = False, alt: bool = False) Any[source]#

Calculates the absorption spectrum

one_transition_spectrum_abs(tr: dict[str, Any]) ndarray[source]#

Calculates spectrum of one transition

one_transition_spectrum_ld(tr: dict[str, Any]) ndarray[source]#

Calculates spectrum of one transition

one_transition_spectrum_gauss(tr: dict[str, Any]) tuple[ndarray, ndarray, ndarray][source]#

Calculates spectrum of one transition using gaussian broadening of the stick spectra. The definition is the same as for exat tools: https://doi.org/10.1002/jcc.25118

one_transition_spectrum_fluor(tr: dict[str, Any]) ndarray[source]#

Calculates spectrum of one transition

one_transition_spectrum_cd(tr: dict[str, Any]) ndarray[source]#

Calculates spectrum of one transition

class quantarhei.spectroscopy.abscalculator.AbsSpectrumCalculator(timeaxis: Any, system: Any = None, dynamics: str = 'secular', relaxation_tensor: Any = None, rate_matrix: Any = None, effective_hamiltonian: Any = None)[source]#

Bases: LinSpectrumCalculator

calculate(raw: bool = False, from_dynamics: bool = False, alt: bool = False) Any[source]#

Calculates the absorption spectrum