Repository navigation
Conversation
for more information, see https://pre-commit.ci
…elax-oe-nitrogen-stereo
added 2 commits
September 24, 2026 21:47
jaclark5
marked this pull request as draft
September 25, 2026 02:01
Contributor
Author
|
This is actually more complex and likely not the solution. In a subset of 232 molecules from ani2x
|
Contributor
Author
|
I think the solution is to move to CW and CCW as discussed in #139 but I think I need to dive into the discussed material there before having a firm opinion. |
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
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.
Close #1008
Problem
In the toolkit we have a permissive stereochemistry assignment stance where we assume that what a user provides should not be changed (in
from_rdkit,Chem.AssignStereochemistry(rdmol, cleanIt=False)), but since OpenEye is the default toolkit it later disagrees with RDKit assignments and we currently choose to throw an error.This is an issue if we import an RDKit molecule into OFF with
from_rdkit, and then try to writeto_smileswhere the latter uses OpenEye (default if available).RDKit and OpenEye Stereo Assignment
Inconsistencies between stereochemistry from RDKit and OpenEye are due to design decisions that aren't wrong, just different. This crops up especially in rings.
OpenEye is conservative in assigning stereo labels in that if it could be R or S, it chooses None instead of choosing one.
RDKit has expanded its stereo labels
- default: legacy iterative refinement
- new:
rdCIPLabelerdigraph with CIP rules (more aggressively applied than OpenEye)Solution
Given that we are permissive in the stereo flags that are input with
from_rdkitit makes sense to follow that through by retaining those stereo flags when writing to smiles and prevent throwing an error if OpenEye happens to be the default backend. This PR replaces that error with simply setting the stereo tag in an OEMolOESetCIPStereoinstead of asking OE's opinion on the tag.Downsides
Related Topics
Based on this analysis I think #901 could be closed with updating documentation with disclaimers about how OpenEye has a conservative stereochemistry assignment and relies on parity or maybe a FAQ page? This issue expects that the stereo labels provided in a smiles should be retained in OpenEye. That is not a decision we have control over.