Dear Nick, On Thu, Aug 30, 2012 at 3:08 PM, Nicholas Firth <[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 ------------------------------------------------------------------------------ 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

