Skip to content

feat: prochiral labels use superscript and skip enantiotopic by default - #243

Merged
lpatiny merged 2 commits into
mainfrom
feat/prochiral-superscript-diastereotopic
Jul 29, 2026
Merged

feat: prochiral labels use superscript and skip enantiotopic by default#243
lpatiny merged 2 commits into
mainfrom
feat/prochiral-superscript-diastereotopic

Conversation

@lpatiny

@lpatiny lpatiny commented Jun 30, 2026

Copy link
Copy Markdown
Member

Render pro-R/pro-S CH2 hydrogen labels as superscripts (']' prefix), matching
the skeleton numbering from applyFragmentLabels. By default only diastereotopic
hydrogens are labelled; setProchiralHydrogenLabels now takes
{ includeEnantiotopic } to also label enantiotopic ones (e.g. ethanol CH2).

Tests also assert the idCode of the molecule carrying the custom labels.

Assisted-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Render pro-R/pro-S CH2 hydrogen labels as superscripts (']' prefix), matching
the skeleton numbering from applyFragmentLabels. By default only diastereotopic
hydrogens are labelled; setProchiralHydrogenLabels now takes
{ includeEnantiotopic } to also label enantiotopic ones (e.g. ethanol CH2).

Tests also assert the idCode of the molecule carrying the custom labels.

Assisted-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.50%. Comparing base (91390f5) to head (957c681).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/topic/TopicMolecule.ts 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #243      +/-   ##
==========================================
+ Coverage   90.48%   90.50%   +0.01%     
==========================================
  Files          94       94              
  Lines        2743     2758      +15     
  Branches      704      710       +6     
==========================================
+ Hits         2482     2496      +14     
- Misses        238      239       +1     
  Partials       23       23              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

openchemlib 9.24.0 fixes custom labels on hydrogens being dropped from
the canonized idCode (Actelion/openchemlib#171), so the compact-copy
helper is no longer needed to preserve the pro-R/pro-S labels. Inline
moleculeWithH.getCanonizedIDCode(CANONIZER_ENCODE_ATOM_CUSTOM_LABELS) at
the assertion sites, drop the getLabeledIDCode helper, and require
openchemlib >=9.24.0. The direct call reorders atoms in place, so each
idCode assertion now runs after the index-based snapshot in its test.

Assisted-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lpatiny
lpatiny merged commit 00a6047 into main Jul 29, 2026
10 checks passed
@lpatiny
lpatiny deleted the feat/prochiral-superscript-diastereotopic branch July 29, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant