Indigo icon indicating copy to clipboard operation
Indigo copied to clipboard

Importing the one of structure. Its containing R Group

Open mohanmtm opened this issue 2 years ago • 1 comments

We used Code snippet: IndigoObject struct; if (structureMolfile.contains("RXN")) { // load as Reaction string struct = indigoApi.loadReaction(structureMolfile); } else { // load as regular molfile string struct = indigoApi.loadMolecule(structureMolfile); }

Expected behavior Need to loadMolecule.

Actual behavior Its hitting exception: Caused by: com.epam.indigo.IndigoException: molecule: allowRGroupOnRSite(): rgroup number 0 is invalid at com.epam.indigo.Indigo.checkResult(Indigo.java:92) ~[indigo-1.3.0beta.r16.jar:?] at com.epam.indigo.Indigo.loadMolecule(Indigo.java:466) ~[indigo-1.3.0beta.r16.jar:?]

Attachments Structure data: ARnext structure with Rgroup.cdx ChemDraw08042213592D

9 9 0 0 0 0 0 0 0 0999 V2000 -1.4360 0.0015 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.7215 -0.4110 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.0095 0.0027 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.0112 0.8287 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -1.4423 0.8225 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.7318 -0.4138 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 0.7313 -1.2406 0.0000 R 0 0 0 0 0 0 0 0 0 0 0 0 1.4423 0.0004 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.7376 1.2406 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 2 3 1 0
3 4 2 0
5 1 1 0
1 2 2 0
6 7 1 0
6 8 1 0
6 3 1 0
5 9 2 0
9 4 1 0
A 8 R' M END

mohanmtm avatar Aug 05 '22 10:08 mohanmtm

Hi @mohanmtm I was not able to reproduce the issue

import indigo

indigo = indigo.Indigo()
print(indigo.version())
mol = indigo.loadMoleculeFromFile("test_rgroup.mol")
print(mol.smiles())
1.6.1.0-g5dbb0c0f4-x86_64-linux-gnu-10.2.1
C1=CC(N%91C)=CC=C1.[*]%91

AlexanderSavelyev avatar Aug 10 '22 15:08 AlexanderSavelyev