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.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 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.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.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, .