TestAggregate#

Class to support tests on Aggregate class

This class provides an easy access to a prefilled, but not initiallized object of the Aggregate class. These can be used for testing and demonstration. There are several types of aggregates available, distinguished by the name argument of the constructor.

TestAggregates Provided#

Below we list the valid values for the name argument of the TestAggregate constructor:

dimer-2 : Dimer of two-level molecules, with positions in space and transition dipole moments specified. No environment is defined.

dimer-2-env : Dimer of two-level molecules, with positions in space and transition dipole moments specified. For each molecule we define energy gap correlation function (energy gao correlation functions on different sites are not correlated).

homodimer-2 : Homo-dimer of two-level molecules (molecules with the same energy gaps), with positions in space and transition dipole moments specified. No environment is defined.

homodimer-2-env : Homo-dimer of two-level molecules, with positions in space and transition dipole moments specified. For each molecule we define energy gap correlation function (energy gao correlation functions on different sites are not correlated).

Class Details#

class quantarhei.builders.aggregate_test.TestAggregate(name: str | None = None)[source]#

Bases: Aggregate

Class to support tests on Aggregate class

Parameters:

name (str) – Name characterizing the test aggregate.

Examples

General dimers

>>> # Dimer of two-level systems
>>> tagg = TestAggregate(name="dimer-2")
>>> tagg.build()
>>> tagg.has_SystemBathInteraction()
False
>>> # Dimer of two-level systems with an environment
>>> tagg = TestAggregate(name="dimer-2-env")
>>> tagg.build()
>>> tagg.has_SystemBathInteraction()
True

Homo-dimers

>>> # Dimer of two-level systems
>>> tagg = TestAggregate(name="homodimer-2")
>>> tagg.build()
>>> tagg.has_SystemBathInteraction()
False
>>> # Dimer of two-level systems with an environment
>>> tagg = TestAggregate(name="homodimer-2-env")
>>> tagg.build()
>>> tagg.has_SystemBathInteraction()
True
>>> # Trimer of two-level systems without an environment
>>> tagg = TestAggregate(name="trimer-2")
>>> tagg.build()
>>> tagg.has_SystemBathInteraction()
False
__init__(name: str | None = None) None[source]#

Some more doctests

>>> TestAggregate()
Traceback (most recent call last):
    ...
quantarhei.exceptions.QuantarheiError: Aggregate name not specified