Skip to content

Commit

Permalink
Merge pull request #54 from mcneilco/bugfix/bingo-similiarity-search
Browse files Browse the repository at this point in the history
Fixes #53 similarity search broken with indigo cartridge
  • Loading branch information
jmcneil86043 committed Apr 30, 2018
2 parents 7dbe9bf + ac21897 commit e7f9e01
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,12 @@ public CmpdRegMolecule[] searchMols(String molfile, String structureTable, int[]
//Indigo: the structures in the plainTable are being used. Ignore structureTable from here on out.
logger.debug("Search table is " + plainTable);
logger.debug("Search type is " + searchType);
logger.debug("Max number of results is " + maxResults);
logger.debug("Max number of results is " + maxResults);

logger.debug("Dissimilarity similarity is " + simlarityPercent);

float indSimilarity = 1.0f - simlarityPercent;
logger.debug("Indigo search similarity is " + indSimilarity);


if (searchType.equalsIgnoreCase("EXACT")){
Expand Down Expand Up @@ -450,8 +455,8 @@ public CmpdRegMolecule[] searchMols(String molfile, String structureTable, int[]
if (searchType.equalsIgnoreCase("SUBSTRUCTURE")) {
query.setParameter("parameters", "");
}else if (searchType.equalsIgnoreCase("SIMILARITY")) {
query.setParameter("minSimilarity", simlarityPercent);
query.setParameter("maxSimilarity", null);
query.setParameter("minSimilarity", indSimilarity);
query.setParameter("maxSimilarity", 1.0);
query.setParameter("metric", "Tanimoto");
}else {
String parameters = null;
Expand Down

0 comments on commit e7f9e01

Please sign in to comment.