orthonym.validation.thioperoxol_twin#
Note
Internal API. Names and behaviour may change between releases.
A thioperoxol name read back through the spelling OPSIN reads of the same group.
OPSIN 2.9.0 has no grammar for the suffixes ‘-SO-thioperoxol’ (R-S-OH) and ‘-OS-thioperoxol’ (R-O-SH).
Until this module such a name shipped with no read-back at all (the thioperoxol grammar-gap
carve-out, which took any name that contained ‘thioperoxol’), and 52 of the 308 names the CO audit read
back through a check that does not use the producer were the name of another molecule: a CH2 dropped
between a ring and the suffix (C1CC1CSO named cyclopropane-1-SO-thioperoxol), five and six bonds
on one carbon, a CF2-PH2 group named difluorophosphanylmethyl, a second group the name does not cite,
a cation named as the neutral molecule.
The Blue Book gives the group two names and says which is which.
THE SUFFIXES ‘SO-THIOPEROXOL’, AND CHALOGEN ANALOGUES (the Blue Book): “The suffixes
SO-thioperoxol and its chalcogen analogues are now introduced to replace the suffix ‘sulfenic acid’ and
its chalcogen analogues that were discarded in the 1993 recommendations.” (:24322), ‘CH3-S-OH
methane-SO-thioperoxol (PIN) (not methanesulfenic acid)’ (:24326); (:27963), ‘CH3-SOH… (2)
S-methyl thiohydroperoxide (no longer methanesulfenic acid)’ (:27990). ‘X-sulfenic acid’ is a retired
spelling, not a PIN, and the book equates it with ‘X-SO-thioperoxol’: they name one structure. OPSIN reads
it (‘propane-1-sulfenic acid’ is CCCSO), and ‘X-sulfenate’ for the anion,:41035: ‘CH3-CH2-S-O-
ethane(SO-thioperoxolate) (PIN) (ethylsulfanyl)oxidanide (not ethanesulfenate; sulfenic acids are no longer
recommended; see ‘). The twin of <parent>-SO-thioperoxol is <parent>-sulfenic acid; the
parent, the locants, the prefixes and the stereodescriptors are the same string, so the read-back checks
them all, and the group -S-OH is the same in both spellings, so no CIP descriptor changes.
- OPSIN reads no retired or functional-class spelling of -O-S-H (‘O-propyl thiohydroperoxide’ is rejected,
(2)). Basic functional suffixes (:17456): “The suffix ‘peroxol’, for -OOH, has been
added to the list of basic suffixes. It is modified by functional replacement generating the suffixes
‘-OS-thioperoxol’ for -OSH, and ‘-SO-thioperoxol’ for -SOH.” (:17460), Table 6.1 (:27972): ‘-OS-thioperoxol’
is ‘peroxol’ with its second oxygen replaced by sulfur. The twin of <parent>-OS-thioperoxol is
<parent>-peroxol (OPSIN reads it: ‘propane-1-peroxol’ is CCCOO), read against the structure with the
sulfur of that group made an oxygen. The peroxol group marks WHICH oxygen group carries the sulfur, which
the alcohol (-O-S-H made -O-H) cannot: a hydroxy prefix and the suffix exchanged read to one structure. The
sulfur edit changes the CIP ranks of a stereocentre that carries the group only where the sulfur decided
the rank (an -OP versus an -OS branch); the twin then does not read to the input and the name is
declined, a loss and never a wrong name.
The twin proves the structure and never the spelling: the producer owns the spelling. 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.
The default tier ships the PIN spelling through its twin. A general tier (valid, complete,
best-effort) prefers a name OPSIN reads itself, as the other twin families do with
twin_spellings.pin_spellings_on (a wider tier spells the form OPSIN reads). The general engine names the
neutral group by the prefixes the book gives it where it is not the principal characteristic group,
‘(hydroxysulfanyl)methane’ for -S-OH and ‘(sulfanyloxy)methane’ for -O-S-H: Chalcogen analogues of
hydroperoxides (the Blue Book), “(1) by using prefixes such as ‘hydroperoxy’, –OOH; ‘disulfanyl’, –SSH, or by
combining simple prefixes, ‘hydroxy’ –OH; ‘oxy-’, –O–; ‘sulfanyl’, –SH; etc.” (:28005), the PIN examples
‘3-(sulfanyloxy)propanenitrile (PIN)’ (:28027) and ‘4-[(hydroxysulfanyl)methyl]benzoic acid (PIN)’ (:29962), the
glossary entries ‘hydroxysulfanyl (HO-S–)’ (:1810) and ‘sulfanyloxy (HS-O–)’ (:1812). OPSIN reads those names in
full, so such a name ships by the round trip of the name itself, and a neutral thioperoxol name that only its twin
reads is withdrawn at a general tier. The anion of -S-OH is the exception,:func:ships_at_general_tier: the engine
builds no name OPSIN reads for it (OPSIN reads ‘(ethylsulfanyl)oxidanide’,,:41035, but the engine
builds no such name), so a general tier ships it through its twin, in the one pass, as the default tier does. The PIN spelling
of a neutral name is also the safety net of a general tier: for a molecule that only the PIN path names it ships
through its twin inside:func:last_resort_scope (assembly.default_tier_offer.twin_last_resort_row), so that a
wider tier never names less than the default tier does.
A -O-S-H name is not read back when the input also holds a -OOH group: the peroxol twin reads the name that puts the
suffix on the other group as well (1-(hydroperoxy)propane-2-OS-thioperoxol for CC(OO)COS), (:17460).
An anion twin needs an [S-O-] in the input for each group the name cites: ‘ethanesulfenate’ is read for the ester
CCSOC too, and the book names that [(methylsulfanyl)oxy]ethane, ‘not ethyl methanesulfenate’ Mixed
chalcogen analogues of peroxides,:27900;:27912).
No twin: the anion of -O-S-H (OPSIN reads ‘peroxolate’ as the neutral peroxol, and no producer builds the anion); the ‘-ium’ names (no spelling of the cation is read, and the two audit rows were a protonation site the name did not state); the dithio- family (‘ethanedithioperoxol’, which OPSIN reads itself, so a name of it that OPSIN rejects is a name that is wrong); a multiplied suffix glued onto the italic descriptor (‘ethane-1,2-bisSO-thioperoxol’, the formatting defect); a name with the suffix twice.
- orthonym.validation.thioperoxol_twin.SULFENIC_RULE = 'thioperoxol_sulfenic'#
the rule ids of the two twin outcomes (
twin_verified:thioperoxol_sulfenic/..._peroxol)
- orthonym.validation.thioperoxol_twin.embedded_name()#
Scope of naming a component or skeleton that is joined into a name OPSIN reads whole: a mixture component (
rules.adducts, ‘ethanol—(hydroxysulfanyl)methane (1/1)’) and the isotope-stripped skeleton the isotope decorator labels (rules.isotopes,: every decorated candidate is read by OPSIN). The twin reads a whole name only and no OPSIN grammar reads the thioperoxol suffix, so a part named so would drop the whole name: inside this scope no twin ships and the part is named as before, by the general engine (‘(hydroxysulfanyl)methane’).
- orthonym.validation.thioperoxol_twin.last_resort_scope()#
Scope of the safety net of a general tier (
assembly.default_tier_offer.twin_last_resort_row): the twin of a neutral thioperoxol name is admitted in the validity gate, as at the default tier, so a molecule for which every other path of the tier found no name keeps the PIN spelling that its twin reads back.
- orthonym.validation.thioperoxol_twin.last_resort_active()#
Whether a call is inside:func:last_resort_scope.
- orthonym.validation.thioperoxol_twin.ships_at_general_tier(name)#
Whether a general tier ships the thioperoxol name
namethrough its twin: the anion of -S-OH (‘methane(SO-thioperoxolate)’), for which the engine has no other spelling, always, and a neutral name only inside:func:last_resort_scope: it gives way to the name OPSIN reads.
- class orthonym.validation.thioperoxol_twin.ThioperoxolTwin(name, rule, count, anion)#
Bases:
NamedTupleThe twin of a thioperoxol name: its text, the rule, the groups the suffix cites, whether anion.
- name: str#
Alias for field number 0
- rule: str#
Alias for field number 1
- count: int#
Alias for field number 2
- anion: bool#
Alias for field number 3
- orthonym.validation.thioperoxol_twin.thioperoxol_twin_outcome(outcome)#
Whether
outcomeis the gate outcome of a thioperoxol name read back through its twin (twin_verified:thioperoxol_sulfenic/twin_verified:thioperoxol_peroxol).
- orthonym.validation.thioperoxol_twin.thioperoxol_twin(name)#
The twin of the thioperoxol name
name, or None whennameis no well-formed one that has a twin (see the module docstring): the suffix replaced and nothing else.
- orthonym.validation.thioperoxol_twin.thioperoxol_twin_round_trip(name, smiles)#
The rule id of the twin of
namewhen OPSIN reads that twin once to the FULL InChIKey ofsmiles(the -S-OH rule) or ofsmileswith the cited -O-S-H sulfurs made oxygens (the -O-S-H rule); else None (no twin, a twin of another structure, an unavailable OPSIN, an ambiguous reading).