orthonym.assembly.handlers.diamide#
Note
Internal API. Names and behaviour may change between releases.
D3 chain_diamide handler — acyclic diamide with N-substituents.
Intercepts the mixed primary + N-substituted (and symmetric) acyclic diamide class BEFORE ester_family / the polyfunctional path, which otherwise double-count the terminal secondary amide (-> ‘unknown’) or sweep the N-alkyl carbons into pg_atom_set and drop them (principal_group_branch_overlap -> wrong molecule).
Dispatched at inner_dispatch priority 1490 (just before ester_family). The predicate is TIGHT (exactly 2 amide groups, both carbonyl carbons at chain ends) so it never intercepts mono-amides, diacids, esters, or triamides. When the diamide has no N-substituents (symmetric primary, e.g. butanediamide) the handler returns the same plain parent name the general_acyclic path produced.
IUPAC cite: (acyclic diamide parent) / (N{locant} substituent prefixes).
References: - rules/amides.py::name_chain_diamide (naming body). - handlers/ring_ester.py (direct-return handler template). - dspec-D3-mixed-diamide.json (spec).
- orthonym.assembly.handlers.diamide.name_chain_diamide_handler(features, mol=None, style='pin')#
Direct-return chain_diamide handler.
Delegates to
rules.amides.name_chain_diamide. ReturnsNone(falls through to the next handler) when the naming body fails closed.