Skip to content
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

Chem.MolFromSmiles using SmilesParserParams throws exceptions #4232

Closed
greglandrum opened this issue Jun 10, 2021 · 0 comments · Fixed by #4235
Closed

Chem.MolFromSmiles using SmilesParserParams throws exceptions #4232

greglandrum opened this issue Jun 10, 2021 · 0 comments · Fixed by #4235
Labels
Milestone

Comments

@greglandrum
Copy link
Member

When used from Python the standard behavior of the RDKit molecules parsers is to return None when there's a problem. However if you provide SmilesParserParams the exception makes it to Python:

[16:01:01] Can't kekulize mol.  Unkekulized atoms: 0 1 2


In [19]: Chem.MolFromSmiles('c1cc1',smiles_params)
[16:01:06] Can't kekulize mol.  Unkekulized atoms: 0 1 2

---------------------------------------------------------------------------
KekulizeException                         Traceback (most recent call last)
<ipython-input-19-3599557b90d0> in <module>
----> 1 Chem.MolFromSmiles('c1cc1',smiles_params)

KekulizeException: Can't kekulize mol.  Unkekulized atoms: 0 1 2

This shouldn't happen.

Configuration (please complete the following information):

  • RDKit version: master and the current release branch
  • OS: all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant