New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support allenes in canonicalizing double bonds, fixes #7044 #7137
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pechersky Thanks for the contribution!
I just made a PR against your branch with a suggested alternate formulation of the fix; take a look and see what you think.
alternate solution to the problem
Thanks @greglandrum! I appreciate the direct fix. I had kept my fix localized to allenes because I was afraid of a similar issue popping up in other molecules which would have helped expose some other issue. If you're feeling good about exiting early in any such situation, I'm good with that too. |
I've been trying to test locally, but have been hitting some cmake troubles (since the last time I had it working):
So, excuse my clumsy CI-testing in the meantime please =) |
@greglandrum Would be happy to have a re-review. The implementation comes from your PR. |
Reference Issue
Fixes #7044
What does this implement/fix? Explain your changes.
During canonicalization of double bonds, neighbor bonds have to be found to correctly label the stereochem. During #6643, the allene case was not supported. This case comes up during a Tautomer Canonicalization of conjugated nitro or oximes. So I added tests around those (ones that came up in the issues and real-life use cases).
Any other comments?
I tried to make changes in the actual Tautomer Canonicalization to not copy stereo atoms in allene situations, but it seemed more direct to avoid a nullptr situation and hope that that is doing the right thing. The new tests should shore up that the hope is true, and the rest of tests passing means that it is a targeted fix.