Fundamentals of Molecular Similarity