SMILES saver: _writeRingCisTrans(): internal (substituent not found)

4 views
Skip to first unread message

Colin Batchelor

unread,
Aug 11, 2011, 8:32:44 AM8/11/11
to indigo-bugs
Hello,

I'm experimenting with generating SMILES strings and I've found that
if I supply indigo with this molfile:

Structure #2
InChIV10

20 20 0 0 0 0 0 0 0 0 1 V2000
2.0000 3.0000 0.0000 N 0 0 0 0 0 0 0 0 0
5.4641 3.0000 0.0000 N 0 0 0 0 0 0 0 0 0
5.4641 -3.0000 0.0000 N 0 0 0 0 0 0 0 0 0
2.0000 -3.0000 0.0000 N 0 0 0 0 0 0 0 0 0
3.7321 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0
3.7321 -1.0000 0.0000 C 0 0 0 0 0 0 0 0 0
2.8660 0.5000 0.0000 C 0 0 0 0 0 0 0 0 0
4.5981 0.5000 0.0000 C 0 0 0 0 0 0 0 0 0
2.8660 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0
4.5981 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0
3.7321 2.0000 0.0000 C 0 0 0 0 0 0 0 0 0
3.7321 -2.0000 0.0000 C 0 0 0 0 0 0 0 0 0
2.8660 2.5000 0.0000 C 0 0 0 0 0 0 0 0 0
4.5981 2.5000 0.0000 C 0 0 0 0 0 0 0 0 0
4.5981 -2.5000 0.0000 C 0 0 0 0 0 0 0 0 0
2.8660 -2.5000 0.0000 C 0 0 0 0 0 0 0 0 0
2.3291 0.8100 0.0000 H 0 0 0 0 0 0 0 0 0
5.1350 0.8100 0.0000 H 0 0 0 0 0 0 0 0 0
2.3291 -0.8100 0.0000 H 0 0 0 0 0 0 0 0 0
5.1350 -0.8100 0.0000 H 0 0 0 0 0 0 0 0 0
1 13 3 0 0 0 0
2 14 3 0 0 0 0
3 15 3 0 0 0 0
4 16 3 0 0 0 0
5 7 1 0 0 0 0
5 8 1 0 0 0 0
5 11 2 0 0 0 0
6 9 1 0 0 0 0
6 10 1 0 0 0 0
6 12 2 0 0 0 0
7 9 2 0 0 0 0
7 17 1 0 0 0 0
8 10 2 0 0 0 0
8 18 1 0 0 0 0
9 19 1 0 0 0 0
10 20 1 0 0 0 0
11 13 1 0 0 0 0
11 14 1 0 0 0 0
12 15 1 0 0 0 0
12 16 1 0 0 0 0
M END

then I get a SMILES saver: _writeRingCisTrans(): internal (substituent
not found) error with the following code:

foreach (IndigoObject item in i.iterateSDFile(sdf))
{
IndigoObject moleculeInSMILES = i.loadMolecule(item.smiles());
}

Is there anything obviously wrong I'm doing?

Best wishes,
Colin.

Mikhail Rybalkin

unread,
Aug 11, 2011, 11:27:01 AM8/11/11
to indigo-bugs
Hello Colin,

This is a bug in Indigo and thank you for providing this bug report.
Tomorrow we will release an updated version with this bug fixed and
with some new functions.

As a temporary solution you can fold hydrogens before calling
item.smiles():
item.foldHydrogens();
item.smiles();

Or if you need explicit hydrogens:
item.foldHydrogens();
item.unfoldHydrogens();
item.smiles();


With best regards,
Mikhail Rybalkin

Colin Batchelor

unread,
Aug 11, 2011, 11:41:32 AM8/11/11
to indigo-bugs
Brilliant; many thanks for the swift response!

Mikhail Rybalkin

unread,
Aug 13, 2011, 4:03:38 AM8/13/11
to indigo-bugs
Hello Colin,

This issue has already been fixed in Indigo 1.1-beta5
But additional testing revealed that is some rare cases our canonical
smiles is different for molecule with and without explicit hydrogens.
We will fix this in the next release.

With best regards,
Mikhail
Reply all
Reply to author
Forward
0 new messages