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

MolStandardize: cleanup() function not correctly reassigning stereochemistry #5320

Closed
greglandrum opened this issue May 22, 2022 · 0 comments · Fixed by #5319
Closed

MolStandardize: cleanup() function not correctly reassigning stereochemistry #5320

greglandrum opened this issue May 22, 2022 · 0 comments · Fixed by #5319
Labels
Milestone

Comments

@greglandrum
Copy link
Member

Describe the bug

In [6]: m = Chem.MolFromSmiles("Cl[C@](O)([O-])C(=O)O")

In [7]: nm = rdMolStandardize.Cleanup(m)

In [8]: nm.Debug()
Atoms:
	0 17 Cl chg: 0  deg: 1 exp: 1 imp: 0 hyb: 4 arom?: 0 chi: 0
	1 6 C chg: 0  deg: 4 exp: 4 imp: 0 hyb: 4 arom?: 0 chi: 2
	2 8 O chg: 0  deg: 1 exp: 1 imp: 1 hyb: 4 arom?: 0 chi: 0
	3 8 O chg: 0  deg: 1 exp: 2 imp: 0 hyb: 4 arom?: 0 chi: 0
	4 6 C chg: 0  deg: 3 exp: 4 imp: 0 hyb: 3 arom?: 0 chi: 0
	5 8 O chg: 0  deg: 1 exp: 2 imp: 0 hyb: 3 arom?: 0 chi: 0
	6 8 O chg: -1  deg: 1 exp: 1 imp: 0 hyb: 3 arom?: 0 chi: 0
Bonds:
	0 0->1 order: 1 conj?: 0 aromatic?: 0
	1 1->2 order: 1 conj?: 0 aromatic?: 0
	2 1->3 order: 1 conj?: 0 aromatic?: 0
	3 1->4 order: 1 conj?: 0 aromatic?: 0
	4 4->5 order: 2 conj?: 1 aromatic?: 0
	5 4->6 order: 1 conj?: 1 aromatic?: 0

In [9]: nm.GetAtomWithIdx(1).GetChiralTag()
Out[9]: rdkit.Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CCW

Given that the charge has been moved to the carboxylic acid group, the chiral tag should be UNSPECIFIED:

In [10]: Chem.AssignStereochemistry(nm, force=True, cleanIt=True)

In [11]: nm.GetAtomWithIdx(1).GetChiralTag()
Out[11]: rdkit.Chem.rdchem.ChiralType.CHI_UNSPECIFIED

Configuration (please complete the following information):

  • RDKit version: 2022.03 and master
  • OS: all
@greglandrum greglandrum added this to the 2022_03_3 milestone May 22, 2022
greglandrum added a commit to greglandrum/rdkit that referenced this issue May 22, 2022
@greglandrum greglandrum linked a pull request May 23, 2022 that will close this issue
greglandrum added a commit that referenced this issue May 30, 2022
* Fixes #5317

* Fixes #5318

* Fixes #5320

* Update Code/GraphMol/MolStandardize/Charge.cpp

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
greglandrum added a commit that referenced this issue Jun 2, 2022
* Fixes #5317

* Fixes #5318

* Fixes #5320

* Update Code/GraphMol/MolStandardize/Charge.cpp

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>

Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
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