orthonym.assembly.handlers.amide#

Note

Internal API. Names and behaviour may change between releases.

a phase amide handler — Tier-2 mid-tier direct-return (fast-path).

Verbatim lift of composer.py:1343-1356 (inline dispatch branch). Body _assemble_amide_name at composer.py:4154-4295 (142 LOC) STAYS until Plan-03 commit 03-10 (composer.py thinning) per internal notes.

Predicate gates on: 1. principal_group in {primary_amide, secondary_amide, tertiary_amide} 2. len(principal_group_atoms) == 1 (single amide; multi-amide compounds

fall through to general_acyclic suffix path per composer.py:1339-1341)

  1. not is_polyfunctional (mutex with the polyfunctional inline branch at composer.py:870 — fires BEFORE amide in the inline cascade order and produces a different name like (2S,3R)-2-(octadecanoylamino)-…)

  2. not is_cyclic OR chain_is_parent (Tier-A mutex — same pattern as partial_sat handler in Plan-02 commit 02-24). For cyclic-amide cases where Tier-A would win, dispatch_inner skips this entry and falls through to the inline cascade where Tier-A ring competition runs first, then the inline amide block at composer.py:1343 picks up the post-Tier-A-rejection fallback.

Byte-identical contract per internal notes (DECOMP-03): predicate gates capture the inline cascade-order semantics so dispatch_inner reaches this handler only when the inline amide branch at composer.py:1343 would have fired.

IUPAC cite: (amides).

References: - composer.py:1343-1356 (inline dispatch branch; RETAINED as Tier-A-rejection

fallback; Plan-03 commit 03-10 consolidates).

  • composer.py:870-888 (polyfunctional inline branch — runs BEFORE amide in inline cascade order; predicate not is_polyfunctional mirrors this).

  • composer.py:4154-4295 (_assemble_amide_name body; STAYS until 03-10).

  • handlers/partial_sat.py (same Tier-A mutex pattern).

  • internal notes-DECOMP.md row ‘amide’ + Tier-2 row.

orthonym.assembly.handlers.amide.name_amide(features, mol=None, style='pin')#

Direct-return amide handler (fast-path).

Verbatim semantics of composer.py:1343-1356. Returns NamingResult(name=best.name, tree=best.tree, atom_to_locant_hint=None) after pool.add(name, 'amide', features, tree=...) (a phase SCORE-01: structured tree from the chain-fragment path, else a coarse node). No _inject_stereo_if_missing wrap per the inline branch behavior at composer.py:1356.