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

valid SMARTS with cycles cause error in loader #1292

Closed
AliaksandrDziarkach opened this issue Oct 2, 2023 · 1 comment · Fixed by #1356
Closed

valid SMARTS with cycles cause error in loader #1292

AliaksandrDziarkach opened this issue Oct 2, 2023 · 1 comment · Fixed by #1356
Assignees
Projects

Comments

@AliaksandrDziarkach
Copy link
Collaborator

AliaksandrDziarkach commented Oct 2, 2023

Try to load smarts c:1-2:c(:c:c:c:c:1)-[#6](=[#8])-[#6;X4]-[#6]-2=[#8] using next code

#!/bin/env python3
import os
import sys

sys.path.append(
    os.path.normpath(
        os.path.join(os.path.abspath(__file__), "..", "..", "..", "common")
    )
)
from env_indigo import *

indigo = Indigo()

indigo.loadSmarts("c:1-2:c(:c:c:c:c:1)-[#6](=[#8])-[#6;X4]-[#6]-2=[#8]")

Got next error:

  File "api\tests\integration\tests\formats\smarts.py", line 14, in <module>
    indigo.loadSmarts("c:1-2:c(:c:c:c:c:1)-[#6](=[#8])-[#6;X4]-[#6]-2=[#8]")
  File "C:\Python\Python38\lib\site-packages\indigo\indigo\indigo.py", line 513, in loadSmarts
    IndigoLib.checkResult(
  File "C:\Python\Python38\lib\site-packages\indigo\indigo\indigo_lib.py", line 1003, in checkResult
    raise exception_class(IndigoLib.lib.indigoGetLastError())
indigo.indigo.indigo_exception.IndigoException: array: invalid index -1 (size=12)

Which id wrong.

@AliaksandrDziarkach AliaksandrDziarkach added this to Product Backlog in Indigo via automation Oct 2, 2023
@AliaksandrDziarkach AliaksandrDziarkach self-assigned this Oct 4, 2023
@AliaksandrDziarkach AliaksandrDziarkach moved this from Product Backlog to In progress in Indigo Oct 4, 2023
@AliaksandrDziarkach
Copy link
Collaborator Author

AliaksandrDziarkach commented Oct 18, 2023

Caused when more than one cycle specified after atom.

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.

2 participants