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

Why is it not possible to make an image for this substance? #886

Closed
digitalroll opened this issue Nov 1, 2022 · 1 comment · Fixed by #1089
Closed

Why is it not possible to make an image for this substance? #886

digitalroll opened this issue Nov 1, 2022 · 1 comment · Fixed by #1089
Labels

Comments

@digitalroll
Copy link

There is an SDF code for the substance:


 csChFnd80/10182207592D

 13 12  0  0  0  0  0  0  0  0999 V2000
   10.5699  -11.4468    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    9.8555  -11.0343    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.8555  -10.2093    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    9.1410  -11.4468    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   10.5699  -12.2717    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.4265  -11.0343    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    7.7121  -11.4468    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.7121  -12.2717    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.9976  -11.0343    0.0000 C   0  0  3  0  0  0  0  0  0  0  0  0
    6.2832  -11.4468    0.0000 S   0  0  3  0  0  0  0  0  0  0  0  0
    5.5687  -11.0343    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.9976  -10.2093    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.2832  -12.2717    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  2  3  2  0  0  0  0
  2  4  1  0  0  0  0
  1  5  1  0  0  0  0
  4  6  1  4  0  0  0
  6  7  2  0  0  0  0
  7  8  1  0  0  0  0
  7  9  1  0  0  0  0
  9 10  1  0  0  0  0
 10 11  1  0  0  0  0
  9 12  1  0  0  0  0
 10 13  2  0  0  0  0
M  END

If I try to create an image for it using such a request:

{
  "data": {
    "type": "render",
    "attributes": {
      "compound": {
        "structure": "\n csChFnd80/10182207592D\n\n 13 12  0  0  0  0  0  0  0  0999 V2000\n   10.5699  -11.4468    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n    9.8555  -11.0343    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    9.8555  -10.2093    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n    9.1410  -11.4468    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n   10.5699  -12.2717    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    8.4265  -11.0343    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n    7.7121  -11.4468    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    7.7121  -12.2717    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.9976  -11.0343    0.0000 C   0  0  3  0  0  0  0  0  0  0  0  0\n    6.2832  -11.4468    0.0000 S   0  0  3  0  0  0  0  0  0  0  0  0\n    5.5687  -11.0343    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.9976  -10.2093    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.2832  -12.2717    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  2  0  0  0  0\n  2  4  1  0  0  0  0\n  1  5  1  0  0  0  0\n  4  6  1  4  0  0  0\n  6  7  2  0  0  0  0\n  7  8  1  0  0  0  0\n  7  9  1  0  0  0  0\n  9 10  1  0  0  0  0\n 10 11  1  0  0  0  0\n  9 12  1  0  0  0  0\n 10 13  2  0  0  0  0\nM  END\n",
        "format": "molfile"
      },
      "outputFormat": "image/png"
    }
  }
}

Then I get this error:

{
  "errors": [
    {
      "detail": "molfile loader: direction of bond #4 makes no sense"
    }
  ]
}

But if I open this substance in Ketcher, then I see the correct structure:

1

And I can even export an image of this substance:

2

Why does Indigo give an error? How to make the right image?

Indigo/Bingo version
1.7.0

@digitalroll digitalroll added the Bug label Nov 1, 2022
@AATDev21
Copy link
Collaborator

There is a stereo-error in the molecule you used in the request, that why you got error message instead of an image. If you are sure anyway that this molecule is correct or this kind of errors are not important for you, they can be ignored with the option "ignore-stereochemistry-errors". Using of Indigo options in Indigo Service will be implemented soon in #1083.

@AATDev21 AATDev21 linked a pull request Mar 31, 2023 that will close this issue
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