moleculemaker / chemscraper-frontend

MIT License
1 stars 0 forks source link

display "similarity" column when sorting by similarity #81

Open matthewberry opened 5 months ago

bodom0015 commented 5 months ago

The current implementation in mmli-backend does not return the similarity itself - rather, it appears to return the list of sorted IDs

Input: SMILE string Output: list of numerical IDs sorted by similarity

The backend implementation would need to be adjusted to return the raw Similarity scores, if we want to display them in the table

matthewberry commented 5 months ago

Good catch, @bodom0015 ! I think it's worth making that change to the backend, unless you think that'll be a big lift. (Maybe the backend could return a list of dicts, where each dict consists of an ID and the Tanimoto coefficient. Would that minimize the changes downstream?)

BTW, with the Tanimoto coefficients we're using now, we should see that a score of 1 corresponds to identical fingerprints (very similar molecules) and a score of 0 corresponds to no commonality in fingerprints. So I don't think we'll need to do any other transformations (scaling, etc.) to the raw values, besides maybe rounding to two digits after the decimal point.