[Rdkit-discuss] Tanimoto and fingerprint representation

2019-09-14 Thread Jan Halborg Jensen
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)

Re: [Rdkit-discuss] Tanimoto and fingerprint representation

2019-09-14 Thread Andrew Dalke
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.