Libcint: An efficient general integral library for Gaussian basis functions.
An efficient integral library Libcint was designed to automatically implement general integrals for Gaussian-type scalar and spinor basis functions. The library is able to evaluate arbitrary integral expressions on top of p, r and σ operators with one-electron overlap and nuclear attraction, two-electron Coulomb and Gaunt operators for segmented contracted and/or generated contracted basis in Cartesian, spherical or spinor form. Using a symbolic algebra tool, new integrals are derived and translated to C code programmatically. The generated integrals can be used in various types of molecular properties. To demonstrate the capability of the integral library, we computed the analytical gradients and NMR shielding constants at both nonrelativistic and 4-component relativistic Hartree-Fock level in this work. Due to the use of kinetically balanced basis and gauge including atomic orbitals, the relativistic analytical gradients and shielding constants requires the integral library to handle the fifth-order electron repulsion integral derivatives. The generality of the integral library is achieved without losing efficiency. On the modern multi-CPU platform, Libcint can easily reach the overall throughput being many times of the I/O bandwidth. On a 20-core node, we are able to achieve an average output 8.3 GB/s for C60 molecule with cc-pVTZ basis.