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

Doing a match of a recursive smarts leaves traces of the previous match #3403

Closed
bp-kelley opened this issue Sep 9, 2020 · 2 comments · Fixed by #3405
Closed

Doing a match of a recursive smarts leaves traces of the previous match #3403

bp-kelley opened this issue Sep 9, 2020 · 2 comments · Fixed by #3405
Assignees
Labels
Milestone

Comments

@bp-kelley
Copy link
Contributor

bp-kelley commented Sep 9, 2020

Configuration:

  • RDKit Version: 2020.03
  • Operating system: All
    Description:
from rdkit import Chem
core1 = "[$(C-!@[a])](=O)(Cl)"
sma = Chem.MolFromSmarts(core1)

m = Chem.MolFromSmiles("c1ccccc1C(=O)Cl")
assert not m.HasSubstructMatch(sma, recursionPossible=False), "I shouldn't match (1)"

m = Chem.MolFromSmiles("c1ccccc1C(=O)Cl")
assert mh.HasSubstructMatch(sma)

m = Chem.MolFromSmiles("c1ccccc1C(=O)Cl")
assert not m.HasSubstructMatch(sma, recursionPossible=False), "I shouldn't match (2)"
@bp-kelley bp-kelley added the bug label Sep 9, 2020
@bp-kelley bp-kelley added this to the 2020_03_6 milestone Sep 9, 2020
@bp-kelley
Copy link
Contributor Author

Hm... that's a bogus test...

@bp-kelley
Copy link
Contributor Author

Fixed the test

@bp-kelley bp-kelley reopened this Sep 9, 2020
bp-kelley added a commit to bp-kelley/rdkit that referenced this issue Sep 9, 2020
@bp-kelley bp-kelley mentioned this issue Sep 9, 2020
greglandrum pushed a commit that referenced this issue Sep 10, 2020
* Fixes #3403

* Fix Typo

V is actually a set so we can clear it.

* Fix bug, use self.assertFalse
greglandrum pushed a commit that referenced this issue Sep 19, 2020
* Fixes #3403

* Fix Typo

V is actually a set so we can clear it.

* Fix bug, use self.assertFalse
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.

2 participants