orthonym.rules.n_hetero_amines#

Note

Internal API. Names and behaviour may change between releases.

N-substitution of amines, carboxamides and sulfonamides by heteroatom groups.

BLUE BOOK AUTHORITY#

“N-SUBSTITUTION OF AMINES AND IMINES BY HETEROATOMS” (the Blue Book): “Traditionally,

substitution on the nitrogen atom of amines and imines was allowed for all characteristic groups cited as prefixes (see Table 5.1). This approach is maintained in these recommendations, unless a higher class is formed that must be named in accordance with the seniority of classes (see.” Its examples: ‘N-methoxyethanamine (PIN)’ (:26600), ‘N-hydroxyethanamine (PIN)’ (:26602); “Substitution of amines is permitted by -OR, -SR, -SeR, and -TeR groups, where R is an alkyl or aryl substituent group” (:26596). The groups of Table 5.1 “Characteristic groups always cited as prefixes” (:24980) that are not the groups of an amide of a acid (nitro, nitroso, the halogens and their oxides: rules/nitramide.py) are azido, isocyanato, isocyano, alkoxy and alkylperoxy, the alkanesulfinyl and alkanesulfonyl groups (the amides of sulfinic and sulfonic acids), and the chalcogen analogues of alkoxy.

“AZIDES” (:25989): “Compounds containing a -N3 (-N=N+=N-) group attached to a parent hydride,

are named using substitutive nomenclature and the prefix ‘azido’.” ASSUMED for the nitrogen of an amine: the book prints no N-azido amine; ‘s general sentence (Table 5.1 lists ‘azido’,:24990) gives the reading, and the amine (class 19) is senior to every class a nitrogen chain could name , class 21 “Nitrogen compounds: heterocycles, polyazanes, hydrazines…”,:18197), so ‘N-azido-N-methylmethanamine’ is the name that reading gives.

The class of the compound is that of the host the group is a prefix of, so the groups of rules/nitramide.py ARE prefixes here when the host is a carboxamide or a sulfonamide: ranks the amide of a carboxylic or sulfonic acid (class 7a acids, class 11 amides “in the order of the corresponding acids”,:18184) above the amide of a nitrogen or halogen acid (class 7e,, so CH3-CO-N(CH3)-Cl is ‘N-chloro-N-methylacetamide’ and CH3-SO2-N(CH3)-NO is ‘N-methyl-N-nitrosomethanesulfonamide’. For the nitro and nitroso groups the book says so itself, “Nitro attached to heteroatoms” (:25957): “In the presence of a characteristic group having seniority to be named as a suffix or a parent structure, nitro and nitroso groups can be attached to any atom”, with the example ‘N-methyl-N-nitrosourea (PIN)’ (:25965). A group on a nitrogen of the amine host that is not one of the amide-forming groups (azido, alkoxy…) stays a prefix of the amine.

THE CONSTRUCTION (reuse of the trusted path, never a rewrite of an emitted name)#

The host is the molecule with the group taken off the nitrogen (M0: an amine, carboxamide or sulfonamide the engine names). Its name is read, not edited: the name of M0 must be EXACTLY the name rebuilt from independently computed parts – the N-prefix of the other substituent of the nitrogen (_name_n_substituent) in front of the name of the primary host that the skeleton alone makes (name_compound of the amine, amide or sulfonamide without N-substituents). Where it is, the skeleton is a plain hydrocarbon group (a chain or a ring that carries no prefix of its own), so the N-prefixes are the only prefixes of the name and the group takes its place among them in the alphanumerical order of (N-azido-N-methylmethanamine, N-chloro-N-methylacetamide). Where it is not (a prefix on the skeleton, a stereodescriptor, a different parent choice), the class is not built and the engine’s other producers keep the molecule.

SCOPE (fails closed on everything else)#

One acyclic N with exactly one group, the groups named here: azido; the chalcogen groups -OR, -SR, -SeR, -TeR of an organyl group (composed_chalcogen_group_prefix) and -SH, -SeH, -TeH; and, on a carboxamide or sulfonamide, -OH and the groups of rules/nitramide.py. The other substituents of the N are a carbon group, an acyl group or a sulfonyl/sulfinyl group of a plain skeleton. Every atom of the molecule is in the groups of the N; no stereo is specified, nothing is charged or an isotope outside the group. Left to the producers that own them: the amide of a acid on an amine (rules/nitramide.py), the N-hydroxy amine (the hydroxylamine class, and the secondary R-NH-O-R’ with one carbon on each side, the hydroxylamine handler); a ring nitrogen (‘1-azidopiperidine’: the heterocycle carries the group as a prefix at its position 1); a skeleton that carries a prefix of its own; a fragment named inside a substituent’s recursion (the prefix converter has no conversion for an N-substituted amine name, so the group would be lost to the composed prefix the general engine builds).

orthonym.rules.n_hetero_amines.name_n_hetero_substituted(mol, style='pin')#

The PIN of an amine, carboxamide or sulfonamide whose nitrogen carries one heteroatom group of this module’s scope: N-azido-N-methylmethanamine, N-chloro-N-methylacetamide, N-methyl-N-(methylsulfanyl)methanamine, N-methoxy-N-methylmethanamine. None outside it.

The dispatch asks twice for one molecule (the predicate, then the handler); the answer is kept for the naming call (perception.molcache.cached_by_key: never an RWMol, gone with the call). The answer depends on the style and on whether this is the name of a whole molecule, so both are in the key.