orthonym.rules.centre_ligands#

Note

Internal API. Names and behaviour may change between releases.

The ligands of a mononuclear -uide or -onium centre, named by the trusted substituent-prefix namer.

The anion (CH3)2CH-I(-)-CH3 is methyl(propan-2-yl)iodanuide, the Blue Book): the centre is the parent hydride iodane with the suffix ‘uide’, and every group on it is a detachable prefix. The prefix of a group is what the substitutive path names it: assembly.substituent_enumerator. name_substituent, the five-tier chokepoint behind every organyl prefix of the mononuclear hydrides (rules.substituent_purity.organyl_prefix_name); a ligand that holds a ring goes to the ring-substituent chokepoint first, as it always did (classify_substituent’s ring branch), which spells the marks of a nested compound prefix. perception.chains.classify_substituent, which the -uide and -onium emitters used for their ligands, names a group that is no ring by its CARBON COUNT, so isopropyl came back ‘propyl’, tert-butyl ‘butyl’ and vinyl ‘ethyl’: another molecule’s name.

A ligand may carry a heteroatom and a group a suffix would express: the anion, “4 Anions”, the Blue Book) or the cation (“6 Cations”) of the centre outranks every neutral class a ligand holds, so the group stays a prefix, where organyl_prefix_name fail-closes on a heteroatom because a group of the HUB’s class could be outranked by one of the organyl. A ligand with a net charge or a radical is no prefix of the centre (a radical is senior to the anion, a cation makes the compound a zwitterion) and declines; a neutral group with charged atoms (nitro) is a prefix.

The prefixes are assembled by the caller through mononuclear_hydrides._build_mixed_substituent_string , the Blue Book): the first cited group takes no enclosing marks, the second and every further one is enclosed.

orthonym.rules.centre_ligands.capped_probe_ctx = <ContextVar name='orthonym_capped_probe' default=False>#

True while assembly.substituent_enumerator._route_fragment_to_general_engine names a fragment capped with a stand-in -OH. The cap is no ligand of the molecule: its seniority-blind reading (‘(2-hydroxyeth-1-yn-1-yl)(phenyl)iodanium’, the ion outranks the hydroxy group) is a name the route turns into a prefix it cannot spell for an ion parent, and that diverted the best-effort naming of the whole cation to the general engine (the same string at a lower label). A capped probe names the ligands a carbon-count namer named before this module: a chain ligand with an atom that is no carbon declines.

orthonym.rules.centre_ligands.centre_ligand_prefixes(mol, center_idx, ring_first=True)#

The prefix name of each ligand of the centre center_idx, in the order of its neighbours, or None.

None when a ligand has no name, when a ligand has a net charge or a radical, when a ligand is a ring through the centre, and when the heavy atoms of the centre and its ligands are not every heavy atom of mol (an atom a name does not cover is never shipped). An empty list is a centre with no ligand ([IH2-]).

orthonym.rules.centre_ligands.centre_name(mol, center_idx, suffix, bare)#

The name of the mononuclear centre center_idx: its ligands as prefixes (the first cited group with no enclosing marks, the second and further ones enclosed, and suffix; bare for a centre with no ligand; ‘’ when a ligand has no name.

In a call of a wider tier the name is the first of the ambient tier’s and the default tier’s ligand names that reads back (_candidate_ligand_lists()), and the first name when neither does: the validity gate declines it. The default tier names with its own ligand names and reads back at the gate.