orthonym.data.partial_saturation_refs#

Note

Internal API. Names and behaviour may change between releases.

Aromatic reference templates for partial saturation detection.

This module provides aromatic parent SMILES for comparing against partially saturated fused heterocycles. By comparing a molecule’s ring atoms against its aromatic parent, we can detect the saturation level and generate appropriate prefixes (dihydro-, tetrahydro-, hexahydro-, perhydro-).

IUPAC 2013 Blue Book: Hydro prefixes indicate the addition of hydrogen to an otherwise unsaturated parent structure.

Key aromatic systems covered: - Bicyclic: quinoline, isoquinoline, indole, benzofuran, naphthalene - Tricyclic: acridine, carbazole, phenazine, purine, pteridine - Monocyclic: furan, pyrrole, pyridine (for simple dihydro cases)

orthonym.data.partial_saturation_refs.get_aromatic_reference(mol)#

Find the aromatic parent structure for a molecule.

Performs substructure matching against known aromatic reference structures to identify which aromatic parent the molecule is derived from. This is essential for determining partial saturation (dihydro-, tetrahydro-, etc.).

The function returns the largest matching reference (by ring atoms) to handle nested systems correctly (e.g., naphthalene subsumes benzene).

Parameters:

mol (Mol) – RDKit molecule object

Returns:

Tuple of (reference_name, reference_smiles) if a match is found, None otherwise.

Return type:

Tuple[str, str] | None

Examples

>>> mol = Chem.MolFromSmiles('c1ccc2c(c1)CCCN2') # tetrahydroquinoline
>>> get_aromatic_reference(mol)
('quinoline', 'c1ccc2ncccc2c1')
>>> mol = Chem.MolFromSmiles('c1ccc2c(c1)CCN2') # dihydroindole
>>> get_aromatic_reference(mol)
('indole', 'c1ccc2[nH]ccc2c1')
orthonym.data.partial_saturation_refs.get_reference_smiles(name)#

Get the aromatic SMILES for a named reference compound.

Parameters:

name (str) – Reference compound name (e.g., ‘quinoline’, ‘indole’)

Returns:

Canonical SMILES string, or None if not found

Return type:

str | None

orthonym.data.partial_saturation_refs.get_reference_ring_atoms(name)#

Get the number of ring atoms for a named reference compound.

Parameters:

name (str) – Reference compound name

Returns:

Number of ring atoms, or 0 if not found

Return type:

int

orthonym.data.partial_saturation_refs.list_reference_names()#

Return list of all available reference compound names.

orthonym.data.partial_saturation_refs.get_carbocyclic_aromatic_reference(mol)#

Find carbocyclic aromatic parent structure for a molecule.

This is similar to get_aromatic_reference but only matches carbocyclic systems (naphthalene, anthracene, phenanthrene). Used for partial saturation detection in PAH systems.

Parameters:

mol (Mol) – RDKit molecule object

Returns:

Tuple of (reference_name, reference_smiles) if a carbocyclic match found, None otherwise.

Return type:

Tuple[str, str] | None

Examples

>>> mol = Chem.MolFromSmiles('c1ccc2c(c1)CCCC2') # tetrahydronaphthalene
>>> get_carbocyclic_aromatic_reference(mol)
('naphthalene', 'c1ccc2ccccc2c1')
orthonym.data.partial_saturation_refs.is_carbocyclic_reference(name)#

Check if a reference compound is a carbocycle.

Parameters:

name (str) – Reference compound name

Returns:

True if the reference is a carbocyclic aromatic (no heteroatoms)

Return type:

bool