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

Implicit H count is not added to the SMARTS file #1330

Closed
urszula-gawlowska opened this issue Oct 13, 2023 · 2 comments · Fixed by #1365
Closed

Implicit H count is not added to the SMARTS file #1330

urszula-gawlowska opened this issue Oct 13, 2023 · 2 comments · Fixed by #1365
Assignees
Projects

Comments

@urszula-gawlowska
Copy link
Collaborator

urszula-gawlowska commented Oct 13, 2023

Steps to Reproduce

  1. Launch "Ketcher"
  2. Draw structure on the canvas
  3. Double click on any atom
  4. Go to "Query specific" section
  5. Set Implicit H count to 5
  6. Click 'Apply'
  7. Click on the "Save as" button
  8. Select the "Daylight SMARTS" file format

Expected behavior
Implicit H count should be marked at the SMARTS file as: h5

Actual behavior
SMARTS is created in the incorrect way:

[#6](-[#6])(-[#6])-[#6]

Payload:

{
  "struct": "{\n    \"root\": {\n        \"nodes\": [\n            {\n                \"$ref\": \"mol0\"\n            }\n        ]\n    },\n    \"mol0\": {\n        \"type\": \"molecule\",\n        \"atoms\": [\n            {\n                \"label\": \"C\",\n                \"location\": [\n                    7.366987298107781,\n                    -4.7,\n                    0\n                ]\n            },\n            {\n                \"label\": \"C\",\n                \"location\": [\n                    8.23301270189222,\n                    -4.2,\n                    0\n                ]\n            },\n            {\n                \"label\": \"C\",\n                \"location\": [\n                    6.500961894323343,\n                    -4.2,\n                    0\n                ],\n                \"implicitHCount\": 5\n            },\n            {\n                \"label\": \"C\",\n                \"location\": [\n                    7.366987298107781,\n                    -5.7,\n                    0\n                ]\n            }\n        ],\n        \"bonds\": [\n            {\n                \"type\": 1,\n                \"atoms\": [\n                    0,\n                    1\n                ]\n            },\n            {\n                \"type\": 1,\n                \"atoms\": [\n                    0,\n                    2\n                ]\n            },\n            {\n                \"type\": 1,\n                \"atoms\": [\n                    0,\n                    3\n                ]\n            }\n        ]\n    }\n}",
  "output_format": "chemical/x-daylight-smarts",
  "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,
    "gross-formula-add-isotopes": true
  }
}

Response:

{
    "format": "chemical/x-daylight-smarts",
    "original_format": "unknown",
    "struct": "[#6](-[#6])(-[#6])-[#6]"
}

Attachments
implicit_h_count_bug

Indigo/Bingo version
Version 1.15.0-dev.1.0-g5ee0dbc7d-x86_64-linux-gnu-11.2.1

@AliaksandrDziarkach
Copy link
Collaborator

Fixed with 7a7575a
Available from indigo 1.15.0-dev.4

Indigo automation moved this from Product Backlog to Done Oct 19, 2023
Indigo automation moved this from Done to Product Backlog Oct 19, 2023
@urszula-gawlowska
Copy link
Collaborator Author

urszula-gawlowska commented Oct 19, 2023

It is noticed that when any other attribute for atom (e.g. Substitution count) is set up together with implicit H count then it is save properly at SMARTS file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Indigo
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants