epam / epam/Indigo

BingoNoSQL produces different similarity scores for the same molecule

Open
#257 1 comment 0 reactions 1 assignee Claimed by @mkviatkovskii View on GitHub
Indigo API
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

I've got an input SMILES string for which bingo produces different similarity results depending on whether the indexed molecule is provided as inchi or SMILES. I need to have the similarity results be consistent regardless of the initial encoding of the indexed molecule.

Input:

SMILES (a): CC(C)(C)OC(=O)N(CC1=CN=C(C=C1)OC)C2=NC(=C(C=C2)C=O)F

Indexed molecule (as SMILES)

SMILES (b): CC1=C(C=NC=C1C2=C(C(=C3C=NC(=CC3=C2)NC(=O)OC4CCOCC4)N)F)N

Indexed molecule (as InChI)

InChI=1S/C21H22FN5O3/c1-11-15(8-25-10-17(11)23)14-6-12-7-18(26-9-16(12)20(24)19(14)22)27-21(28)30-13-2-4-29-5-3-13/h6-10,13H,2-5,23-24H2,1H3,(H,26,27,28)
SMILES (c), from mol.smiles() on the above molecule: Cc1c(N)c[n]cc1-c1c(F)c(N)c2c(cc(N=C(OC3CCOCC3)O)[n]c2)c1 |w:20,r|

Note that indigo will report the two molecules as equal if the objects are created from SMILES b and c.

indigo = indigo.Indigo() # see options used below
smiles_a = (from above)
smiles_b = (from above)
inchi = (from above)

mol = indigo.loadMolecule(smiles_a)
mol.standardize()
mol2 = indigo.loadMolecule(smiles_b)
mol2.standardize()
mol3 = indigo.loadMolecule(inchi)
mol3.standardize()
db = bingo.Bingo.createDatabaseFile(indigo, 'bingodb', 'molecule', '')
db.insert(mol2, 2)
db.insert(mol3, 3)
matcher = db.searchSim(mol, 0, 1, 'tanimoto')
results = []
matcher.next()
results.append((matcher.getCurrentId(), matcher.getCurrentSimilarityValue()))
matcher.next()
results.append((matcher.getCurrentId(), matcher.getCurrentSimilarityValue()))

The similarity for the smiles-based molecule is about 0.56.
The similarity for the inchi-based molecule is about 0.38.

I have several other molecules for which the result is significantly different whether the molecule is created from inchi or from SMILES.

Indigo options:

"ignore-stereochemistry-errors": True,
"standardize-charges": True,
"standardize-keep-largest": True,
"ignore-closing-bond-direction-mismatch": True,
"ignore-bad-valence": True,
"standardize-stereo": True,
"standardize-neutralize-zwitterions": True,
"standardize-clear-unusual-valences": True,
"simulation-type", "sim",

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.