orthonym.validation.uide_twin#

Note

Internal API. Names and behaviour may change between releases.

A halogen -uide name read back through the Blue Book’s method (2) spelling of the same anion.

OPSIN 2.9.0 has no grammar for a SUBSTITUTED halogen -uide token: ‘diphenyliodanuide’ is rejected (“unphysical valency state”) although the bare ‘iodanuide’ reads to [IH2-]. Until this module the name shipped with no read-back at all (the halogen_uide grammar-gap carve-out), and 111 of the 349 names the default tier gave the small PubChem halogen anions were the name of another molecule.

ANIONS FORMED BY ADDITION OF HYDRIDE IONS (the Blue Book) names such an anion two ways:

“(1) the suffix ‘uide’ describes an anion formally derived by adding a hydride ion, H-, to a parent hydride name” (:41093); “(2) by adding the suffix ‘ide’ to a parent hydride in which the bonding number at the anionic site is higher than the standard bonding number and is expressed by the lambda-convention; the net effect of which is the addition of a hydride ion, H-, to the parent hydride with its standard bonding number” (:41094); “Method (1) leads to preferred IUPAC names.” (:41098). The book prints both spellings of one anion: ‘diphenyliodanuide (PIN) diphenyl-lambda3-iodanide’ (:41110) and ‘F6I- hexafluoro-lambda5-iodanuide (preselected name) hexafluoro-lambda7-iodanide’ (:41112). OPSIN reads the method (2) spelling, to the charged structure itself.

The twin of <prefixes>iodanuide is <prefixes>-lambda3-iodanide. The prefixes are the same string and only the parent token changes, so the two spellings name one anion if the lambda number is the one method (2) pairs with a name that carries none: the parent hydride of an unmarked -uide name has its STANDARD bonding number s (1 for I, Br, Cl: rules.ions._UIDE_STD_VALENCE), the hydride ion adds one bond, so the anionic site holds s + 1, and method (2) reaches that anion from the parent of bonding number s + 2 (3 for the halogens), by removing a proton. That number is read from the element of the parent token and is not taken from the input structure: a name without a lambda describes an anion whose centre holds s + 1 bonds, and the read-back is what decides whether the structure is one. (A number taken from the structure would accept tetramethyliodanuide for I(CH3)4-, whose centre holds four bonds, by adapting the twin to the structure; the unmarked name does not describe that anion.)

The twin proves the structure and never the spelling: the producer owns the spelling (rules.centre_ligands and mononuclear_hydrides._build_mixed_substituent_string). A name ships through its twin when OPSIN reads the twin to the FULL InChIKey of the input (namer._shipped_name_round_trip) and gives no APPEARS_AMBIGUOUS warning for it, as the other twin families do (validation.twin_spellings). The twin is never shipped.

orthonym.validation.uide_twin.UIDE_TWIN_RULE = 'uide_lambda'#

the rule id of the twin outcome (twin_verified:uide_lambda)

orthonym.validation.uide_twin.uide_twin_outcome(outcome)#

Whether outcome is the gate outcome of a name a general tier ships although OPSIN cannot read it. Despite its name the predicate is not the halogen -uide family’s alone (a rename would touch three code lines of namer: the import and the two exit checks that read it): it answers for every family a general tier ships without a full-key round trip of the name itself, and the exit checks of namer pass these outcomes:

  • a halogen -uide name read back through its twin (twin_verified:uide_lambda) and an additive organometallic name with halido ligands (twin_verified:halido_o): no OPSIN grammar reads these names at any tier, and the other twin families spell the form OPSIN reads there;

  • a thioperoxol name read back through its twin (twin_verified:thioperoxol_..., validation.thioperoxol_twin): the anion of -S-OH at every general tier, a neutral name only as the safety net of a molecule that only the PIN path names (assembly.default_tier_offer.twin_last_resort_row);

  • a phane name whose structure validation.phane_read_back builds from the name and finds to be the input’s (carveout:phane, recorded by namer.Orthonym._last_resort_list_name for such a name only: at a general tier the gate withdraws a phane name).

orthonym.validation.uide_twin.uide_twin(name)#

The method (2) spelling of the halogen -uide name name, or None when name is no such name (a bare ‘iodanuide’ has no prefixes and OPSIN reads it as it stands).

orthonym.validation.uide_twin.uide_twin_round_trip(name, smiles)#

UIDE_TWIN_RULE when the twin of name reads to the FULL InChIKey of smiles and OPSIN reads it once; else None (no twin, a twin of another structure, an unavailable OPSIN, an ambiguous reading).