dgasmith / gau2grid

Fast computation of a gaussian and its derivative on a grid.
https://gau2grid.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
29 stars 15 forks source link

Add 3rd derivatives #51

Closed andysim closed 5 years ago

andysim commented 5 years ago

These are needed for GGA hessians.

The code compiles as-is, but I'll need some help with the testing. I bumped up the derivative level in the existing deriv tests, and python setup.py test gave the following:

platform darwin -- Python 3.7.1, pytest-4.0.2, py-1.7.0, pluggy-0.8.0
rootdir: /Users/andysim/programming/gau2grid, inifile:
plugins: remotedata-0.3.1, openfiles-0.3.1, doctestplus-0.2.0, arraydiff-0.3
collected 140 items                                                                                                           

gau2grid/tests/test_c_code.py sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 63%]
ssssssssssssssss                                                                                                        [ 75%]
gau2grid/tests/test_c_generator.py ..................                                                                   [ 87%]
gau2grid/tests/test_order.py ..........                                                                                 [ 95%]
gau2grid/tests/test_rsh.py .......                                                                                      [100%]

=========================================== 35 passed, 105 skipped in 4.18 seconds ============================================

Any suggestions for testing are very much welcomed.

dgasmith commented 5 years ago

This is a bit awkward to test. I do something like:

cmake -H. -Bobjdir \
    -DMAX_AM=6 \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_BUILD_TYPE=debug \
    -DPYTHON_EXECUTABLE=...
cd objdir
make VERBOSE=1

and then symlink the built SO into the gau2grid dev folder. In theory we can use pip to manage this, but I have yet to figure that one out.

dgasmith commented 5 years ago

This pull request introduces 1 alert when merging f708b033e343424246ffd2b13b2e64a4d245e9b2 into 562ed3ccf7fdc76c5d309befef6075e2fc6613bf - view on LGTM.com

new alerts:


This project has automated code review enabled, but doesn't use the LGTM GitHub App. Migrate over by installing the app. Read about the benefits of migrating to GitHub Apps in the blog.


Comment posted by LGTM.com

codecov-io commented 5 years ago

Codecov Report

Merging #51 into master will increase coverage by 2.76%. The diff coverage is 86.2%.

dgasmith commented 5 years ago

This pull request introduces 1 alert when merging 5b81b8ba681c6243e8a01796792b0c8919610e69 into 562ed3ccf7fdc76c5d309befef6075e2fc6613bf - view on LGTM.com

new alerts:


This project has automated code review enabled, but doesn't use the LGTM GitHub App. Migrate over by installing the app. Read about the benefits of migrating to GitHub Apps in the blog.


Comment posted by LGTM.com

dgasmith commented 5 years ago

This pull request introduces 1 alert when merging 9d6a8dd5f4aea296cef4b2630562d56b9c58b915 into 562ed3ccf7fdc76c5d309befef6075e2fc6613bf - view on LGTM.com

new alerts:


This project has automated code review enabled, but doesn't use the LGTM GitHub App. Migrate over by installing the app. Read about the benefits of migrating to GitHub Apps in the blog.


Comment posted by LGTM.com

andysim commented 5 years ago

I'll add some docs later today. This one should be good to go. The only testing thus far is checking that the reference code and the C version are consistent. When I get to hooking it into the GGA hessian code it will be more thoroughly stress tested.