orthonym.assembly.spelling_offer#
Note
Internal API. Names and behaviour may change between releases.
The best-effort tier does not ship a chain-parent name that breaks a spelling rule while another parent of the same molecule gives a name that breaks none.
The spelling checks (validation.pin_spelling) run on a name that would be labelled pin_verified;
a name already below the PIN is never read by them, so a chain-parent name of a secondary or tertiary
amine that was malformed, and labelled systematic_verified for another reason, shipped as it was:
3-(5-chlorofuran-2-yl)-N-2-methoxyethylprop-2-en-1-amine (a compound prefix without its enclosing
marks,, the Blue Book), N,N-dimethyl(diphenyl)methanamine (the multiplicative prefix
inside the parentheses,,:7272), a name with the stereodescriptors of a substituent at its front
,:44643). The parent of such an amine is the chain since counts the nitrogen for every
chain it is bonded to (parent_selection.bridging_group_reaches); before, the ring was chosen by the
order of the atoms and the ring-parent producers gave a clean name.
The pool of parents is an offer (p44_scorer.select_parent_unified, _offer_rank): the chain is
ranked[0], the rings are the junior members. When the name of ranked[0] breaks a spelling rule, the
junior members are named in turn, and the first whose name breaks none, reads back to the input, and has a label
not below the label of the chain-parent name replaces it (never pin_verified: a junior parent is not the PIN
while the PIN tier declines it). No such name: the chain-parent name ships, as before, and
the rules it breaks are listed in the row’s spelling_failures. The PIN tier is not touched (it declines a name
that breaks a rule), nor is any molecule whose parent is not a chain parent of an amine.
- orthonym.assembly.spelling_offer.note_amine_chain_parent(features)#
Note that the name added to the pool for
featuresis built on the chain parent of a secondary or tertiary amine (cyclic molecule: the rings are the other members of the pool). Only for the molecule being named, not for a substituent named inside it.
- orthonym.assembly.spelling_offer.name_tiered_with_offer(namer, smiles, run)#
run(smiles), the tiered naming of the molecule, then:func:prefer_clean_name on its row and, for a best-effort abstention,default_tier_offer.offer_default_tier_row. The flag and the held names of an earlier naming are cleared first, so what the row is offered never depends on what was named before it.
- orthonym.assembly.spelling_offer.prefer_clean_name(namer, smiles, row, passes=())#
rowof the best-effort tier, or the row of the junior parent whose name breaks no spelling rule when the chain-parent name ofrowbreaks one (see the module docstring).passesare the memo scopes of the namings that maderow(memo.recording_scopes): the junior namings start with the names of the nested calls those namings made.