Closed leila-pujal closed 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
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.
Libcint does not support Windows.
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:permutation_libcint
. This method is called by Cbasis class to permut the order of basis functions.s1,c0,s1
which corresponds toyzx
. Before this PR the libcint library was compiled to have this output for the p orbitals. Keeping this ordering and at the same time using IOData results in an incompatibility problem at least for fchk format. Conventions stored in IOData for fchk only contain p cartesian conventions (because cartesian/spherical coordinates generate the same number of p atomic orbitals). This means even for all spherical shells calculation the conventions passed to Gbasis from IOData will contain p cartesian ordering, meaningxyz
which corresponds toc1,s1,c0
. Even having the permutation function because internally is stored as cartesian it won't change the ordering but for libcint it will call the spherical ordering which iszyx
. To summarize keeping this default ordering you can not use a fchk because it is "missing" the spherical p angular momentum convention and thus we can not do the permutation. I hope this explanation is clear enough.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
Related