orthonym.assembly.chain_decoration_prefixes#

Note

Internal API. Names and behaviour may change between releases.

Detachable prefixes of an acyclic chain substituent that hang on a chain carbon by a multiple bond, and the guards of the alkoxy prefix of a decorated chain (lane/l17 item 3).

assembly.substituent_naming names a chain substituent from its bonds: it enumerates the groups on the chain, numbers the chain from the free valence and cites each group as a prefix,. Three of its decisions live here, each a function of the molecule and the atoms handed in:

*consume_substituted_imino() – a substituted imino group =N-X on a chain carbon; *unsaturated_chain_plan() – the principal chain of a branched unsaturated substituent, and which C=C are

prefixes of an off-chain atom (d),;

*alkoxy_decoration_tokens_are_real() – whether the ‘hydroxy’ / ‘oxo’ prefixes of the carbon side of an R-oxy

group can only be spelled for -OH / =O groups that fragment has;

*consume_azido() – the pendant azido group, moved from the producer unchanged.

orthonym.assembly.chain_decoration_prefixes.alkoxy_decoration_tokens_are_real(mol, rest, attach)#

True when the ‘hydroxy’ / ‘oxo’ prefixes of the name of rest (the carbon side of an -O-R group, attach its free-valence carbon) can only be spelled for -OH / =O groups the fragment has.

(the Blue Book, “Alkoxy and aryloxy groups”): an R-oxy prefix is the name of R with ‘oxy’ for its

free valence, so a decorated R keeps its own detachable prefixes: ‘bis(2-hydroxyethoxy)acetic acid (PIN)’ (the Blue Book). Substituent R is named by the recursion of name_substituent_fragment; its polyfunctional chain producer (_name_polyfunctional_acyclic_substituent) writes ‘2-hydroxyethyl’ / ‘2-oxobutyl’ from the bonds themselves, one prefix per real terminal group. What the recursion cannot yet express is an oxygen INSIDE R (an ether, ester or peroxide link), which it spells as a spurious ‘hydroxy’ / ‘oxo’. So the tokens are real when (1) every oxygen of rest is terminal (one heavy neighbour, uncharged, no isotope), (2) no carbon carries both a terminal -OH and a terminal =O (that is a carboxyl carbon, ‘carboxy’, , (3) attach bears no double-bonded heteroatom (-O-C(=O)R is an acyloxy group, whose PIN prefix cites the acyl ‘R-oyl’,, never ‘1-oxo…oxy’), and (4) no atom of the molecule’s principal characteristic group is in rest: such a group is cited as the suffix of the parent,, never as a prefix of an R-oxy group. Fails closed (False) when perception fails.

orthonym.assembly.chain_decoration_prefixes.unsaturated_chain_plan(mol, longest, attach_idx, core_double_bonds)#

The principal chains of a branched unsaturated substituent and the C=C each carries, or None.

longest is every longest carbon chain from the free valence (b), the Blue Book, “THE PRINCIPAL SUBSTITUENT CHAIN”); core_double_bonds the C=C of the backbone as frozensets of atom indices. Criterion (d) of: “The principal chain has the greater number of multiple bonds regardless of type”, so the chains kept are those with the most C=C on the chain. A C=C that a kept chain does not carry is a prefix of its off-chain atom with the free valence of its bond: ‘2-methylidene-4-oxopentyl’); it is admitted only when one of its atoms is on the chain and its geometry is undefined (a geometry has no locant to be cited at in such a prefix).

Returns [(chain, C=C on the chain),...] for the kept chains; ```` when no longest chain carries a C=C (every C=C is such a prefix, and the caller names the substituent as a saturated one, criteria (k)-(m)); and None for a plan this producer does not build (a chain not starting at the free valence, a C=C with a geometry when no chain carries one, a C=C that is not adjacent in its chain).

orthonym.assembly.chain_decoration_prefixes.consume_substituted_imino(mol, sub_set, attach_idx, consumed, add_prefix)#

/ /: a SUBSTITUTED imino group =N-X (an oxime =N-OH, an oxime ether =N-OR, an N-alkyl or N-aryl imine =N-R, a hydrazone =N-NR2) on a carbon of the chain that is not its free valence is the detachable prefix ‘(Ximino)’ / ‘hydrazinylidene’, consumed here with its N-branch (consumed grows, the prefix goes to add_prefix(host carbon, text)). Under the heading “ Oximes” (the Blue Book) the last sentence of its paragraph (:38460) reads: “In the presence of a characteristic group having priority for citation as a suffix, in substitutive nomenclature oximes are designated by the prefix ‘hydroxyimino’”; ‘3-(hydroxyimino)butanal (PIN)’ (:38487), ‘4-[(ethoxyimino)methyl]benzene-1-sulfonic acid (PIN)’ (:38485); ‘3-(methylimino)butan-2-ylidene (PIN)’ (:43352). The token is the one name_substituent builds for the branch, which reads the double bond of its attachment (_nitrogen_ylidene_prefix); the ring parents use the same namer. Without this the N reached the producer’s imino branch, which takes =NH only, and the whole chain declined (‘2-(hydroxyimino)butyl’).

Skipped (the N is left for the producer, which then declines) when the carbon is the free valence – R-(C=NR’)- is an imidoyl acyl group, – or bears another heteroatom (an imidic acid or amidine carbon, named as an acyl group), when the C=N carries an E/Z geometry (it has no locant to be cited at here), or when the branch is not a pendant one. Returns False when the same compound prefix would repeat (it needs ‘bis’,, which the producer’s simple multiplier cannot spell): the caller then declines the chain.

orthonym.assembly.chain_decoration_prefixes.consume_azido(mol, sub_set, consumed, add_prefix, azido_prefix)#

/: a pendant AZIDO group on a backbone carbon (-N=[N+]=[N-], or its -[N-]-[N+]#N resonance spelling) is the detachable ‘azido’ prefix – the same charge-separated, net-neutral shape as nitro, with the same consequence when it is not consumed before the backbone is read: the producer’s per-atom charge decline refuses the fragment and the recursive namer’s string surgery turns the capped ‘1-azidopropane’ into the wrong-end ‘1-azidopropyl’ for -CH2CH2CH2N3 (TRIAGE g7 C14; the free valence takes locant 1, / -> ‘3-azidopropyl’). Structural match only: Na (neutral or -1, bonded to the unconsumed host carbon by a single bond and to Nb only), Nb (+1, bonded to Na and Nc only), Nc (terminal, charge making the three sum to 0) with the bond orders of one of the two resonance forms.

orthonym.assembly.chain_decoration_prefixes.hand_on_numbering(pos_out, chain, name)#

name, the name of a substituent on chain (free valence = chain[0] = locant 1), with the numbering handed to the caller in pos_out (atom index -> locant): a stereocentre of the chain is cited at its locant “NAMING OF STEREOISOMERS”: “When they relate to substituent groups, they are cited at the front of the corresponding prefix. They are preceded by a numerical or letter locant to describe the position of the stereogenic unit when such locants are present”), which the located stereo block of the caller needs; without it every chain stereodescriptor of the substituent is dropped and the whole name loses its stereo.