-
Notifications
You must be signed in to change notification settings - Fork 17
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
SmilesWidget: Canonicalize SMILES code #507
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #507 +/- ##
==========================================
+ Coverage 79.42% 79.44% +0.02%
==========================================
Files 27 27
Lines 3757 3785 +28
==========================================
+ Hits 2984 3007 +23
- Misses 773 778 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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 tested in on my local instance and it works. It does not fix an open problem I have with a SMILE, that I never reported:
CC1=C(C)C(C2=C3C=CC4=C(C5=C(C)C(C)=C(C6=C(C=CC=C7)C7=CC8=C6C=CC=C8)C(C)=C5C)C9=CC=C%10N9[Fe]%11(N%12C(C=CC%12=C(C%13=C(C)C(C)=C(C%14=C(C=CC=C%15)C%15=CC%16=C%14C=CC=C%16)C(C)=C%13C)C%17=CC=C2N%17%11)=C%10C%18=C(C)C(C)=C(C%19=C(C=CC=C%20)C%20=CC%21=C%19C=CC=C%21)C(C)=C%18C)N43)=C(C)C(C)=C1C%22=C(C=CC=C%23)C%23=CC%24=C%22C=CC=C%24
@cpignedoli thanks for taking a look. Can you please open a new issue for this new SMILES? Interestingly, in my application that generates multiple conformers it works. It looks like passing |
94679cd
to
fad92d9
Compare
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.
The code looks good to me. Provided that @cpignedoli tested it, I approve 👍
* fix pseudodojo in report and load_panel_value * Refactoring of pseudo selector widget, renamed the protocol name. * add test for pseudodojo --------- Co-authored-by: Jusong Yu <[email protected]>
Canonicalize user-provided SMILES using RDKit. If the canonical name is different from the input SMILES, we print the canonical SMILES.
Test plan:
C=CC1=C(C2=CC=C(C3=CC=CC=C3)C=C2)C=C(C=C)C(C4=CC=C(C(C=C5)=CC=C5C(C=C6C=C)=C(C=C)C=C6C7=CC=C(C(C=C8)=CC=C8C(C=C9C=C)=C(C=C)C=C9C%10=CC=CC=C%10)C=C7)C=C4)=C1
should give you
C=Cc1cc(-c2ccc(-c3ccc(-c4cc(C=C)c(-c5ccc(-c6ccc(-c7cc(C=C)c(-c8ccc(-c9ccccc9)cc8)cc7C=C)cc6)cc5)cc4C=C)cc3)cc2)c(C=C)cc1-c1ccccc1
and should not fail.
I also add a missing error check that caused uncaught exception in #505
Closes #505. Closes #331