[Diversity module] Problem of using `shannon_entropy` for computing diversity
Sometimes, this function can return us an invalid value, NaN. You can reproduce the error by running the notebook as attached with the latest code in this repo. I think the main problem is we may have zeros in the denominator.
Can you fix this? Thank you. @Khaleeh
Shannon entropy (SE) should follow Shannon Entropy-Based Fingerprint Similarity Search Strategy, J. Chem. Inf. Model. 2009, 49, 1687–1691. The equation is

We should check if this is still a problem. If so, we will need to fix the bug.
Write a test to check this. It's a relatively straightforward task, consisting of converting the notebook that shows the issue into a test.
This is addressed in https://github.com/theochem/Selector/pull/177.