orthonym.rules.branched_assembly#
Note
Internal API. Names and behaviour may change between releases.
A branched ring assembly of identical benzene rings, named by substituting into its longest unbranched assembly.
## **** BRANCHED RING ASSEMBLIES OF IDENTICAL CYCLIC SYSTEMS (the Blue Book): “Preferred IUPAC
names are formed by substituting into the longest unbranched assembly. The names of substituent groups are formed
in accord with the methods described in. If necessary, the criteria for selecting the principal chain are
applied, namely, the longest chain, the maximum number of substituents, the lowest locants for substituents
considered together, then alphanumerical order.” The assembly itself is ### **** DEFINITIONS (:15540,
:15542): cyclic systems “directly joined to each other by single or double bonds… when the number of such direct
ring junctions is one less than the number of cyclic systems involved”, a tree of rings; **** (:15675)
names three to six benzene rings ‘terphenyl’… ‘sexiphenyl’; the examples of print the primed names of
general nomenclature next to the PINs (‘5’-phenyl-1,1’:3’,1’’-terphenyl’, ‘5’’-([1,1’-biphenyl]-3-yl)-1,1’:3’,1’’:
3’’,1’’’:3’’’,1’’’’-quinquephenyl’, ‘3’,4’,5’,6’-tetraphenyl-1,1’:2’,1’’-terphenyl’), and **** (:15651)
allows “serially primed locants” in general nomenclature. The PIN spells the junctions with composite locants
(‘2^5-phenyl-1^1,2^1:2^3,3^1-terphenyl’), which this module does not write; a chain of more than six rings is named
by phane nomenclature in the PIN (****,:15705), which phane_pin builds where OPSIN reads it.
rules.ring_assemblies.detect_ring_assembly takes only an unbranched assembly (every ring system joined to at
most two others). A tree with a ring joined to three or more others is not one of its assemblies, and the namers
that consume its result (the prefix builders of ring fragments) name every ring system of the assembly alike. The
caller that names the whole molecule asks:func:detect_assembly_or_branched instead: the result of the first, else
that of:func:detect_branched_ring_assembly, which
takes the tree of identical benzene rings whose other atoms are neutral carbon atoms and halogens (no group that could be a principal characteristic group, so that the chain is chosen by the four criteria above alone),
chooses the chain among the longest paths of the tree by those four criteria, each read as the book reads it: the number of rings of the chain, the number of substituents (every bond from a chain ring to an atom outside the chain rings), the lowest locants of the junctions and then of the substituents considered together, the lowest locant of the substituent cited first in alphanumerical order,
numbers each ring of the chain from the junction to the ring before it, “Lowest possible locants must be used to denote the positions of attachment”; the junction to the previous ring is cited first), the other junction of a middle ring at its lowest locant, the walking direction that is left decided by the substituents,
names the chain and its substituents with
name_ring_assembly(a branch that holds rings is a compound prefix named byassembly.substituent_enumerator.name_substituent), and returns the result only when OPSIN 2.9.0 reads that name back to the full InChIKey of the molecule, asdetect_hydro_ring_assemblydoes.
A molecule it does not take (a ring that is not benzene, a heteroatom, a charge, a stereocentre, more candidate chains than:data:MAX_CHAIN_CANDIDATES, more tied candidates than:data:MAX_TIED_CHAINS, more branches to name than:data:MAX_NAMED_BRANCHES, a name that is not built or not read back) is declined, and keeps the classification it had.
- orthonym.rules.branched_assembly.MAX_CHAIN_CANDIDATES = 4000#
Longest paths of the ring tree beyond which the chain is not chosen (declined).
- orthonym.rules.branched_assembly.MAX_NAMED_BRANCHES = 40#
a branch that holds rings is named by the general substituent namer, which takes seconds for a large one.
- Type:
Substituents named to read the fourth criterion, beyond which the chain is not chosen (declined)
- orthonym.rules.branched_assembly.MAX_TIED_CHAINS = 8#
Candidate chains that tie on the numbers of the first three criteria and are not equivalent under a symmetry of the molecule, beyond which the chain is not chosen (declined): each is named to read the fourth.
- orthonym.rules.branched_assembly.detect_assembly_or_branched(mol, ring_systems, features=None)#
detect_ring_assemblyofring_systems, else:func:detect_branched_ring_assembly, else (with thefeaturesof the molecule) the two-ring assembly that is the parent of a molecule with other rings on chains (rules.assembly_ring_branches). An unbranched assembly of three or more benzene rings that carries substituents keeps the result ofdetect_ring_assemblywhen its name is built and read back, and gets the numbering of this module otherwise (_renumbered()).
- orthonym.rules.branched_assembly.detect_branched_ring_assembly(mol, ring_systems)#
The assembly info of the longest unbranched assembly of a branched ring assembly of identical benzene rings (see the module docstring), with the numbering of its rings and the name of the molecule, or None.
The keys are those of
detect_ring_assemblyfor the chain, withbranchedTrue,numbering(one dict atom -> locant per ring of the chain) andname:name_ring_assemblyreturns that name.