[WIP] explicit Fortran interface to libcint #124
Draft
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.
This PR provides a working Fortran interface using modules and the
iso_c_bindingmodule to several libcint routines. The point of this work is to have a interface that does not rely on the use ofexternalfor the functions and provides a clean API for use of libcint in Fortran.Two interfaces have been created, one that is directly to the C code using
c_doubleand other iso_c_binding types and a "Fortran first ish" one that castsinteger, parameter :: dp = c_doubleso that people can usereal(dp)which is a bit more Fortran-esque than usingc_double.I've asked an LLM to create some docs of the new interfaces and provide some in code documentation and comments. I've heavily edited the LLM generated docs.
I have also provided examples of the new Fortran interfaces and separated them in the examples directory.
I am attempting to create a script that would generate these modules/interfaces automatically form the C code but I'd like to get some feedback first!
It looks like 4k lines of code but most of them are reporting the examples files, the include/ changes are just ~800 lines ish total.