orthonym.rules.fused_forms#

Note

Internal API. Names and behaviour may change between releases.

The book’s names for a fusable ring system, with their numbering (roadmap N5b).

The best-effort writers named every polycyclic ring system by the von Baeyer system (‘3,4-diazabicyclo[4.4.0]deca-1(10),2,6,8-tetraene’, ‘7-azabicyclo[4.3.0]nona-…’). For a system the book names by fusion nomenclature that is not a book spelling:

  • ‘Five-membered ring requirement’ (the Blue Book;:23710): “Fusion nomenclature gives preferred IUPAC names only to compounds having at least two rings of at least five or more members…. When fusion names are not allowed, unsaturated von Baeyer ring system names are preferred IUPAC names”.

  • (:24221): “Retained fusion names are used for the fully unsaturated compounds (see; they are the preferred IUPAC names. Preferred IUPAC names for the partially saturated and fully saturated compounds are formed by using ‘hydro’ prefixes.” – ‘decahydronaphthalene (PIN) bicyclo[4.4.0]decane’ (:24233).

  • ‘Prefix nomenclature’ (:24862,:24864): “After the introduction of indicated and ‘added indicated hydrogen’ atoms, all substituent groups not expressed as suffixes are cited as prefixes” – a ring C=O cited as ‘oxo’ is a saturated position of the parent (‘1-oxo-1,2-dihydrophthalazine’).

fused_system_form returns the fusion name of one ortho- or ortho- and peri-fused ring system with two or more rings of five or more members, built from parts the engine already certifies: the mancude parent and its catalogue numbering (partial_saturation._resolve_oxo_parent: a bond-order-agnostic match against the fused heterocycle and polycyclic catalogues, mancude entries only) and the indicated hydrogen and hydro prefixes of the structure under that numbering (ring_hydrogen.ring_hydrogen with no suffix group;,. The atom of a free valence that has no hydrogen in the mancude parent takes the indicated hydrogen,:24768; ‘1,3-dioxo-1,3-dihydro-2H-isoindol-2-yl’, Example 5,:25477); otherwise, among the numberings the catalogue allows (its automorphisms), the lowest locants go to ,:3246-:3301) (b) indicated hydrogen, (c) the free valence, (e) hydro prefixes, (f) the prefixes; then a canonical-rank tie-break, so the result does not depend on the input atom order.

Out of scope (None; the caller keeps its von Baeyer spelling): bridged and spiro systems; systems with fewer than two rings of five or more members (von Baeyer is the book’s there,:23710); charged, radical or isotope-labelled ring atoms; a ring atom of nonstandard bonding number (a lambda atom,:2758); skeletons no catalogue parent matches (fusion names the engine does not build yet, the fusion lane’s); a substituent or a free valence on a fusion atom (a lettered locant); an ylidene free valence.

class orthonym.rules.fused_forms.FusedForm(parent, numbering, kind='fused', parent_cites_locant=False, free_valence_added='')#

Bases: object

One fusable ring system spelled by its fusion name.

parent the parent hydride with its hydro prefixes and indicated hydrogen

(‘1,2,3,4-tetrahydronaphthalene’, ‘1H-indole’, ‘1,2-dihydrophthalazine’).

numbering ring atom index -> locant (int, or a lettered str for a fusion atom). kind ‘fused’ (the writers read MonocycleForm.kind the same way).

parent: str#
numbering: Dict[int, object]#
kind: str = 'fused'#
parent_cites_locant: bool = False#
free_valence_added: str = ''#
cites_locant(free_valence_locant=None)#

The parent or its prefix at free_valence_locant cites a locant, the Blue Book).

prefix(free_valence_atom, bond_order=1)#

The substituent prefix with the free valence at free_valence_atom.

prefix_at_locant(loc, bond_order=1)#
‘naphthalen-2-yl’, ‘1H-indol-3-yl’, ‘1,2,3,4-tetrahydronaphthalen-1-yl’

(2), the Blue Book: the final ‘e’ of the parent is elided before

‘y’ and the locant is cited). A single free valence on a numbered peripheral atom only: an ylidene changes the hydrogen of the parent, which this form does not recompute.

class orthonym.rules.fused_forms.FusedKetoneForm(parent, suffix, numbering)#

Bases: object

One fusable ring system spelled by its fusion name with its ring C=O groups cited as the ‘-one’ SUFFIX and the hydrogen of the shared rule.

parent hydro prefixes, indicated hydrogen and stem, without the suffix

(‘2H-1-benzopyran’, ‘phthalazine’, ‘pyrimidine’).

suffix ‘-1(2H)-one’, ‘-2,4(1H,3H)-dione’ (the added indicated hydrogen follows the

suffix locants,.

numbering ring atom index -> locant (int, or a lettered str for a fusion atom).

parent: str#
suffix: str#
numbering: Dict[int, object]#
join()#

The parent with the suffix: the final ‘e’ of the parent is elided before a suffix that begins with a vowel (a): ‘phthalazin-1(2H)-one’), kept before a consonant (‘pyrimidine-2,4(1H,3H)-dione’).

parent_token()#

The part of parent that survives in join (the parent binding’s token).

orthonym.rules.fused_forms.fused_system_form(mol, ring_atoms, free_valence_atom=None, branch_atoms=())#

The fusion name and numbering of the ring system ring_atoms, or None.

branch_atoms lists the ring atoms that carry a substituent prefix, once per prefix

(f)); free_valence_atom is the ring atom of the free valence of a

substituent prefix, None for a parent. Every atom of either kind must take a numbered (not lettered) locant.

orthonym.rules.fused_forms.fused_system_ketone_form(mol, ring_atoms, suffix_atoms, branch_atoms=())#

The fusion name and numbering of the ring system ring_atoms with the ring C=O groups on suffix_atoms cited as the ‘-one’ suffix, or None.

(the Blue Book): “Ketones derived from mancude parent hydrides having

indicated hydrogen atoms are named by direct substitution of a >CH2 group… When no indicated hydrogen is present, the methodology of ‘added indicated hydrogen’ is applied” (‘naphthalen-1(2H)-one (PIN)’:28418); (:24695) and (:24768) place the hydrogen. The hydrogen, the numbering and the stem are those of fused_system_form (the catalogue’s mancude parent under every numbering it allows; the shared rule ring_hydrogen.ring_hydrogen for the hydrogen), with the =O atoms of suffix_atoms as the groups the hydrogen accommodates. Among the numberings the lowest locants go to ,,:25036-:25044) (c) indicated hydrogen, (d) the suffix, (e) added hydrogen, (f) hydro prefixes, (g) the prefixes (branch_atoms: the ring atoms that carry a substituent prefix, once per prefix; the suffix atoms are not among them), then a canonical-rank tie-break so the input atom order never decides.

Out of scope (None; the caller keeps its prefix spelling): what fused_system_form declines, a suffix atom that is not a ring atom, a numbering with a lettered locant on a suffix or prefix atom, a ring the hydrogen rule does not read.

orthonym.rules.fused_forms.is_fusable_system(mol, ring_atoms)#

True for one whole ortho- or ortho- and peri-fused ring system with two or more rings of five or more members, the Blue Book): every ring of the molecule that touches ring_atoms lies inside it, two rings share either nothing or exactly one bond (no spiro atom, no bridge), and the smallest rings span the cycle space (a bridged system has more independent cycles than smallest rings).

orthonym.rules.fused_forms.locant_key(loc)#

A total order over ring locants, int or lettered str: 4 < 4a < 4b < 5 , interior and fusion atoms take the letters of the preceding locant).