orthonym.data.natural_products#
Note
Internal API. Names and behaviour may change between releases.
Natural product scaffold data and derivative lookup tables.
Provides pre-canonicalized SMILES for natural product scaffolds (for substructure matching) and exact derivative names (for direct lookup). All SMILES keys are already in RDKit canonical form – no runtime canonicalization is needed.
Also provides IUPAC atom numbering maps for steroid scaffolds, enabling decoration enumeration (hydroxy, ketone, unsaturation) on scaffold atoms.
- orthonym.data.natural_products.GENERAL_ONLY_NATURAL_PRODUCTS: Dict[str, str] = {'CC12CCC(CC1=O)C2(C)C': 'camphor'}#
Canonical SMILES -> name for derivatives withdrawn from the PIN path.
- orthonym.data.natural_products.get_natural_product_name(canonical_smiles)#
Look up exact natural product derivative name by canonical SMILES.
- Parameters:
canonical_smiles (str) – RDKit canonical SMILES string.
- Returns:
The retained/trivial name if found and PIN-admissible, otherwise None.
- Return type:
str | None
- orthonym.data.natural_products.get_carotene_parent_name(mol)#
Retained carotene parent name for
molby exact InChIKey, or None.Stereo-exact: only the all-E fundamental parent matches; a Z-isomer or a modified carotenoid returns None and is named systematically (fail-closed). The Greek name is OPSIN-round-trip gated by the caller, so a mismatch can never ship.
- orthonym.data.natural_products.get_scaffold_patterns()#
Return pre-compiled RDKit Mol objects keyed by canonical SMILES.
- Returns:
Dict mapping canonical SMILES to compiled RDKit Mol objects.
- Return type:
dict
- orthonym.data.natural_products.get_steroid_numbering(scaffold_smiles)#
Get IUPAC numbering map for a steroid scaffold.
- Parameters:
scaffold_smiles (str) – Canonical SMILES of the scaffold.
- Returns:
Dict mapping query atom index to IUPAC locant, or None if not found.
- Return type:
Dict[int, int] | None
- orthonym.data.natural_products.get_scaffold_numbering(scaffold_smiles)#
Get IUPAC numbering map for any scaffold (steroid or alkaloid).
Checks steroid maps first, then alkaloid maps.
- Parameters:
scaffold_smiles (str) – Canonical SMILES of the scaffold.
- Returns:
Dict mapping query atom index to IUPAC locant, or None if not found.
- Return type:
Dict[int, int] | None