General recurrence-relation generation scheme for molecular integral evaluation
We develop a new scheme for evaluating different molecular integrals using Gaussian type orbitals. In this new scheme, the evaluation of integrals is performed in two steps during runtime. The first step is a top-down procedure that maps each recurrence relation into a jagged array (array of arrays), where each element of a member array represents either the final results or some intermediate integrals that are stored in our developed data structure "coarse-grained circular buffer". This step is the same for all different one- and two-electron operators so that the same algorithm and source codes can be used. In the second step, a bottom-up procedure is carried out that computes all the intermediate and the final molecular integrals by backtracking elements from the last member array of each jagged array. Different source codes should in principle be used for different electron operators in the second step, but which can be generated automatically by our developed recurrence-relation compiler. The currently proposed general recurrence-relation generation scheme provides a new, generic and automatic programming way for various one- and two-electron integrals needed in computational chemistry. Users can even introduce new electron operators and evaluate their integrals during runtime by combining the implementation of the proposed new scheme and the just-in-time compilation technique.