# make a 2 fingerprint vectors
fp1 <- new("fingerprint", nbit=6, bits=c(1,2,5,6))
fp2 <- new("fingerprint", nbit=6, bits=c(1,2,5,6))
# calculate the tanimoto coefficient
distance(fp1,fp2) # should be 1
# Invert the second fingerprint
fp3 <- !fp2
distance(fp1,fp3) # should be 0
Run the code above in your browser using DataLab