orthonym.validation.cip_dialect#

Note

Internal API. Names and behaviour may change between releases.

A stereo name whose OPSIN reading differs from the input only where OPSIN ranks a mancude ring without averaging.

“Mancude rings and ring systems” (the Blue Book): “For mancude heterocycles, each duplicate atom is

given an atomic number that is the mean of what it would have if the double bonds were located at each of the possible positions.” The CIP engine of record (centres, perception/centres_bridge.py) applies that rule; OPSIN 2.9.0 does not (the OPSIN maintainer, dan2097/opsin#349, 2026-10-31: “a lack of support for atomic number averaging in mancude rings in OPSIN’s CIP implementation”). At a stereo unit whose ranking that rule decides, OPSIN gives the input’s configuration the other letter, so a correct name reads back as the other stereoisomer at that unit, and the read-back declines it.

The judge,:func:cip_dialect_name, ships such a name at the best-effort tier only (the default tier keeps the decision of 2026-10-31 to decline it), when the disagreement is proven to be exactly that rule:

  1. D = the stereo units whose label of record differs from the centres label with the averaging turned off on every ring atom (_dialect_mol: the held-atom input of centres_bridge._centres_input for every ring atom, a formal charge one higher in the string centres labels; is the only rule that reads it). D must not be empty.

  2. N’ is the flat name with each descriptor at the front of the part it relates to, placed by rules.prefix_stereo with the letters OPSIN reads right (the record’s, swapped at each unit of D); N cites the same places and locants with the record’s letters, built by construction.

  3. N and N’ differ in exactly |D| letters, each the swapped letter of a unit of D.

  4. OPSIN reads N’ to the input’s full InChIKey, with the radical graph, the protonation site and the key-blind double bonds checked (namer._shipped_name_round_trip), and gives no ambiguity warning for it.

  5. rdCIPLabeler gives the label of record at every unit of D: the judge removes OPSIN’s cross-check exactly at D, so another labeller holds it there.

Then N denotes the input under the ranking of record and OPSIN’s reading differs only by the rule it lacks. The name is labelled systematic_verified with the gate outcome cip_dialect_verified (never a PIN label).

orthonym.validation.cip_dialect.dialect_units(mol)#

{unit: label of record} for the units whose label of record and dialect label are both set and differ (D), given mol labelled by the path of record (perception.stereo.assign_stereochemistry); None when the dialect labels cannot be computed.

orthonym.validation.cip_dialect.stereo_locants_once(name)#

True when no locant stands twice in a stereodescriptor block of name: ‘(2S,2S,2S)-’ cites three units at one locant (substituents numbered apart), and OPSIN would give the letters by the order it reads them, so the reading of such a name, and of its twin, rests on that order.

orthonym.validation.cip_dialect.cip_dialect_name(flat_name, smiles)#

(N, "<count>_units") with N (the name of smiles with its stereo of record composed on flat_name at OPSIN’s numbering) when the judge of this module proves that OPSIN reads it otherwise only by the missing averaging; else None.