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

CXSmiles isn't properly escaping floating point properties #5466

Closed
bp-kelley opened this issue Jul 27, 2022 · 0 comments · Fixed by #5468
Closed

CXSmiles isn't properly escaping floating point properties #5466

bp-kelley opened this issue Jul 27, 2022 · 0 comments · Fixed by #5468
Labels
Milestone

Comments

@bp-kelley
Copy link
Contributor

Example structure

image

The Chemaxon smiles that rdkit generates is:

O=C(O)CCCCc1cccc2cncn12 |atomProp:1.apKa.4.2:14.apKa.7.54|

Note the second . should be escaped (even though the Chemaxon Docs clearly says that it doesn't for properties)

OC(=O)CCCCc1cccc2cncn12 |atomProp:1.apKa.4.2:14.apKa.7|

The escape code for '.' is .

We do parse it properly though.

>>> m = Chem.MolFromSmiles("OC(=O)CCCCc1cccc2cncn12 |atomProp:1.apKa.4.2:14.apKa.7|")
>>> for atom in m.GetAtoms():
...   if atom.HasProp("apKa"): print(atom.GetIdx(), atom.GetProp("apKa"))
... 
1 4.2
14 7
@bp-kelley bp-kelley added the bug label Jul 27, 2022
bp-kelley pushed a commit to bp-kelley/rdkit that referenced this issue Jul 27, 2022
@greglandrum greglandrum added this to the 2022_03_5 milestone Aug 3, 2022
greglandrum pushed a commit that referenced this issue Aug 3, 2022
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
greglandrum pushed a commit that referenced this issue Aug 4, 2022
Co-authored-by: Brian Kelley <bkelley@relaytx.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.

2 participants