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
No coords atropisomers - fix smiles output of atrop wedges after reordering #7418
Conversation
clang-format
document representation
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.
A couple of small suggestions
"ZM374979_atrop2.sdf"}; | ||
|
||
for (auto file : files) { | ||
std::cout << "File: " << file << std::endl; |
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.
Please don't include output like this in the tests, it makes the running the tests really noisy and doesn't add anything. If there's an informative message that you want to output when a test fails, you can do that with catch2's INFO()
macro.
I know that I approved several older PRs that also have a large amount of output, but I plan to do a PR to clean that up in the not-too-distant future.
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.
OK
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.
You fixed that one example, but there are a number of other outputs to std::cout in that file and in the other tests added for this PR
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.
I think I got them all - probably one I didn't put in.
Atropisomers::AtropAtomAndBondVec atomAndBondVecs[2]; | ||
if (!Atropisomers::getAtropisomerAtomsAndBonds( | ||
bondNbr, atomAndBondVecs, mol)) { | ||
throw RDKit::SmilesParseException( |
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.
This shouldn't be a SmilesParseException
since we aren't parsing SMILES at this point.
This should either be a ValueError
if it's something which could happen but shouldn't or handled using the RDKit's CHECK_INVARIANT()
if this only happens in the case of an RDKit bug.
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.
changed to value error
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.
LGTM
Thanks @tadhurst-cdd ! |
Reference Issue
Needed for several things, including ("the Canonicalization of Enhanced stereo for](#7041")
What does this implement/fix? Explain your changes.
Allows atropisomers to be represented with wedge bonds even when there are no coordinates. The assumption is that the lowest numbered "other atom" are each end are considered to be on the same side of the atropisomer bond.
Any other comments?