orthonym.rules.fused_ring_selection#

Note

Internal API. Names and behaviour may change between releases.

.3 base component selection for fused ring systems.

References: - IUPAC 2013 Blue Book - https://iupac.qmul.ac.uk/fusedring/FR23.html - AUTONOM-1990 (Wisniewski J. Chem. Inf. Comput. Sci. 30, 324-332) - V18_MILESTONE_PLAN.md Appendix A.6 lines 2280-2422

Complete 10-criterion cascade: (a) Heteroatom type: N > F > Cl > Br > I > O > S > Se > Te > P > As > Sb > Bi > Si > Ge > Sn > Pb > B > Hg (b) Greater number of rings (c) Larger ring at first point of difference (decreasing size) (d) Greater total heteroatom count (e) Greater heteroatom variety (f) Heteroatoms by alt priority order (g) Preferred orientation (.2 fallback: symmetry lower-locant) (h) Lower locants for heteroatoms (i) Locant ordering by heteroatom type (j) Lower bridgehead carbon locants

Implementation depth (a phase):
  • (a)-(f) FULL implementation per IUPAC + V18 Appendix A.6.

  • (g)-(j) deterministic stubs (returning constants); a phase fills with .2 orientation + peripheral numbering.

DRY discipline (a phase /):
  • _HETEROATOM_SENIORITY (b) errata-correct, 20 entries) is REUSED via a relative import from ring_selection for.3(a) — see imports below.

  • _FR23_HETEROATOM_ALT (NEW, 19 entries) lives here for.3(f); it is genuinely different from _HETEROATOM_SENIORITY (Hg present, Al/Ga absent, N at rank 12 not 20) per V18 Appendix A.6 lines 2319-2325.

class orthonym.rules.fused_ring_selection.ComponentRank(senior_het_neg, ring_count_neg, ring_sizes_neg, het_count_neg, het_variety_neg, alt_het_tuple=<factory>, orient_stub=0, het_locants_stub=<factory>, het_type_locants_stub=<factory>, bridgehead_locants_stub=<factory>)#

Bases: object

.3 ranking tuple. Lower sort value = preferred component.

All fields negated where IUPAC says “more / larger / lower-locant wins” so that min(sorted([...])) selects the IUPAC-preferred candidate.

Order of fields matches.3 criteria (a)-(j); Python dataclass order=True generates lexicographic comparison in declaration order.

Stubs (g)-(j) are deterministic constants in a phase per; a phase fills with.2 orientation + peripheral numbering.

Source: V18_MILESTONE_PLAN Appendix A.6 lines 2328-2341. Source: 149-internal notes,.

senior_het_neg: int#
ring_count_neg: int#
ring_sizes_neg: Tuple[int, ...]#
het_count_neg: int#
het_variety_neg: int#
alt_het_tuple: Tuple[int, ...]#
orient_stub: int = 0#
het_locants_stub: Tuple[int, ...]#
het_type_locants_stub: Tuple[int, ...]#
bridgehead_locants_stub: Tuple[int, ...]#
orthonym.rules.fused_ring_selection.select_base_component(mol, fused_components)#

Select preferred base component per.3.

Parameters:
  • mol (Mol) – Full RDKit molecule.

  • fused_components (List[Set[int]]) – List of atom sets, each set is one fusion component. Must have >=2 components for fusion naming to apply.

Returns:

(base_component, other_components_ordered_by_rank)

Raises:

ValueError – if fewer than 2 components.

Return type:

Tuple[Set[int], List[Set[int]]]

Source: V18_MILESTONE_PLAN a phase SC #1. Source: 149-internal notes.