orthonym.assembly.pin_rerun#
Note
Internal API. Names and behaviour may change between releases.
The PIN tier’s promotion re-run for a first-run name the default tier will decline (DT3 step A).
Orthonym._name_with_pin_promotion names the molecule once, and names it again with the promoted
ring-substituent producers admitted (rules.pin_vocabulary.promote_at_pin_tier) when the first run
named nothing. A first run that names the molecule with a name the default tier’s emission rule then
declines (namer._default_tier_emits: a general-engine name, a strict-path name that carries a
recorded non-PIN part, a name that fails a spelling check) used to end the wrapper at once, so the
re-run, which can answer with a name every piece of which a strict producer built
(assembly.strict_ring_prefix), was never tried for it: ‘N-[2-(5-methoxy-1H-indol-3-yl)ethyl]
acetamide’ (melatonin) was declined at the default tier while the same molecule without the methoxy group
is a pin_verified name there.
This module holds the three pieces of that path that do not belong in namer.py:
- *
first_run_declined()– the default tier’s own decision on the first run’s name, the same row and the same rule the caller’s
nameapplies to the name the wrapper returns, without its side effects;- *
first_run_state()– the per-call state of the first run thatOrthonym._tier_row_and_pin_form reads (dispatch class, winning offer, prefix-order fallback), restored when the re-run’s name is not shipped, so the decision on the first run’s name is the one it had before the re-run ran;
- *
rerun_class_guard()– the classes for which a re-run name is not shipped here. “INTRODUCTION” (the Blue Book, sentence:50943): preferred IUPAC names are not identified for the compounds of Chapter (carbohydrates, natural products, lipids, amino acids and peptides), so a sugar-ring molecule, a natural-product scaffold, a lipid backbone or a peptide-like molecule keeps the first run’s result; and a name that breaks a spelling rule of the PIN (
validation.pin_spelling) is no PIN;
*rerun_name_certified() – the certificate that lets a kept re-run name keep the PIN label (DT3 step C).
- orthonym.assembly.pin_rerun.first_run_declined(namer, smiles, name)#
True when the default tier’s emission rule declines
name, the first run’s name ofsmiles.The row is the one
Orthonym._tier_row_and_pin_formderives from the provenance of the first run and the rule isnamer._default_tier_emits: the pairOrthonym._default_tier_decisionapplies to the name the wrapper returns. A row that cannot be derived is no decline (the first run’s name is returned as before).
- orthonym.assembly.pin_rerun.first_run_state(namer, named)#
A function that puts the per-call state of the first run back on
namer; a no-op when the first run named nothing (namedFalse), where nothing reads that state.
- orthonym.assembly.pin_rerun.rerun_class_guard(mol, name)#
The reason the re-run name
nameofmolis not shipped over a declined first run, or None.a pyranose / furanose pattern (
assembly.strict_ring_prefix.carbohydrate_core): “Carbohydrates” (the Blue Book) names carbohydrates with their own names, and “INTRODUCTION” (:50943) identifies no PIN for the compounds of Chapter;a natural-product class of the engine’s own router (
namer.classify_compound_class: steroid, alkaloid, terpene, carbohydrate scaffolds): “NOMENCLATURE FOR NATURAL PRODUCTS BASED ON PARENT HYDRIDES, (ALKALOIDS, STEROIDS, TERPENES,…)” (:50952) sits under the same sentence of;a lipid backbone (
perception.lipids.detect_lipid_backbone: a glyceride, a phospholipid or a sphingoid): the same sentence of, and a glyceride named by prefixes is the method (2) name of “When anions are different, two methods are used” (:31831), whose PIN is the method (1) name (:31846);a dipeptide unit of amino acid residues (
rules.peptides.peptide_of_residues): “AMINO ACIDS AND PEPTIDES” (:54150) is a chapter whose compounds (:50943) gives no PIN, and the substitutive name of a peptide-like molecule is not promoted (DT3 lead decision 1); a heterocyclyl on an acetyl group of an N-acylglycine (‘[2-(4-methylpiperazin-1-yl)acetamido]acetic acid’) is no residue, and the name is the method (1) name of the acetic acid, as the strict path gives it for ‘[2-(pyrrolidin-1-yl)acetamido]acetic acid’;a spelling failure of the PIN (
validation.pin_spelling.check_pin_spelling), for example the stereodescriptor of a substituent at the front of a heteroatom parent,:44643).
- orthonym.assembly.pin_rerun.rerun_name_certified(mol, name)#
True iff the kept re-run name
nameofmolis certified as the PIN by evidence on every part (DT3 step C).A kept re-run name carries pieces a breadth producer built, so it is labelled
pin_unverifiedunless the evidence decides each of its parts: no class of:func:rerun_class_guard “INTRODUCTION”, the Blue Book), no spelling check that fails or abstains (validation.pin_spelling.pin_spelling_report), and a reader that models every parent-bearing unit of the name and no Chapter mark (validation.spelling.coverage.NameCoverage.full). The caller has already required the OPSIN read-back to the full key, the PIN path, no recorded non-PIN part and no multiplicative candidate. Any doubt gives False: the name keepspin_unverified. A check that returns no verdict (UNDECIDED) does not block: the certificate is the class guard, no failing or abstaining check, and full coverage, not a PASS from every check.