orthonym.rules.sulfonamides#
Note
Internal API. Names and behaviour may change between releases.
N-substituted sulfonamides — (chalcogen-acid amides).
THE DEFECT THIS CLOSES#
secondary_sulfonamide / tertiary_sulfonamide were perceived
(perception/functional_groups.py:236-238) and carried a SUFFIX_FORMS row
(rules/seniority.py:562-564), but no producer ever rendered the
N-substituent. Every path that reached one emitted a name for a DIFFERENT
molecule and was killed downstream by the OPSIN self-consistency gate:
CS(=O)(=O)NC->methanesulfonamide(N-methyl carbon DROPPED)c1ccccc1S(=O)(=O)NC->sulfanylbenzene(both =O, N and C dropped)C1CCCCC1S(=O)(=O)NC->carbamoylcyclohexane-1-sulfonamide(fabricated)
So the class did not “fail closed by design” — it fail-closed by ACCIDENT, one gate downstream of a wrong-constitution producer.
DESIGN — no count stands in for a structure proof#
Per internal notes the parent is
never derived from an atom count. Instead the N-substituent branches are
EXCISED from the real molecule and the residual R-SO2-NH2 is named by
re-entering the naming pipeline, exactly as handlers/hydroximic_acid.py:92
does. That has three consequences worth stating:
the parent spelling is whatever the already-verified PRIMARY sulfonamide path produces —
methanesulfonamide,benzenesulfonamide,cyclohexane-1-sulfonamide— so the parent name is never spelled twice here (the second documented anti-pattern);any parent the pipeline cannot name makes the whole name fail closed;
recursion terminates: the excised parent is a strictly smaller molecule whose principal group is
primary_sulfonamide, a different class from the one this module owns.
MEASURED CLASS BOUNDARY (fails closed outside it)#
acyclic amide N only. A RING nitrogen (
CS(=O)(=O)N1CCCCC1) is refused — its PIN is1-(methanesulfonyl)piperidine, a sulfonyl PREFIX on a ring parent, not an N-substituted sulfonamide.exactly one sulfonamide unit. Di- and polysulfonamides need the superscripted
N^1/N^3locants of, which are not built here.sulfur only. Sulfinamides (-SO-NH2) and the Se/Te analogues have NO functional group perception in this tree at all, so even the UNSUBSTITUTED
methanesulfinamideis unnameable; that is a separate unbuilt class.carbon-attached N-substituents only.
MEASURED GUARD REDUNDANCY (do not “simplify” this away without re-measuring)#
12 mutations were applied to this module. Only THREE are killable at all –
disabling _parent_hydride_is_unsubstituted, dropping the N- prefix, and
allowing a heteroatom N-substituent. The other nine (ring N, >1 sulfonamide
unit, the parent-suffix check, the empty-branch check, the sultam loop-back, >2
branches, branch disjointness, the two-=O count, branch ORDER) are
EQUIVALENT MUTANTS: over a 33-molecule probe set covering every one of their
target shapes, no input distinguishes mutant from original, because each is
masked by an earlier guard – e.g. a ring nitrogen is rejected by
IsInRing before the sultam loop-back can see it, and branch order is
irrelevant because format_n_substitution sorts internally.
They are kept deliberately: each names a distinct refusal reason at the point a reader would look for it. But NONE of them is individually load-bearing today, so a test asserting one of them in isolation cannot fail, and a future edit that removes an EARLIER guard silently promotes a later one to load-bearing.
- orthonym.rules.sulfonamides.n_substituted_sulfonamide_name(mol, style='pin')#
Return the PIN for an N-substituted sulfonamide, else None.
N-methylmethanesulfonamide,N,N-dimethylbenzenesulfonamide,N-phenylmethanesulfonamide. Fails closed on every shape outside the class documented in this module’s docstring.