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.
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.