theochem / gbasis

Python library for analytical evaluation and integration of Gaussian-type basis functions and related quantities.
http://gbasis.qcdevs.org/
GNU Lesser General Public License v3.0
40 stars 22 forks source link

Standardize Libcint implementation to include IOData conventions #174

Closed leila-pujal closed 7 months ago

leila-pujal commented 7 months ago

This PR builds on top of the recently merged Libcint interface and adds the necessary code to use libcint with data load through from_iodata wrapper. Before this update, the interface called libcint library followed default Gbasis conventions for the ordering of atomic basis functions. However, this default convention is not followed by other common wavefunction files (e.g fchk). This caused a mismatch ordering between arrays generated by Gbasis and Cbasis(Libcint) when using IOData with a wavefunction file that does not follow this default conventions. The PR includes the following code to fix this:

The PR includes tests for using IOData + libcint and for the change in the default spherical p orbital convention. For testing the integrals the electron-electron repulsion is skipped because of the high angular momentum included in the calculations. I am assuming that because for the other integrals, it works it should work for the electron repulsion too.

Checklist

Type of Changes

Type
:sparkles: New feature
:hammer: Refactoring

Related

leila-pujal commented 7 months ago

@PaulWAyers, @FarnazH, me and @msricher have been working on this PR. I would like your opinion on changing the conventions of the spherical atomic basis functions for p orbitals if you think there is something I might have missed considering. Besides that, all the tests pass, and @msricher and I are reviewing the code so you don't need to go into detail if you don't have the time. If you think this is good, approve your review so I can merge the PR (I need 1 approved from reviewers with access). Thanks

leila-pujal commented 7 months ago

Thanks @PaulWAyers and @msricher for your replies. I made changes to run the libcint tests when these are tested on ubuntu. For Windows, I didn't know how to install the lisp interpreter. To be honest I am not sure libcint can be installed on Windows. Let me know if you have more infor about this @msricher . I setup the test to run all of them on ubuntu but for Windows we don't run libcint tests. This caused the coverage to drop to 79% and that's why you see I changed the coverage. For ubuntu, where the libcint tests are run, the coverage is 96.80%. Besides pytest workflows, then there is the pre-commit bot that fails for ruff. @Ali-Tehrani was already aware and I am planing to take care of this soon. If no one has more revisions to do I will merge this PR tomorrow.

msricher commented 7 months ago

Libcint does not support Windows.