Indigo Similarity Bug

21 views
Skip to first unread message

Mohamed El-Dirany

unread,
Apr 26, 2018, 3:03:31 AM4/26/18
to indig...@googlegroups.com
Hi,

For some reason I'm facing a bug when I'm dealing with trying to get similarities between a large amount of molecules. I have the following code:

>>> from indigo import *
>>> indigo = Indigo()
       molecules.append(mol)
        except Exception as err:
            print(smiles)
            print(err)
            continue
>>>
>>> molecules = []
>>>
>>> with open("../CompoundsInGI50.txt") as f:
...     for line in f:
...         linesplit = line.split(",")
...         number = linesplit[0]
...         smiles = linesplit[1]
...         try:
...             mol = indigo.loadMolecule(smiles)
...             molecules.append(mol)
...         except Exception as err:
...             print(smiles)
...             print(err)
...             continue
...
>>> len(molecules)
31429
>>> molecules[0]
<indigo.IndigoObject object at 0x2b9540b43e48>
>>> molecules[0]
<indigo.IndigoObject object at 0x2b9540b43e48>
>>> indigo.similarity(molecules[0], molecules[0], 'tversky')
0.0

So as you can see, for some reason, finding the similarity between the same molecule gives me 0, and the similarity ALWAYS gives me 0 in this specific case. When I try loading another molecule manually, it doesn't seem to run into this error. Is there any possible reason why this might be happening or how to fix it?

Best,
Mohamed
Reply all
Reply to author
Forward
0 new messages