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

Information about charges and isotopes lost when calling AdjustQueryProperties #3388

Closed
greglandrum opened this issue Sep 2, 2020 · 0 comments
Assignees
Labels
Milestone

Comments

@greglandrum
Copy link
Member

greglandrum commented Sep 2, 2020

  • RDKit Version: 2020.03.x and master
  • Operating system: all

Description:

In [2]: m = Chem.MolFromSmiles('[13CH2]C[O-]')

In [3]: Chem.MolToSmarts(m)
Out[3]: '[13#6H2]-[#6]-[#8-]'

In [4]: ps = Chem.AdjustQueryParameters()

In [5]: ps.adjustDegreeFlags = Chem.AdjustQueryWhichFlags.ADJUST_IGNORENONE

In [6]: ps.adjustDegree = True

In [7]: nm = Chem.AdjustQueryProperties(m,ps)

In [8]: Chem.MolToSmarts(nm)
Out[8]: '[#6&D1]-[#6&D2]-[#8&D1]'

This is actually caused by the fact that the QueryAtom(const Atom &) ctor is doing the wrong thing.

@greglandrum greglandrum added the bug label Sep 2, 2020
@greglandrum greglandrum added this to the 2020_03_6 milestone Sep 2, 2020
@greglandrum greglandrum self-assigned this Sep 2, 2020
greglandrum added a commit to greglandrum/rdkit that referenced this issue Sep 2, 2020
greglandrum added a commit that referenced this issue Sep 19, 2020
* Fixes #3388

* add a test for numradicals too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant