-
Notifications
You must be signed in to change notification settings - Fork 845
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
MolToSmiles(kekuleSmiles=True) gives SMILES with aromatic bonds #2788
Comments
I like the idea of calling |
What happens when kekulize fails? Throw the exception or fall back to the current behavior? |
Throwing the exception seems the safest option to me, as the user has a chance to take actions in response, even just skipping the molecule. |
We would need to document the fact that it can fail/throw an exception, but that's no big deal |
In my search to look for contributions to make (possibly helping with the 2020_09 release), I came across this. |
Hi @jvansan : apologies for the months-late reply... I didn't notice this your offer until today. If you're still interested in doing this (it hasn't been implemented yet) please let me know; otherwise I will go ahead and do it. |
Description:
The documentation for MolToSmiles says:
If I try it out with caffeine, it produces a SMILES with aromatic bonds:
Given the documentation, I expected it to use single and double bonds instead of ":".
The above is almost certainly an error as the resulting SMILES cannot be processed by the RDKit:
I can generate a Kekule output by first calling Kekulize():
My suggestion is either that kekuleSmiles=True call Kekulize() itself (perhaps in a form which does not modify the molecule?) or the documentation be updated to point out that Kekulize() must be called first.
The text was updated successfully, but these errors were encountered: