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.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.ionic_parent_hydride(atom, bonding_number)#
The ionic parent hydride, the Blue Book-43422,, that the charged
atomis a radical centre of, or ‘’.bonding_numberis the bonds the atom holds, its hydrogens and its radical electrons together, against the standard bonding number of its hydride: an anion that holds one more is the ‘uide’ of the hydride (‘boranuide’, ‘iodanuide’), one that holds one less its ‘ide’ (‘azanide’, ‘silanide’); a cation that holds one more is its ‘ium’ (‘azanium’, ‘oxidanium’), one that holds one less its ‘ylium’ (‘methylium’, ‘silylium’, ‘azanylium’). The name keeps the final ‘e’ of an ‘ide’ or ‘uide’ (the caller elides it before ‘yl’,.
- orthonym.rules.radicals.radical_ion_parent_hydride(atom)#
The ionic parent hydride of the radical ion
atom(P-75.2 “RADICAL IONS DERIVED FROM PARENT HYDRIDES”, BlueBookV2.md:43422: the radical ion is named by adding ‘yl’ to the name of its ionic parent hydride), or ‘’. The λ of a hydride with a nonstandard bonding number is not part of it (lambda_ion_namecites it).The hydride holds the atom’s bonds, hydrogens and radical electrons together (
ionic_parent_hydride): a phosphorus anion with three bonds and a radical electron is the ‘yl’ of phosphanuide (‘tetramethylphosphanuide (PIN)’, P-72.3 “Anions formed by addition of hydride ions”, :41106), not of phosphanide, which has one hydrogen left to substitute. An atom that holds more than any ion of its standard hydride is the ‘ium’ or ‘uide’ of the λn hydride (lambda_convention.ionic_lambda): a sulfur cation with four bonds and a radical electron is the ‘yl’ of λ4-sulfanium, ‘tetramethyl-λ4-sulfaniumyl’.
- orthonym.rules.radicals.radical_ion_is_empty_orbital_cation(atom)#
True for a cation that RDKit counts two radical electrons on: the EMPTY orbital of an ‘-ylium’ cation (C[O+], [NH2+], c1ccccc1[S+]), a cation and not a radical ion, which no read-back can tell apart from one.
- 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).
/ substituted B / Al / Ga / Si / Ge / Sn / Pb / P / As / Sb centres — methyl(phenyl)boranyl, (oxolan-2-yl)boranylidene, dimethylsilyl, whatever the rest of the molecule holds (
_name_substituted_centre_radical).
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'