Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review and update test modules #28

Merged
merged 9 commits into from
Mar 5, 2024
Merged

Review and update test modules #28

merged 9 commits into from
Mar 5, 2024

Conversation

gabrielasd
Copy link
Collaborator

This PR updates the tests for the evaluation of the gradient of the density in the numeric, slater and gaussian datasets.

For the Slater dataset, the main problem was caused by incorrect .msg and Numpy array data files used in the tests.
In the case of the numeric Hartree-Fock set, there are discrepancies between the values of the derivative of the density computed from the splines and the original raw data in the vicinity of the nuclei. The current tests that pass, do not include these points.
The corresponding tests for the gaussian dataset still fail. One reason may be that the values used to compare against are a poor reference (gradient computed with numpy)

gabrielasd and others added 4 commits February 25, 2024 20:06
Changes:
- Modified the compilation script's lower bound for the radial grid from 1e-5 to 1e-30.
- Added separate tests for density and derivatives of density.
- Included Boron test case.
… sets.

Changes:
- Update the test files to account for changes in the copilation script.
- Use lower precision to verify equality of arrays using numpy.allclose
instead of numpy.testing.assert_almost_equal.
… covalent radius

for the HF numeric dataset.
@marco-2023
Copy link
Collaborator

@gabrielasd I changed some of the assert statements for consistency (e.g. assert_almost_equal for float comparison and assert np.all_close for comparing arrays. I think several tests can still be merged using @pytest.mark.parametrize (e.g. test_slater_atomic_density and test_slater_atomic_density_ions) unless there is an authentic reason to treat them separately.

@gabrielasd gabrielasd merged commit 1830ecf into master Mar 5, 2024
8 of 9 checks passed
@marco-2023 marco-2023 deleted the db_tests branch March 5, 2024 19:32
msricher pushed a commit that referenced this pull request May 13, 2024
Review and update test modules
msricher pushed a commit that referenced this pull request May 13, 2024
Review and update test modules
marco-2023 pushed a commit that referenced this pull request May 13, 2024
Review and update test modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants