AbsSpectrumCalculator

Linear absorption spectrum

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

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

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 or Aggregate

>>> 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'>]
>>> 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):
    ...
Exception: 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()
Attributes:
TimeAxis
system

Methods

bootstrap([rwa, prop, lab]) This function sets some additional information before calculation
calculate([raw, from_dynamics, alt]) Calculates the absorption spectrum
one_transition_spectrum(tr) Calculates spectrum of one transition
convert_2_current_u  
convert_2_internal_u  
unit_repr  
unit_repr_latex  
bootstrap(rwa=0.0, prop=None, lab=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):
    ...
Exception: RWA not set by system nor explicitely.
calculate(raw=False, from_dynamics=False, alt=False)[source]

Calculates the absorption spectrum

one_transition_spectrum(tr)[source]

Calculates spectrum of one transition