Reputation: 11
How to run a similarity search in a database and the output should be a table with molecules which passed a specific treshold?
I tried this
query = sql.SQL("""
SELECT *, morganbv_fp(smiles::qmol) %% morganbv_fp(%s::qmol) AS similarity
FROM {}
WHERE morganbv_fp(smiles::qmol) %% morganbv_fp(%s::qmol) > %s
ORDER BY similarity DESC
Upvotes: 1
Views: 102