When using GetMorganFingerprintAsBitVect I get the “expected” Tanimoto score
mol1 = Chem.MolFromSmiles('CCC')
mol2 = Chem.MolFromSmiles('CNC')
fp1 = AllChem.GetMorganFingerprintAsBitVect(mol1,2,nBits=1024)
fp2 = AllChem.GetMorganFingerprintAsBitVect(mol2,2,nBits=1024)
print(DataStructs.TanimotoS
Hi Jan,
The GetMorganFingerprint() returns count fingerprints, and the Tanimoto
calculation does the full Jaccard similarity, including the counts.
The GetMorganFingerprintAsBitVect() version only uses the keys (that is, it
treats all non-zero values as being 1) when computing the Tanimoto.
2 matches
Mail list logo