orthonym.assembly.handlers.nitrile_oxide#
Note
Internal API. Names and behaviour may change between releases.
/2 neutral nitrile-chalcogenide functional-class suffix handler (W2F p4).
A neutral nitrile oxide R-C#[N+]-[O-] is named by functional-class method (1)
of — the separate word oxide appended to the nitrile name
(benzonitrile oxide the Blue Book, acetonitrile oxide the Blue Book, formonitrile
oxide the Blue Book), which IS the preferred IUPAC name. Nitrile oxides are “classed
with zwitterions in the order of compound classes”, so they are senior
to acids/esters — a co-present ester/acid demotes to a prefix.
The heavier chalcogen analogues R-C#[N+]-[S-] / [Se-] / [Te-] are named
the same way, substituting the chalcogen word for oxide:
acetonitrile sulfide / acetonitrile selenide / acetonitrile telluride.
Only the appended word changes; the nitrile parent is derived identically.
Fires ONLY for a NEUTRAL molecule (net formal charge 0). The deprotonated
salt/anion uses the (oxo-λ5-azanylidyne)methyl PREFIX path
(benzene.py::_nitrile_oxide_prefix, gated on GetFormalCharge < 0) — the two
never double-fire.
Mechanism (research ring-suffix-trio §: strip the [O-] +
neutralise the N -> plain nitrile SMILES; re-name it with the nitrile forced as the
principal group (the charged_router._reenter_forced pattern); append
" oxide". Fail closed (return None) when the nitrile parent cannot be named as a
...nitrile (a senior-group leak, e.g. the acid -> 4-cyanobenzoic acid) or
when the nitrile-bearing ring is AROMATIC but got mis-named as a saturated
carbocycle. The BB ester PIN 4-(methoxycarbonyl)benzonitrile oxide stays a
buildable follow-on: it needs the aromatic-benzene forced-nitrile fix in
_assemble_ring_nitrile_name AND enclosing marks for the (methoxycarbonyl)
compound prefix, a general substituent-rendering feature).
Registered in inner_dispatch at priority 975 (specialty-intercept tier, before the
acid/ester handlers so the senior nitrile oxide wins) — predicate-pure +
direct-return + pool.add + _inject_stereo_if_missing (side_effect
inventory ).
- orthonym.assembly.handlers.nitrile_oxide.name_nitrile_oxide(features, mol=None, style='pin')#
Emit
<nitrile-name> oxidemethod (1)) for a neutral nitrile oxide. Returns None (defer/fail closed) when the nitrile parent cannot be faithfully named.