orthonym.data#
Note
Internal API. Names and behaviour may change between releases.
Data module - Lookup tables and reference data.
Contains hand-curated data (primary) merged with auto-imported OPSIN data. Hand-curated entries always take precedence over OPSIN imports on conflict.
- orthonym.data.get_retained_name(canonical_smiles)#
Look up retained name from merged dictionary.
wp7: a producer that builds a larger name AROUND a retained component
(a nucleotide around ‘xanthosine’, a ring assembly, an anhydride,…) may still use an OPSIN-import trivial name without Blue Book PIN evidence; the component is recorded as a non-PIN fragment, so any shipped name that carries it is labelled below pin_verified. The whole-molecule PIN lookup (routing.dispatch_table._handle_retained_name) reads ALL_RETAINED_NAMES only.
- orthonym.data.has_retained_name(canonical_smiles)#
Check if a retained name exists for this SMILES.
- orthonym.data.register_retained_name(canonical_smiles, name)#
Register a retained name at runtime (for testing/dynamic use).
a phase REVIEW: this is the CANONICAL runtime registration API. The legacy
data.retained_names.add_retained_nameis a deprecated alias that now delegates here (per fix) so both APIs keepALL_RETAINED_NAMESand the HC dict in sync.Source: internal notes +.
- orthonym.data.get_general_retained_name(canonical_smiles)#
Look up a general-only (PIN-denied) retained name by canonical SMILES.
Returns None when no such name exists. Consulted ONLY by the
--trivialfallback path (Task 1.9); the default PIN pipeline never calls this.
- orthonym.data.get_unverified_retained_name(canonical_smiles)#
A promoted OPSIN-import trivial name without PIN evidence, or None.