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 load/save errors in Indigo. #1282

Closed
AliaksandrDziarkach opened this issue Sep 18, 2023 · 0 comments · Fixed by #1284
Closed

SMARTS load/save errors in Indigo. #1282

AliaksandrDziarkach opened this issue Sep 18, 2023 · 0 comments · Fixed by #1284
Assignees

Comments

@AliaksandrDziarkach
Copy link
Collaborator

AliaksandrDziarkach commented Sep 18, 2023

I tested SMARTS load/save using next code:

def test_smarts(smarts_in)
    print(smarts_in)
    qmol = indigo.loadSmarts(smarts_in)
    print(qmol.smarts())

and found next issues:

  1. For any SMARTS part without atom name/number added "!#1" which is wrong. "!#1" should not be added.

Next SMARTS converted into incompatible value:

  1. "*" converted into "!#1"
  2. "[r]" converted into "[x]", "[r0]" and "[r2]" converted into "[!#1;]"
  3. "[+0]" converted into "[!#1;]"
  4. Wrong processing "not" with aliphatic/aromatic atoms: "[!C]" converted into [!#1;!#6;A]
  5. "[!*]" converted into "[#1]"
  6. Ring bond disappeared "c@c" converted to "[#6;a][#6;a]"

Next SMARTS caused save errors:

  1. "[R]" converted into "[x]", "[R0]" to "[x0]". "[R3]" cause error "SMILES saver: Unknown atom attribute 17"
  2. "[v]" cause error "SMILES saver: Unknown atom attribute 12"

Also next bugs:

  1. Sometimes directional bonds converted into single: "c/c" to "[#6;a]-[#6;a]". But [#9]/[#6]=[#6]/[#17] not converted.
  2. [!C] converted into [!#6;A] which is wrong. Same for other "organic subset" atoms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant