orthonym.rules.lambda_convention#
Note
Internal API. Names and behaviour may change between releases.
Shared λ-convention (lambda) infrastructure — IUPAC / Table 2.8.
The λ-convention cites the non-standard bonding number of a skeletal atom
immediately after its locant, e.g. a tetravalent ring sulfur at locant 4 ->
4lambda4-thia (4lambda4-thiaspiro[3.5]nonane), or a hexavalent sulfur
mononuclear hydride -> hexafluoro-lambda6-sulfane (SF6).
This module is the single source of truth for the standard-bonding-number table
and the “is this valence non-standard?” decision. It was promoted verbatim from
rules/spiro.py so that the spiro numberer, the acyclic
skeletal-replacement namer, and the mononuclear-hydride / chalcogen /
halogen namers all share one fail-closed implementation rather than each
re-deriving Table 2.8.
References
IUPAC 2013 Blue Book, /3 (standard / nonstandard bonding number) IUPAC 2013 Blue Book, (λ placement: after the locant, no hyphen) IUPAC 2013 Blue Book, Table 1.5 (standard bonding numbers) [BBv2:6436] IUPAC 2013 Blue Book, (λ in chains / replacement nomenclature) IUPAC 2013 Blue Book, / (mononuclear hydrides bearing λ)
Fail-closed contract: a λ is emitted ONLY for a neutral atom present in
STANDARD_BONDING_NUMBER whose actual valence differs from its standard
value. Charged atoms and elements absent from the table are treated as standard
(no spurious λ — never invent a descriptor the namer cannot justify).
- orthonym.rules.lambda_convention.nonstandard_bonding_number(mol, atom_idx)#
Return the lambda bonding number for a skeletal atom whose valence is non-standard, or None when the valence is standard.
The bonding number is the total count of skeletal/H bonds (RDKit
GetTotalValence). It is emitted aslambda<n>immediately after the atom’s locant in the ‘a’-replacement prefix, e.g. a tetravalent ring sulfur at locant 4 ->4lambda4-thiaspiro example4lambda4-thiaspiro[3.5]nonane), or on a mononuclear hydride parent (no locant) ->hexafluoro-lambda6-sulfane(SF6, /.Fail-closed: only neutral atoms present in
STANDARD_BONDING_NUMBERcan carry a lambda; charged/exotic atoms return None (no spurious lambda).
- orthonym.rules.lambda_convention.radical_lambda_bonding_number(mol, atom_idx)#
The bonding number
nof theλnthat describes the radical centre atatom_idx, or None.“The λ-convention” (the Blue Book, sentence:40562): “Divalent and trivalent radical centers in a parent
hydride formally derived by the removal of two or three hydrogen atoms from the same skeletal atom in its standard valence state may be described by the λ-convention (see. Locants for the radical centers are followed by the symbol λ^n, where ‘n’ is the bonding number of the skeletal atom (see. This method is only for general nomenclature.” (dichloro-λ2-methane, fluoro-λ1-methane, phenyl-λ1-azane). The sentence licenses two and three removed hydrogens only: a monovalent radical centre (one electron) has no lambda here and returns None, as does a charged, aromatic or non-listed atom, and an atom whose bonds, hydrogens and unpaired electrons do not make up its standard bonding number (the atom is then not “in its standard valence state” less the hydrogens removed).
- orthonym.rules.lambda_convention.format_lambda_token(locant, lam)#
Format a locant (+ optional lambda) into the citation token.
format_lambda_token(4, 4)->"4λ4": the lambda follows the locant with no separator);format_lambda_token(4, None)->"4". Shared by the spiro numberer and the acyclic skeletal-replacement namer so the on-the-wire spelling is identical everywhere.
- orthonym.rules.lambda_convention.ring_lambda_valence(mol, atom_idx)#
The bonding number of an admitted ring halogen, or of a ring silicon (
RING_ION_LAMBDA_ELEMENTS), in the lambda state, else None.The mancude parent of a ring with a lambda halogen counts the atom as a ring atom with its own bonding number (
1H-1lambda3-iodole,, the Blue Book1H-1λ3-benziodole (PIN)): a ring double bond or a hydrogen takes the valences its two ring bonds leave.Nonefor every other atom (an acyclic halogen too), so a caller keeps the default valence of the periodic table there.
- orthonym.rules.lambda_convention.ring_halogen_ion(mol, atom_idx)#
'anion'or'cation'for an admitted ring halogen that is an ion of the simplest kind, elseNone: a ring atom ofFUSED_RING_LAMBDA_HALOGENSwhose bonds are all single, with no hydrogen, a formal charge of -1 or +1 and an even number of bonds, the two of the ring and the substituents of the centre (the iodanuide[I-]1CCCCC1,F[I-]1(F)CCCCC1; the iodoniumc1ccc2c(c1)[I+]c1ccccc1-2,C[I+]1(C)CCCCC1).Both ions are named from the same ring hydride, the one whose atom has one hydrogen more than the ion has bonds, so its bonding number is the number of bonds plus one (3 for two ring bonds, 5 for four), cited with the lambda convention. The anion is that hydride less a hydron: the suffix ‘ide’
method (2), the Blue Book,
diphenyl-lambda3-iodanide:41110: “the suffix ‘ide’ to a parenthydride in which the bonding number at the anionic site is higher than the standard bonding number and is expressed by the lambda-convention”; ‘1lambda3-iodinan-1-ide’ and ‘1,1-difluoro-1lambda5-iodinan-1-ide’ are read by OPSIN as the ring anions). The cation is that hydride less a hydride ion: the suffix ‘ylium’
“Application of the lambda-convention with the suffix ‘ylium’”,:41694: “Cationic heterocycle
having a cationic center on a heteroatom that has one more skeletal bonds than it has in the corresponding neutral heterocycle is named by adding the suffix ‘ylium’ to the name of the neutral parent hydride for which the lambda-convention has been used to describe a nonstandard bonding state of the heteroatom, and that heteroatom has at least one hydrogen atom in the neutral heterocycle on which the ‘ylium’ suffix can operate”; the book prints ‘1lambda3-benziodol-1-ylium (PIN)’,:41708; OPSIN reads ‘1lambda3-iodinan-1-ylium’ as the ring cation).
nonstandard_bonding_numberisNonefor both, as it is for every ion; seering_halogen_ion_lambdafor the symbol the name cites.
- orthonym.rules.lambda_convention.ring_halogen_ion_lambda(mol, atom_idx)#
The bonding number the lambda symbol cites in the name of a ring halogen ion (
ring_halogen_ion): that of the hydride the ion is named from, its bonds and one hydrogen (3 for the two ring bonds of[I-]1CCCCC1and of[I+]1CCCCC1alike).
- orthonym.rules.lambda_convention.fused_lambda_entries(mol, ring_atoms, atom_to_locant)#
[(numeric locant, bonding number),...]ascending, for the nonstandard-bonding atoms of a fused ring system under the numberingatom_to_locant;Nonewhen the name cannot cite one: a lambda on skeletal carbon, or on an atom with no numeric locant (a fusion atom, ‘4a’).(the Blue Book): the symbol “follows the locant of the atom with the
nonstandard bonding number in accordance with the numbering of the fused system”; a name without it would denote a different molecule, so the caller declines.
- orthonym.rules.lambda_convention.HETERONE_RING_ATOMS = frozenset({'As', 'Bi', 'Br', 'C', 'Cl', 'I', 'P', 'S', 'Sb', 'Se', 'Te'})#
carbon, and the atoms that take the lambda state with it, HETERONES:29384); a ring nitrogen =O is not a heterone here
- Type:
the ring atoms whose =O is a ketone or heterone suffix (‘one’)
- orthonym.rules.lambda_convention.merge_lambda_into_benzo_locants(name, mol, ring_atoms, atom_to_locant)#
namewith each lambda token cited at its locant in the heteroatom locants that begin a benzo name, or None whennamedoes not begin with such locants or a lambda atom is not among them: ‘1λ4,5-benzodithiepine (PIN)’ (BlueBookV2.md:3326), ‘2,1λ5-benzoxabismole’ (:39307); a bracketed fusion name keeps the tokens at its front (P-25.3.2.5.2, ‘5λ5-phosphinino[2,1-d]phosphinolizine (PIN)’).
- orthonym.rules.lambda_convention.fused_lambda_name_and_prefix(name, mol, ring_atoms, atom_to_locant)#
(name, lambda prefix): the benzo name with its lambda tokens merged into its heteroatom locants and''(merge_lambda_into_benzo_locants), elsenameandfused_lambda_prefix(None: the name is declined).
- orthonym.rules.lambda_convention.fused_lambda_prefix(mol, ring_atoms, atom_to_locant)#
The lambda tokens cited at the beginning of a fused name,
'1λ4-'or'1λ4,3λ4-';''when no ring atom has a nonstandard bonding number;Nonewhen the name must be declined (seefused_lambda_entries).: the tokens “are cited at the beginning of the name of the fused ring system”, after any indicated hydrogen (1H-1λ4-thiophene, .
- orthonym.rules.lambda_convention.ionic_lambda(atom)#
The
nof the λn hydride whose ‘ium’ or ‘uide’ ion the chargedatomis, or None when an ion of its standard hydride holds its bonds or no λ hydride does.The ion holds the atom’s bonds, hydrogens and radical electrons together; the hydron or hydride ion of ‘ium’ or ‘uide’ adds one to the hydride’s bonding number, so
nis that count less one. P-14.1.3 “Nonstandard bonding numbers” (BlueBookV2.md:2756) cites a nonstandardnas λn, and the ion keeps it: P-73.1.1.2 “General rule for systematically naming cationic centers in parent hydrides”, ‘tetrafluoro(methyl)- λ4-sulfanium (PIN)’ (:41384). An anion is the ‘uide’ of its standard hydride where that holds its bonds (P-72.3 “Anions formed by addition of hydride ions”, ‘tetramethylphosphanuide (PIN) tetramethyl-λ5-phosphanide’, :41106), sonis above the standard bonding number, by an even count.
- orthonym.rules.lambda_convention.lambda_ion_name(atom, block, ion)#
The name
block+ionof a mononuclear ion (ion‘sulfanium’, ‘sulfaniumyl’, the substituent prefixesblock), with the λ of:func:ionic_lambda when the atom has one: ‘tetramethyl-λ4-sulfaniumyl’, the hyphen before the λ as in ‘methyl-λ6-sulfane (PIN)’,:2761). The book’s λ ions have single bonds only (‘tetrafluoro(methyl)-λ4-sulfanium (PIN)’); with a double bond the cation of a characteristic group takes another hydride (‘(1,4-phenylene)bis(dioxo-λ6-sulfanylium) (PIN)’,,:42174), so a λ ion with a multiple bond is recorded as not the PIN.