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

SMARTS parser fails on high-numbered ring closures in branches #2909

Closed
greglandrum opened this issue Jan 26, 2020 · 0 comments · Fixed by #2912
Closed

SMARTS parser fails on high-numbered ring closures in branches #2909

greglandrum opened this issue Jan 26, 2020 · 0 comments · Fixed by #2912
Labels
Milestone

Comments

@greglandrum
Copy link
Member

  • RDKit Version: master
  • Operating system: all

Here's the demo:

In [9]: Chem.MolFromSmarts('C%(5000)CCCC%(5000)')                               
Out[9]: <rdkit.Chem.rdchem.Mol at 0x7f8f98da6490>

In [10]: Chem.MolFromSmarts('C%(5000)CCC(C%(5000))')                            
[16:52:20] SMARTS Parse Error: unclosed ring for input: 'C%(5000)CCC(C%(5000))'

In [11]: Chem.MolFromSmarts('C%(5000)CCC.C%(5000)')                             
Out[11]: <rdkit.Chem.rdchem.Mol at 0x7f8f98dbb170>
@greglandrum greglandrum modified the milestones: 2019_09_4, 2020_03_1 Jan 26, 2020
greglandrum added a commit to greglandrum/rdkit that referenced this issue Jan 27, 2020
greglandrum added a commit that referenced this issue Jan 29, 2020
* first cleanup

* next round of changes. all tests pass

* Fixes #2909

* Fixes #2910

* further cleanup

* some cleanup/refactoring of the Dict class

* remove now extraneous calls to hasProp() before clearProp()

* minor refactoring of RDProps.h

* Switch from using our own version of round() to std::round()

* replace some boost::math stuff with the equivalents from std::

* cleanups in SmartsWrite

* refactor out a bunch of duplicated code

* fix an instance of undefined behavior

* changes in response to review
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