orthonym.assembly.handlers.chalcogen_ester#
Note
Internal API. Names and behaviour may change between releases.
a phase chalcogen-ester handler — Tier FRN-E functional-class naming.
Handles selenoester (R-C(=O)-Se-R’) and telluroester (R-C(=O)-Te-R’) per IUPAC + functional-replacement nomenclature. Emits names of the form “X-{alkyl} {chain}X{oate}” where X is “Se” or “Te”:
CC(=O)[Se]C -> “Se-methyl ethaneselenoate” CCC(=O)[Se]C -> “Se-methyl propaneselenoate” CCC(=O)[Se]CC -> “Se-ethyl propaneselenoate” CCC(=O)[Te]C -> “Te-methyl propanetelluroate”
Structurally mirrors handlers/imidate.py: - Predicate consults features.principal_group so the handler defers to higher-
seniority groups (acid / amide / etc.).
Universal substituent enumeration for the alkyl side.
Local longest-carbon-chain DFS + composer._integrate_universal_prefixes for the chain (acyl) side with branched/substituted support.
References: - handlers/imidate.py (Tier FRN-D predicate pattern) - handlers/isothiocyanate.py (Tier-B functional-class direct-return template) - functional_groups.py selenoester / telluroester SMARTS (Plan-02 commit 98e46cbb) - internal notes-FRN.md + + (audit baseline; a phase closure
ships the dedicated handler that was originally backlogged).
- orthonym.assembly.handlers.chalcogen_ester.name_chalcogen_ester(features, mol=None, style='pin')#
a phase selenoester / telluroester functional-class handler.
Algorithm: 1. Identify (C_carbonyl, O, X_chalcogen, C_alkyl) from the SMARTS match. 2. Render the alkyl side via substituent_enumerator.name_substituent so
branched/substituted alkyls (isopropyl, benzyl,…) render correctly.
Render the chain side by walking the longest carbon chain through C_carbonyl and enumerating branch substituents via composer._integrate_universal_prefixes (same path as anhydrides + ester chain renderers).
Emit “{X}-{alkyl} {chain-prefix}{chain-stem}{X-suffix}”.