Topology
Description
This pull-request is regarding topology/critical.py, a critical point finder class of any scalar function. The tests in topology/test/test_critical.py were commented out. Here, I fixed up the tests in test_critical.py in order to work with Topology class in critical.py (cf933df). I have three tests: single Gaussian, two Gaussians, and three Gaussian functions, where I know the exact positions of the critical points. The three Gaussian functions are centered as a equilateral triangle and so there is a additional critical point at the center of the triangle.
Sometimes, Newton-Raphson returns nan, so added an if-statement to make sure there is no nan (448fcae).
Additionally, I changed the order of the if-statement because calculating the electron density is cheaper than its gradient, hopefully saving a few seconds (64f0405).
Checks
Please remove the checks that are not applicable to your PR, and replace [ ] with [x] to mark the checks that are already completed. You can finish the other relevant checks after opening the PR.
- [ ] Each commit addresses one thing.
- [ ] Each commit message is informative and is less than 50 characters.
- [ ] Commits that can be grouped together are squashed.
- [ ] Each unit of code added is tested.
- [x] Commits are rebased onto master.
Type of Changes
Please remove the lines that don't represent the type of your PR.
:rotating_light: Test :art: Improve Format & Structure Bug Fix