orthonym.assembly.n_branch_prefixes#

Note

Internal API. Names and behaviour may change between releases.

The last-resort prefix of an N-attached branch whose ring the direct paths could not name.

Moved out of composer._name_n_attached_substituent_fallback (a function of the size baseline) so that the branch that is a sulfonamide can be named the way the book names it.

  • -NH-SO2-R: “Substituents of the types -NH-CO-R and -NH-SO2-R” (the Blue Book): ‘Method (1) generates preferred IUPAC names’: ‘3-(methanesulfonamido)propanoic acid (PIN)’:33019, ‘(1-cyclohexylmethanesulfonamido)acetic acid’:33024; the form ‘[(cyclohexylmethanesulfonyl)amino]’ is method (2), a general-nomenclature name. The shared helper builds the method (1) prefix and fails closed on a branch it cannot spell, so it is tried first.

  • any other branch (audit 2026-09-03, Bug B): name the CARBON side that hangs off the nitrogen and wrap it, ‘(cyclohexylamino)’ / ‘((prefix)amino)’. The previous version put the nitrogen itself into a SMILES fragment, named it as an amine (‘4-methylcyclohexan-1-amine’, ‘N-methylaniline’) and wrapped THAT in ‘amino’ – one nitrogen twice; every candidate was a different molecule. Only a single carbon branch on the nitrogen is handled: with two (N-methyl-N-aryl, N-alkyl-N-cycloalkyl) the prefix needs the N-locant grammar of the later paths, so this declines and lets them name it.

orthonym.assembly.n_branch_prefixes.n_branch_last_resort_prefix(mol, atom, attach_atom, sub_set, sub_atoms, chain_set)#

‘(…amino)’ / ‘(…sulfonamido)’ for the N-attached branch sub_atoms, or None.