orthonym.rules.oxoacid_group_prefix#

Note

Internal API. Names and behaviour may change between releases.

Substituent prefixes for mononuclear P and S oxoacid groups, read from the structure.

A group whose central atom is phosphorus or sulfur and that carries a terminal =O (=S on phosphorus) is cited as a substituent prefix built from the acyl group of the acid and the prefixes of its ligands “Compound and complex substituent groups”, the Blue Book;,:36484; “Substituent groups derived from polyacids”,:36937). The central atom is never a skeletal ‘a’ atom of a chain: a phosphate or sulfonate written as ‘2-oxa-1-phosphaethyl’ is a valid but unpreferred spelling,:6465: a chain is not terminated by O).

oxoacid_group_prefix(mol, frag_atoms, attach_idx, name_r) returns the prefix or None (fail closed: every atom of frag_atoms must be consumed by the group and the R subtrees its ligands carry).

Acyl groups built (central atom X, ligands L):

S(=O)(=O)(OH) sulfo S(=O)(=O)(O-) sulfonato S(=O)(OH) sulfino S(=O)(O-) sulfinato S(=O)(=O)(NH2) sulfamoyl S(=O)(=O)(OR) (alkoxy)sulfonyl S(=O)(=O)(hal) (halo)sulfonyl S(=O)(OR) (alkoxy)sulfinyl P(=O)(OH)2 phosphono P(=O)(O-)2 phosphonato P(=O)(L)(L’) L(L’)phosphoryl P(=S)(L)(L’) L(L’)phosphorothioyl

The nitrogen of a sulfamoyl group carries its substituents “in the normal way”, the Blue Book;,:32928, for carbamoyl): carbon groups, a hydroxy or alkoxy group (‘methoxy(methyl)sulfamoyl’) or one ylidene group (‘[(dimethylamino)methylidene]sulfamoyl’). A nitrogen that carries a second nitrogen is the hydrazide group, ‘hydrazinesulfonyl’ and ‘hydrazinesulfinyl’,:33980), with the locants of its substituents (‘2,2-dimethylhydrazine-1-sulfonyl’).

The attachment may be the central atom (the acyl prefix itself) or an O or NH that links it to the parent (‘sulfooxy’, ‘phosphonooxy’, ‘[(methoxysulfonyl)oxy]’, ‘sulfoamino’). A ligand that is an -O-P or -O-S group is cited as that group’s acyl prefix plus ‘oxy’ method (1),:36943).

orthonym.rules.oxoacid_group_prefix.ps_tier_ctx = <ContextVar name='orthonym_ps_tier' default=False>#

Orthonym(general_fallback=True)) runs. general_fallback_ctx is reset inside the isolated naming sessions of the fragment recursion, so the P/S prefixes would stop at the first nested fragment; this variable is published with it (namer.Orthonym.name) and is not reset there. A default-tier call and the strict twin publish False, so the PIN path never gives these prefixes.

Type:

True while a wider-tier call (complete / best-effort

orthonym.rules.oxoacid_group_prefix.has_replacement_chain(name)#

True if name carries a skeletal (‘a’) replacement term with its locant (‘2-oxa’, ‘1-phospha’, ‘3,5-dioxa’).

orthonym.rules.oxoacid_group_prefix.group_shape_ok(mol, j)#

True if the centre j has the exact shape _acyl can name, whichever of its single-bonded neighbours is the bond towards the parent: no H, no stereo tag, only terminal neutral =O (=S on P), the oxo and ligand counts of the acid, and ligands from the set _ligand names (an N-N, isocyano or isocyanato ligand is not one). The answer is cached on the molecule.

orthonym.rules.oxoacid_group_prefix.is_oxoacid_centre(mol, j)#

A P or S oxoacid centre whose group the leaf can name (group_shape_ok): the one predicate of the spine exclusion and of the namer, so an atom is kept off the chain spine only where a prefix names it.

orthonym.rules.oxoacid_group_prefix.is_oxoacid_linker(mol, j)#

A divalent O, S or NH joining an oxoacid centre to one other heavy atom.

orthonym.rules.oxoacid_group_prefix.oxoacid_group_prefix(mol, frag_atoms, attach_idx, name_r=None)#

The prefix of the group (see oxoacid_group_prefix_ex), or None.

orthonym.rules.oxoacid_group_prefix.oxoacid_group_prefix_ex(mol, frag_atoms, attach_idx, name_r=None, stereo_ok=False)#

(prefix, preferred): the prefix of the P/S oxoacid group, or (None, True).

A compound prefix that carries no enclosing mark of its own (‘methoxysulfonyl’, ‘sulfonatooxy’) is returned enclosed, as the Blue Book cites it: ‘3-[(dimethoxyphosphoryl)sulfanyl]propanoic acid (PIN)’, the Blue Book. The retained one-word prefixes stay bare.

preferred is False when the spelling is not the preferred one, so the caller labels a name that holds it below the PIN (record_non_pin_label): a P-C, P-halogen or P-N ligand (phosphonoyl, phosphinoyl, phosphorodichloridoyl, phosphoramidoyl prefixes, -.5,:36166,:36178,:36244), a thio-ester ligand, ‘-P(S)(OH)2’ (thiophosphono), method (1) of where method (2) applies (:36949), and an acid function left on the centre of a compound prefix (whether such a group may be a prefix depends on the parent’s principal group,,:36327).

stereo_ok: the caller cites the descriptor of a stereogenic centre of the group (the S of a sulfinamide) at the front of the prefix, so a group with such a centre is built, and its prefix is returned without enclosing marks (the caller puts them round the descriptor and the prefix). Without it a group with a stereogenic centre is declined.

orthonym.rules.oxoacid_group_prefix.note_ps_form(token, preferred)#

A producer gave this P/S group prefix in place of its ‘a’ chain: record the book form (so the mechanical retry exists) and, when the spelling is not the preferred one, the label-only non-PIN record (a name that holds token is labelled below the PIN). The one place the lane reports a form to the retry ladder.