RP

class specatalog.models.molecules.RP(**kwargs)[source]

Radical-pair molecule entry within the molecular hierarchy.

This subclass of Molecule represents a molecular system composed of two paramagnetic radical centres connected via a defined chemical linker.

The class participates in the polymorphic SQLAlchemy inheritance structure via polymorphic_identity='rp'. Any row in the base molecules table where group='rp' will be materialised as an RP instance.

id

Primary key referencing molecules.id; cascades on deletion.

Type:

int

radical_1

Short string describing the first radical centre.

Type:

str

linker

Short string defining the chemical linker bridging the two radicals.

Type:

str

radical_2

Short string describing the second radical centre.

Type:

str

name_suffix

A suffix for the molecular name giving addtional information on the molecule.

Type:

str

Notes

  • The tablename is rp.

  • Inherits all molecular base attributes from Molecule, including name, molecular_formula, structural_formula, timestamps, and the relationship to associated measurements.

  • Represents a composite molecular species with two radical sites, which may be identical or different.

  • All attributes specific to radical-pair composition are required (non-nullable).

Examples

Creating an RP molecule:

>>> from models import RP
>>> rp = RP(
...     name="TEMPO1–PH–TEMPO1",
...     molecular_formula="C26H44N2O4",
...     structural_formula="...",
...     group="rp",
...     radical_1="TEMPO1",
...     linker="PH",
...     radical_2="TEMPO1",
... )
>>> session.add(rp)
>>> session.commit()

Loading via polymorphism:

>>> mol = session.query(Molecule).filter_by(id=rp.id).one()
>>> type(mol)
<class 'models.RP'>