Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Type of Changes
Please remove the lines that don't represent the type of your PR.
🚨 Test
🎨 Improve Format & Structure
Bug Fix