Sorry again...

for Torsion and Morgan I'm getting different values:

               rdMolDescriptors.GetMorganFingerprint(molec[0])

rdMolDescriptors.GetHashedTopologicalTorsionFingerprint(molec[0])

and when I'm using on both .ToBitString()   and use my "own" tanimoto
function: im getting defferent values

rdMolDescriptors.GetMorganFingerprint(molec[0]).ToBitString()

rdMolDescriptors.GetHashedTopologicalTorsionFingerprint(molec[0]).ToBitString()



torsion
0.0645161290323    #own
4                                #size of c
0.0133333333333    #RDKIT

morgan

0.148648648649    #own
11                            #size of c

0.173076923077    #RDKIT

For the fingerprints topological and maccs keys Im getting the same values

0.462686567164
31
0.462686567164

sorry again for spamin you


On 9 January 2016 at 05:56, A neuman <[email protected]> wrote:

> Oh, sorry.
>
> I think, I found my mistake
>
>
> FP1 and FP2 should be the count fomr ALL 1's in the FP and not the whole
> FP length.
>
>
>
> On 9 January 2016 at 05:46, A neuman <[email protected]> wrote:
>
>> Hello everyone,
>>
>> i want to calculate the tanimoto similarity from a bitstring of 1's und
>> 0's.
>>
>>
>> Im getting deffierent resulst for example:
>>
>>
>> for the RDKIT tanimoto I'm reading:
>> fingerprint= GenMACCSKeys(molec[0])
>>
>>
>> for the "own" tanimoto function im reading the key like:
>> fingerprint= GenMACCSKeys(molec[0])*.ToBitString()    *         so, a
>> ToBitString is added on the line
>>
>> If im comparing them im using:
>>
>> RDKIT function:
>>
>> DataStructs.TanimotoSimilarity(FP1,FP2)
>>
>> "own"n function :
>>
>>     for i in range(len(FP1)):
>>         if FP1[i]==1.0 and FP2[i]==1.0:
>>             c+=1
>>
>>     print float(c)/(len(FP1) + len(FP2) - c)
>>
>> So I'm just count al 1 Bits at the same position und FP1 und FP 2 to get
>> the c
>> and then im calculating:   c / (a+b-c)
>>
>>
>> and I#m Getting these values:
>>
>> 0.00602409638554  From "own" function
>> 2  # counts of c
>> 0.0333333333333 from RDKit
>>
>> Somebody knows what I'm doing wrong?
>>
>> best,
>>
>> alex
>>
>>
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to