orthonym.validation.anhydride_acids#
Note
Internal API. Names and behaviour may change between releases.
A di- or polyanhydride name read back through its acids.
OPSIN 2.9.0 has no grammar for the class words of a poly-anhydride: it rejects diacetic butanedioic
dianhydride (“Unexpected number of words in anhydride”) and the multiplied chalcogen word of
diacetic butanedioic bis(thioanhydride). Until this module such a name shipped with no read-back at all
(the dianhydride and chalcogen_dianhydride grammar-gap carve-outs), and 116 of the 208 names the
default tier gave for the PubChem rows that reach the carve-out were the name of another molecule (an acid
residue named as a chain: a hydroxy group, a double bond, a ring or a stereo centre of it lost).
Di- and polyanhydrides (the Blue Book): “Di- and polyanhydrides have two or more
-CO-O-CO- or related groups, such as -SO2-O-SO2-, respectively. They are named using the class name ‘dianhydride’, ‘trianhydride’, etc., preceded by the names of the acid groups cited as separate words.”
Mixed anhydrides (:32253) cites an acid “without the class name ‘acid’”, so each word of the name is
an acid name without its ‘acid’, and OPSIN reads <word> acid. (:32380) cites the acid groups
“in their order of occurrence in the structure… The numerical prefix ‘di-’ is used”, ‘diacetic butanedioic
dianhydride (PIN)’ (:32386); (:32443) gives the chalcogen analogues ‘bis(thioanhydride)’
(‘diacetic butanedioic bis(thioanhydride) (PIN)’,:32446); (:36925) ‘tetraacetic hypodiphosphoric
tetraanhydride (PIN)’ (:36933) names the anhydrides of a polynuclear non-carbon oxoacid with the same words.
The name is read back as follows, with nothing taken from the producer of the name.
Each word is split into a multiplier and an acid name in every way the multiplier spellings allow (
bis(X),di(X),diXand the word as it stands), and OPSIN reads<acid> acidto a structure (and reads it once: noAPPEARS_AMBIGUOUSwarning, Citation of locants,:2869).The input is split at each of its anhydride links, an oxygen (or chalcogen) atom between an acyl carbon and a second acyl or oxoacid centre, into the acids it would give by hydrolysis; the acids of the reading and these must be the same set (full InChIKeys, so a lost stereo centre or double bond shows here), and the number of links and the bridge element must be the ones the class word gives.
The poly-anhydride is built from the acids of the reading, every way the acids can be joined into a tree with one link between two acid groups (an OH of each, lost) and a bridge atom of the class word, and each of these structures must have the FULL InChIKey of the input. A name that several structures answer to (an unsymmetrical diacid between two different acids, with no locants to say which way round it lies) is no proof of the input: it is not verified.
The descriptors of each acid, labelled as a free acid, must be those the same atoms have in the whole structure (
perception.stereo.assign_stereochemistry;, the Blue Book): a word that states the free-acid configuration of an atom the link makes another configuration is the name of the same structure with a wrong descriptor, and it is not verified.
A name ships when the check holds; the check proves the structure and never the spelling (the order of the words, the multiplier spelling and the PIN status belong to the producer and to the label rules).
- orthonym.validation.anhydride_acids.ANHYDRIDE_ACIDS_RULE = 'anhydride_acids'#
the rule id of the check’s outcome (
acid_split_verified:anhydride_acids)
- orthonym.validation.anhydride_acids.is_poly_anhydride_name(name)#
Whether
namehas the words of a di- or poly-anhydride name: two or more acid words and a class word.
- orthonym.validation.anhydride_acids.anhydride_acids_round_trip(name, smiles)#
ANHYDRIDE_ACIDS_RULEwhen the poly-anhydridenamereads back to the FULL InChIKey ofsmilesthrough its acids (module docstring), else None: no such name, an acid OPSIN does not read or reads as ambiguous, a different structure, or a name more structures answer to. Any failure of the read-back is no verification.