feat: prochiral labels use superscript and skip enantiotopic by default - #243
Merged
Conversation
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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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