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

Aromatic atom list is not recognized in SMARTS query #1332

Closed
urszula-gawlowska opened this issue Oct 16, 2023 · 3 comments · Fixed by #1378
Closed

Aromatic atom list is not recognized in SMARTS query #1332

urszula-gawlowska opened this issue Oct 16, 2023 · 3 comments · Fixed by #1378
Assignees

Comments

@urszula-gawlowska
Copy link
Collaborator

urszula-gawlowska commented Oct 16, 2023

When Indigo converts a SMARTS query with a list atoms in aromatic format (lowercase atom symbols, e.g. "c,n") into a structure, the list is not recognized properly and is interpreted as a custom query in the returned structure.

For example, the following query results in a molecule with custom query "c,n" instead of atom list with carbon and nitrogen.
c1-[#6]=[#6]-[#6]=[#6]-[c,n]=1

@urszula-gawlowska urszula-gawlowska changed the title List of atoms in imported smarts file is interpreted as custom query If smarts file contains list of atoms and some attribute then it is interpreted as custom query Oct 16, 2023
@vanoprenko vanoprenko changed the title If smarts file contains list of atoms and some attribute then it is interpreted as custom query Atom list is not recognized when loaded from SMARTS file Oct 16, 2023
@vanoprenko vanoprenko changed the title Atom list is not recognized when loaded from SMARTS file Aromatic atom list is not recognized when loaded from SMARTS file Oct 16, 2023
@vanoprenko
Copy link
Collaborator

@vanoprenko vanoprenko changed the title Aromatic atom list is not recognized when loaded from SMARTS file Aromatic atom list is not recognized in SMARTS query Oct 17, 2023
@vanoprenko
Copy link
Collaborator

Causes epam/ketcher#3455

@vanoprenko
Copy link
Collaborator

Technical details based on investigation:

Payload for layout request:

{
  "struct": "c1-[#6]=[#6]-[#6]=[#6]-[c,n]=1",
  "output_format": "chemical/x-indigo-ket",
  "options": {
    "smart-layout": true,
    "ignore-stereochemistry-errors": true,
    "mass-skip-error-on-pseudoatoms": false,
    "gross-formula-add-rsites": true,
    "aromatize-skip-superatoms": true,
    "dearomatize-on-load": false,
    "ignore-no-chiral-flag": false
  }
}

Response for layout request:

{
    "format": "chemical/x-indigo-ket",
    "original_format": "chemical/x-daylight-smiles",
    "struct": "{\"root\":{\"nodes\":[{\"$ref\":\"mol0\"}]},\"mol0\":{\"type\":\"molecule\",\"atoms\":[{\"label\":\"C\",\"location\":[0.0,0.0,0.0],\"queryProperties\":{\"aromaticity\":\"aromatic\"}},{\"label\":\"C\",\"location\":[-1.3856407403945923,-0.800000011920929,0.0]},{\"label\":\"C\",\"location\":[-1.3856406211853028,-2.4000000953674318,0.0]},{\"label\":\"C\",\"location\":[1.3987644820190327e-7,-3.200000047683716,0.0]},{\"label\":\"C\",\"location\":[1.3856407403945923,-2.3999998569488527,0.0]},{\"label\":\"C\",\"location\":[1.3856407403945923,-0.8000001907348633,0.0],\"queryProperties\":{\"customQuery\":\"c,n\"}}],\"bonds\":[{\"type\":1,\"atoms\":[0,1]},{\"type\":2,\"atoms\":[1,2]},{\"type\":1,\"atoms\":[2,3]},{\"type\":2,\"atoms\":[3,4]},{\"type\":1,\"atoms\":[4,5]},{\"type\":2,\"atoms\":[5,0]}]}}"
}

@github-project-automation github-project-automation bot moved this to Done in Indigo Aug 27, 2024
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.

3 participants