Indigo icon indicating copy to clipboard operation
Indigo copied to clipboard

Indigo Toolkit is to pedantic with CXSMILES input

Open johnmay opened this issue 2 years ago • 0 comments

Steps to Reproduce

Indigo toolkit 1.14.0 via Java

Indigo indigo = new Indigo();
indigo.loadMolecule("C1(=C(C=C(C=C1*)*)N)[N+](=O)[O-] |$;;;;;;R3;R1$|");
IndigoInchi indigoInchi = new IndigoInchi(indigo);
IndigoObject mol         = indigo.loadMolecule(smi);

Expected behavior

The SMILES C1(=C(C=C(C=C1*)*)N)[N+](=O)[O-] |$;;;;;;R3;R1$| should be parsed without error. The compactness CXSMILES allows you omit trailing delimiters. You can confirm MarvinJS https://marvinjs-demo.chemaxon.com/latest/ does not complain on input.

Actual behavior

Indigo throws an error and expects the label count to equal the number of atoms:

C1(=C(C=C(C=C1*)*)N)[N+](=O)[O-] |$;;;;;;R3;R1;;;;$|

https://marvinjs-demo.chemaxon.com/latest/

Attachments

Indigo/Bingo version

1.14.0, 1.13.0 and others (I only tested those two).

Additional context

At the least a warning would be better than an error, but such inputs are unambiguous.

johnmay avatar Nov 08 '23 09:11 johnmay