orthonym.data.xanthine_derivatives#

Note

Internal API. Names and behaviour may change between releases.

Xanthine derivatives data module for purine-based alkaloids.

This module provides data and functions for naming caffeine, theophylline, theobromine, and related xanthine derivatives. These compounds require specific N-position numbering that differs from standard heterocycle patterns.

IUPAC naming for xanthines: - Parent: purine-2,6-dione (xanthine core) - N-substitution uses numeric locants (1,3,7-trimethyl, not N,N’,N’’-trimethyl) - Indicated hydrogen marks the tautomeric position (1H, 7H) - Partial saturation uses dihydro prefix (3,7-dihydro)

Reference: IUPAC 2013 Blue Book (Purines and xanthines)

orthonym.data.xanthine_derivatives.identify_xanthine(mol)#

Identify if a molecule is a known xanthine derivative.

Checks if the molecule’s canonical SMILES matches any entry in the XANTHINE_DERIVATIVES dictionary.

Parameters:

mol (Mol) – RDKit molecule object

Returns:

Canonical SMILES key if molecule is a known xanthine derivative, None otherwise.

Return type:

str | None

Examples

>>> mol = Chem.MolFromSmiles('Cn1cnc2c1c(=O)n(C)c(=O)n2C') # caffeine
>>> identify_xanthine(mol)
'Cn1cnc2c1c(=O)n(C)c(=O)n2C'
orthonym.data.xanthine_derivatives.get_xanthine_name(mol, use_common=False)#

Get the IUPAC name for a xanthine derivative.

IUPAC retained names (e.g., ‘xanthine’, ‘hypoxanthine’) always take priority over systematic names. These are PINs per IUPAC 2013. For named derivatives like caffeine, theophylline: these are common names (not IUPAC retained), so the systematic name is correct for PIN.

Parameters:
  • mol (Mol) – RDKit molecule object

  • use_common (bool) – If True, return common name (caffeine, theophylline, etc.) If False, return systematic IUPAC name (unless retained name exists, which always takes priority)

Returns:

IUPAC systematic or common name for the xanthine derivative, None if molecule is not a known xanthine.

Return type:

str | None

Examples

>>> mol = Chem.MolFromSmiles('O=c1[nH]c(=O)c2[nH]cnc2[nH]1') # xanthine
>>> get_xanthine_name(mol)
'xanthine'
>>> mol = Chem.MolFromSmiles('Cn1cnc2c1c(=O)n(C)c(=O)n2C') # caffeine
>>> get_xanthine_name(mol)
'1,3,7-trimethyl-3,7-dihydro-1H-purine-2,6-dione'
>>> get_xanthine_name(mol, use_common=True)
'caffeine'
orthonym.data.xanthine_derivatives.get_xanthine_info(mol)#

Get full information about a xanthine derivative.

Parameters:

mol (Mol) – RDKit molecule object

Returns:

Dict with all xanthine data (systematic_name, common_name, n_positions, n_substituents, indicated_h, saturation, parent), or None if not a known xanthine.

Return type:

Dict[str, Any] | None

Examples

>>> mol = Chem.MolFromSmiles('Cn1cnc2c1c(=O)n(C)c(=O)n2C') # caffeine
>>> info = get_xanthine_info(mol)
>>> info['n_positions']
[1, 3, 7]
orthonym.data.xanthine_derivatives.get_xanthine_n_positions(mol)#

Get N-substitution positions for a xanthine derivative.

Parameters:

mol (Mol) – RDKit molecule object

Returns:

List of N-positions that are substituted (e.g., [1, 3, 7] for caffeine), or None if not a known xanthine.

Return type:

List[int] | None

orthonym.data.xanthine_derivatives.is_xanthine_derivative(mol)#

Check if a molecule is a known xanthine derivative.

Parameters:

mol (Mol) – RDKit molecule object

Returns:

True if molecule is a known xanthine derivative

Return type:

bool