orthonym.assembly.ocene_two_rings#

Note

Internal API. Names and behaviour may change between releases.

An ocene with groups on both rings, named from the cyclopentyl drawing of each ring.

(the Blue Book) “Ocenes are considered as heterocycles… These names are substituted in accordance

with the principles, rules, and conventions of substitutive nomenclature, using suffixes or prefixes”; the positions of the second ring are primed: ‘1,1′′-(ethane-1,2-diyl)bis(1′-methylruthenocene) (PIN)’ (:40139). Each substituted ring is named alone through its cyclopentyl drawing (ocene_drawing), and the two names are joined:

  • both rings are the parent and carry prefixes only: every group is a prefix on the ocene, each ring numbered for the lowest locants: then the prefix cited first in alphanumerical order), the ring with the lower set unprimed (‘1,1′-dimethylferrocene’);

  • both rings carry one and the same suffix and nothing else: ‘ferrocene-1,1′-dicarboxylic acid’;

  • one ring is the parent with a suffix, or carries the group of another parent: the groups of the other ring are primed prefixes on it (‘1′-methylferrocene-1-carboxylic acid’, ‘[1′-(diphenylphosphanyl)ferrocen-1-yl]…’).

Every candidate is a name for the caller to read back to the input’s full standard InChIKey; none is a PIN here (the numbering ties of that cross the two rings and the multiplicative names of are not built).

orthonym.assembly.ocene_two_rings.ring_prefixes(mol, ring)#

(index in ring, prefix name) of every group on the ring of a cyclopentyl drawing, or None when the engine has no prefix name for one of them.

orthonym.assembly.ocene_two_rings.numbered(placed, prime='')#

(locant, name) for groups at ring indices 0-4, in the numbering of the five-membered ring with the lowest locants, then the lowest for the prefix cited first in alphanumerical order.

orthonym.assembly.ocene_two_rings.render(entries)#

(locant, bare, marked) entries as one alphanumerically ordered prefix list (‘1,1’-dimethyl’).

orthonym.assembly.ocene_two_rings.ferrocene_parent_name(stem, a_placed, b_placed)#

Both rings the parent, prefixes only: the ring whose locants are lower (then whose first-cited prefix is) is unprimed (‘1,1’,2-trimethylferrocene’).

orthonym.assembly.ocene_two_rings.same_suffix_name(stem, name_a, name_b)#

‘cyclopentanecarboxylic acid’ on both rings -> ‘ferrocene-1,1’-dicarboxylic acid’; None otherwise.

orthonym.assembly.ocene_two_rings.merged_prefixes(text, b_placed)#

The locanted prefixes of text (of ring 1, as the engine numbered them) with the groups of the other ring as primed prefixes, in one alphanumerical list; None when text is not such a list.

orthonym.assembly.ocene_two_rings.two_ring_candidates(namer, stem, rings)#

Candidate names, best first, for an ocene with groups on both rings; rings holds (cyclopentyl drawing, ring atoms, its SMILES, number of groups) of each ring. The caller ships the first that reads back to the input. A ring whose groups have no prefix name (ring_prefixes is None) cannot be cited on the other ring, but it can still be the ring written as the ocenyl prefix: its groups stay in its own name, only their number counts.