orthonym.rules.radicals#

Note

Internal API. Names and behaviour may change between releases.

Radical naming rules per IUPAC 2013.

Handles naming of: - Monovalent radicals: -yl suffix (methyl, ethyl, phenyl) - Divalent radicals: -ylidene suffix (methylidene, ethylidene) - Trivalent radicals: -ylidyne suffix (methylidyne) - Acyl radicals: -oyl suffix (acetyl, benzoyl) - Oxyl radicals: -oxyl suffix (methoxyl, phenoxyl)

IUPAC 2013 References: -: Radical nomenclature

Key naming patterns: - Monovalent alkyl radicals: alkane - H -> alkyl (methyl, ethyl) - Divalent alkylidene radicals: methane -> methylidene - Trivalent alkylidyne radicals: methane -> methylidyne - Acyl radicals: acid - OH -> -oyl (acetyl from acetic) - Oxyl radicals: R-O. -> R-oxyl (methoxyl from methanol)

orthonym.rules.radicals.classify_radical(mol, radical_site)#

Classify radical type based on the radical center environment.

Examines the local chemical environment of the radical atom to determine the appropriate naming approach.

Parameters:
  • mol – RDKit Mol object

  • radical_site (Dict[str, Any]) – Dictionary from get_radical_sites containing: - atom_idx: int - n_electrons: int (1, 2, or 3) - element: str - radical_type: str (‘monovalent’, ‘divalent’, ‘trivalent’) - hybridization: str

Returns:

Dictionary with –

  • ‘n_electrons’: 1, 2, or 3

  • ’radical_type’: ‘monovalent’, ‘divalent’, ‘trivalent’

  • ’subtype’: ‘alkyl’, ‘acyl’, ‘oxyl’, ‘aryl’, or ‘generic’

Return type:

Dict[str, Any]

Example

>>> mol = Chem.MolFromSmiles('[CH3]')
>>> sites = get_radical_sites(mol)
>>> classify_radical(mol, sites[0])
{'n_electrons': 1, 'radical_type': 'monovalent', 'subtype': 'alkyl'}
orthonym.rules.radicals.get_radical_suffix(n_electrons)#

Return suffix based on radical electron count.

Parameters:

n_electrons (int) – Number of unpaired electrons (1, 2, or 3)

Returns:

Suffix string – ‘yl’ for 1, ‘ylidene’ for 2, ‘ylidyne’ for 3

Return type:

str

Example

>>> get_radical_suffix(1)
'yl'
>>> get_radical_suffix(2)
'ylidene'
>>> get_radical_suffix(3)
'ylidyne'
orthonym.rules.radicals.name_alkyl_radical(mol, radical_site)#

Name an alkyl radical (R.) via the route_charged chokepoint.

169.6-03: delegates to route_charged (neutralize the radical center -> re-enter the full pipeline -> re-apply the -yl/-ylidene/-ylidyne suffix), replacing the old carbon-counting body. Returns the radical name (e.g. ‘methyl’, ‘propyl’) or ‘’ on fall-through.

Parameters:
  • mol – RDKit Mol object

  • radical_site (Dict[str, Any]) – Dictionary from get_radical_sites (kept for API stability)

Example

>>> mol = Chem.MolFromSmiles('[CH3]')
>>> sites = get_radical_sites(mol)
>>> name_alkyl_radical(mol, sites[0])
'methyl'
orthonym.rules.radicals.name_acyl_radical(mol, radical_site)#

Name an acyl radical (RC.=O).

Acyl radicals are derived from carboxylic acids by loss of -OH. Named with -oyl suffix (e.g., acetyl from acetic acid).

Parameters:
  • mol – RDKit Mol object

  • radical_site (Dict[str, Any]) – Dictionary from get_radical_sites

Returns:

Acyl radical name (e.g., ‘acetyl’, ‘propanoyl’, ‘benzoyl’)

Return type:

str

Example

>>> mol = Chem.MolFromSmiles('C[C]=O')
>>> sites = get_radical_sites(mol)
>>> name_acyl_radical(mol, sites[0])
'acetyl'
orthonym.rules.radicals.name_oxyl_radical(mol, radical_site)#

Name an oxyl radical (RO.) or a peroxyl radical (ROO.).

Oxygen-centered radicals named as R-oxyl for the small retained set of UNSUBSTITUTED R groups (methoxyl/ethoxyl/phenoxyl/propoxyl/…/hexoxyl), or per method (1) as (R)oxyl/R-peroxyl – the VERIFIED PIN form (“Method (1) generates preferred IUPAC names”, the Blue Book) – when R itself carries a further substituent, via _compose_oxyl_name. A2 generalisation: the R group is named through the existing substituent-naming pipeline instead of being collapsed to the unsubstituted retained form (the pre- bug: any aromatic-O radical mapped unconditionally to ‘phenoxyl’, dropping every ring substituent) or misnamed by a bare carbon count that ignored branching/unsaturation (A2 a review hardening, see _is_plain_alkyl_radical_fragment).

Parameters:
  • mol – RDKit Mol object

  • radical_site (Dict[str, Any]) – Dictionary from get_radical_sites

Returns:

Oxyl/peroxyl radical name (e.g., ‘methoxyl’, ‘phenoxyl’, ‘(4-hydroxyphenyl)oxyl’, ‘methylperoxyl’), or ‘’ if the R group cannot be named (fail-closed – never a wrong name).

Return type:

str

Example

>>> mol = Chem.MolFromSmiles('[O]C')
>>> sites = get_radical_sites(mol)
>>> name_oxyl_radical(mol, sites[0])
'methoxyl'
orthonym.rules.radicals.name_divalent_radical(mol, radical_site)#

Name a divalent (carbene-like) radical -> -ylidene, via route_charged.

169.6-03: delegates to the chokepoint (replacing the carbon-counting body).

Example

>>> mol = Chem.MolFromSmiles('[CH2]')
>>> sites = get_radical_sites(mol)
>>> name_divalent_radical(mol, sites[0])
'methylidene'
orthonym.rules.radicals.name_trivalent_radical(mol, radical_site)#

Name a trivalent (carbyne-like) radical -> -ylidyne, via route_charged.

169.6-03: delegates to the chokepoint (replacing the carbon-counting body).

Example

>>> mol = Chem.MolFromSmiles('[CH]')
>>> sites = get_radical_sites(mol)
>>> name_trivalent_radical(mol, sites[0])
'methylidyne'
orthonym.rules.radicals.name_aryl_radical(mol, radical_site)#

Name an aryl radical (Ar.).

Aromatic carbon-centered radicals.

Parameters:
  • mol – RDKit Mol object

  • radical_site (Dict[str, Any]) – Dictionary from get_radical_sites

Returns:

Aryl radical name (e.g., ‘phenyl’, ‘naphthyl’)

Return type:

str

Example

>>> mol = Chem.MolFromSmiles('[c]1ccccc1')
>>> sites = get_radical_sites(mol)
>>> name_aryl_radical(mol, sites[0])
'phenyl'
orthonym.rules.radicals.name_heteroatom_radical(mol, radical_sites, style='pin')#

Heteroatom-centred radical PINs (called from the route_charged chokepoint BEFORE its carbon-centric path so a heteroatom never gets a wrong Group-14 contraction):

  • / mononuclear parent-hydride radicals — azanyl, azanylidene, sulfanyl, boranyl, silyl, germyl,…

  • amine / imine / amide compound-suffix radicals — methanaminyl, propan-1-iminyl, formamidyl.

  • multiplicative poly-amine radicals — (ethane-1,2-diyl)bis(aminyl).

Returns ‘’ (fail-closed) for any carbon-centred or out-of-scope radical so the caller’s existing carbon path / name_radical helpers run unchanged.

orthonym.rules.radicals.name_radical(mol, style='pin')#

Generate IUPAC name for a radical species.

Workflow: 1. Get canonical SMILES 2. Check retained names (unless systematic style) 3. Detect radical sites 4. Classify radical type 5. Generate systematic name

Parameters:
  • mol – RDKit Mol object with radical center(s)

  • style (str) – Naming style (‘pin’, ‘systematic’, ‘common’)

Returns:

IUPAC name for the radical (e.g., ‘methyl’, ‘methylidene’)

Return type:

str

Example

>>> mol = Chem.MolFromSmiles('[CH3]')
>>> name_radical(mol)
'methyl'
>>> mol = Chem.MolFromSmiles('[CH2]')
>>> name_radical(mol)
'methylidene'