orthonym.rules.nitramide#

Note

Internal API. Names and behaviour may change between releases.

Substitutive N-nitro / nitramide naming (Milestone B3, Task 4).

BLUE BOOK AUTHORITY#

nitramide (H2N-NO2) exists in this tree ONLY as an exact-whole-molecule RETAINED name (data/opsin_imports/simple_groups.py:5679, merged into ALL_RETAINED_NAMES). Substitution of its amide nitrogen’s hydrogens is the SAME ** “N-Substitution”** pattern already built for sulfonamides (rules/sulfonamides.py) and thioimides (rules/thioimides.py):

“Substituted primary amides, with general structures such as R-CO-NHR’ and R-CO-NR’R’’… are named by citing the substituents R’ and R’’ as prefixes preceded by the locant N when one amide group is present.”

THE DEFECT THIS CLOSES#

Any SUBSTITUTED nitramide has a different canonical SMILES than the bare retained-table key and misses that table entirely – nothing downstream ever built the substitutive parent, so every N-substituted nitramide fell through to GENERAL/decomposition (which named a fragment, e.g. methanol for O=[N+]([O-])NCO, dropping the nitro-amide unit) and was suppressed by

to the unknown organic compound sentinel.

V36-a trace-B3 section 2 (“N-nitro” rows) verified every target form below OPSIN-round-trip-exact (full InChIKey match, constitution + charge).

TWO SHAPES BUILT HERE (fails closed on everything else – never a per-molecule special case) —————————————————————— 1. ``nitramide`` PARENT + N-substituent prefix(es). Exactly one

nitro-bearing amide nitrogen in the whole molecule, with 0-2 carbon-rooted substituents (mirrors sulfonamides._collect_n_substituents’s guard: an N-heteroatom substituent is a different construction and is refused):

O=[N+]([O-])NCO -> N-(hydroxymethyl)nitramide
O=[N+]([O-])N(CO)CO -> N,N-bis(hydroxymethyl)nitramide
  1. ``N,N’-dinitro<diamine>``. EXACTLY two nitro-bearing amide nitrogens, each with NO other substituent, both attached to the SAME bridging heavy atom which itself carries no other substituent (structurally forced to be a plain methylene bridge – the only real-witness shape verified):

    O=[N+]([O-])NCN[N+](=O)[O-] -> N,N'-dinitromethanediamine
    

    The structural guards (degree-2 carbon, both neighbours being the two qualifying amide N’s, non-aromatic, ring-free) leave exactly ONE possible parent hydride – methanediamine – so it is returned directly rather than re-entering the general naming pipeline (which does not yet build ANY gem-diamine parent, a separate pre-existing gap out of scope here; see _name_dinitro_diamine). Scoped NARROWLY to this one shape: a numeric-locant diamine (propane-1,3-diamine) would need superscripted N^1/N^3 dinitro locants that are not built here – fails closed rather than guess.

orthonym.rules.nitramide.name_substituted_nitramide(mol, style='pin')#

Return the substitutive nitramide/N-nitro PIN, else None.

N-(hydroxymethyl)nitramide, N,N-bis(hydroxymethyl)nitramide, N,N'-dinitromethanediamine. Fails closed on every shape outside the two documented in this module’s docstring.