Thanks Greg and Dave,
That's sorted it.
Best,
Nick
Nicholas Firth, Ph.D. Student
Institute of Cancer Research
15 Cotswold Road
Belmont
Surrey
SM2 5NG
[https://cansar.icr.ac.uk/main_page/ICR_CRUK_LOGO.png]<http://www.icr.ac.uk/>[http://www.prlog.org/11500893-linkedin-logo.jpg]<http://www.linkedin.com/profile/view?id=147633899&trk=tab_pro>




On 31 Aug 2012, at 04:15, Greg Landrum 
<[email protected]<mailto:[email protected]>> wrote:

Dear Nick,

On Thu, Aug 30, 2012 at 3:08 PM, Nicholas Firth
<[email protected]<mailto:[email protected]>> wrote:

Hi RDKiters,
I've been calculating the Tanimoto similarity of sparse in vectors using C++ 
and I can't seem to work out whether or not this is the binary Tanimoto index 
or the Integer version. I've managed to track the answer to the calcVectParams 
function in the SparseIntVect.h file in the source, but I get a bit lost in 
that function.


If you are working with a SparseIntVect, then it is using the integer
version of the tanimoto index.
The function calcVectParams tries to be reasonably efficient, which
ends up making it a bit tricky to wade through. The logic that is used
is the following:

v1Sum = sum(abs(v1[i]))
v2Sum = sum(abs(v2[i]))
andSum = sum(abs(min(vi[i],v2[i])))

Does that help?

-greg


The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company 
Limited by Guarantee, Registered in England under Company No. 534147 with its 
Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If the 
message is received by anyone other than the addressee, please return the 
message to the sender by replying to it and then delete the message from your 
computer and network.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to