orthonym.assembly.capped_name#
Note
Internal API. Names and behaviour may change between releases.
Reading the name of a capped molecule that is turned into a substituent prefix.
A fragment with a free valence is named as a molecule after its free valence is capped with
hydrogen. parent_to_prefix then edits that name into a prefix, and an edit of a name can
keep only what the name itself proves. The functions here decide what it proves.
- orthonym.assembly.capped_name.chain_stem_ending(stem)#
The longest ending of
stemthat is a chain stem of (get_chain_prefix), as(text before it, carbon count); None when no ending is one.Longest first, so a numerical term belongs to its stem: ‘undec’ -> (‘’, 11), ‘dodec’ -> (‘’, 12) ‘undeca’, ‘dodeca’), and ‘methoxymeth’ -> (‘methoxy’, 1) rather than ‘methoxym’ on ‘eth’; ‘2-methylprop’ -> (‘2-methyl’, 3).
- orthonym.assembly.capped_name.carries_capped_locants(name)#
True when the capped molecule’s name cites a locant of its own chain: a digit outside every pair of enclosing marks. A locant inside marks belongs to a nested prefix that is numbered, and complete, on its own (‘(4-methylphenyl)diazene’).
Substituent groups derived from parent hydrides with ‘ene’ or ‘yne’ endings,
(the Blue Book): “for acyclic parent structures, all locants for the free valences, including ‘1’, must be cited”; The principal substituent chain, (:22718): the free valence takes the lowest locant of the SUBSTITUENT’s own numbering. The name of the capped molecule numbers the chain for its own principal characteristic group or its own multiple bonds and never numbers the free valence, so a name that cites a locant of its chain cannot be turned into a prefix by editing its ending: the free-valence locant is absent, and the locants that are present may run from the other end of the chain.
- orthonym.assembly.capped_name.terminal_yl_prefix(capped_name, candidate)#
candidate, the capped molecule’s name ended in ‘yl’, or None when the name does not prove the places of the prefix.The capped name cites no locant of its chain, and for a two-carbon chain that is the only chain length at which a substituent prefix on ‘ethene’ or ‘ethyne’ needs none. A substituent X and the free valence stand on the same carbon or on the two carbons of ‘ethene’ (CH2=C(X)- and XCH=CH-, two isomers:, the Blue Book, ‘2-chloroethen-1-yl (preferred prefix)’), so the free-valence locant and the locant of X are cited and the capped name has no way to say them. ‘ethyne’ has one hydrogen on each carbon, so X and the free valence are on different carbons and no isomer exists,:2953; ‘oxoethenyl (preferred prefix)’,:2983): the prefix cites no locant and, being a compound prefix, takes enclosing marks,:7232). A longer chain with a substituent in front of its stem is declined for the same reason as ‘ethene’.
candidateis returned unchanged for a name that is not a substituted chain.
- orthonym.assembly.capped_name.acyclic_n_parent(name)#
True when the capped molecule’s name is an imine or a substituted hydrazine, whose ‘-ine’ ending is not the ring ending that turns into ‘-inyl’.
‘iminyl’ is the suffix of a radical, never of a substituent group: (Table 7.2 “Suffixes for Radicals of Amines, Imines and Amides”, the Blue Book); R-CH=N- joined through nitrogen is ‘(R-ylidene)amino’ “Substitutive names for imines”,:26529) and R-C(=NH)- an acyl group,:26540).
- A substituent on the nitrogen of a hydrazine cites the locant that tells which nitrogen
“Citation of locants”,:2869; “Omission of locants”,:2953), and the
capped name no longer holds it: ‘methylhydrazine’ gives no ‘methylhydrazinyl’. ‘hydrazine’ itself (‘hydrazinyl’, (b),:2911) and a hydrazine whose one substituent is an ylidene, which can stand on the far nitrogen only (‘ethylidenehydrazinyl’,:2959), keep the conversion.
n_unit_prefixbuilds the prefix of the units this declines, from the structure.