libecpint: A C++ library for the efficient evaluation of integrals over effective core potentials

eprints@whiterose.ac.uk https://eprints.whiterose.ac.uk/ Reuse This article is distributed under the terms of the Creative Commons Attribution (CC BY) licence. This licence allows you to distribute, remix, tweak, and build upon the work, even commercially, as long as you credit the authors for the original work. More information and the full terms of the licence here: https://creativecommons.org/licenses/


Summary
Effective core potentials (ECPs) are widely-used in computational chemistry both to reduce the computational cost of calculations,(M. Dolg, 2000) and include relevant physics that would not otherwise be present (M. Dolg, 2002). In particular, for heavy main-group atoms  and transition metals , the number of core electrons greatly outnumbers the number of valence electrons. It is generally considered that these will not play a significant role in chemical reactivity, and thus can be frozen. Moreover, these electrons show significant relativistic character (M. Dolg, 2002;M. Dolg & Cao, 2012). Both of these issues can be resolved with the introduction of an effective core, represented as a fixed electronic potential. This potential is typically represented as a linear combination of gaussians of varying angular momenta (M. Dolg, 2000).
The introduction of an ECP results in an additional term in the core Hamiltonian, over which new electronic integrals must be computed. These three-center integrals are far from trivial, and they cannot in general be treated the same way as other electronic integrals (Flores-Moreno et al., 2006;McMurchie & Davidson, 1981). Several widely used computational chemistry codes lack the ability to calculate these integrals due to the difficulty involved in their computation. The present library, libecpint, provides an open-source solution to this. It is a standalone library written in modern C++ capable of the highly efficient computation of integrals over ECPs with gaussian orbitals of arbitrary angular momentum, along with their first and second geometric derivatives. The methods implemented are based on novel algorithms that use automatic code generation and symbolic simplification of recursive expressions, along with highly optimised Gauss-Chebyshev quadrature.

Statement of need
Effective core potentials are an essential part of modern computational chemistry. However, existing implementations are typically unavailable or inaccessible for free use by the open source community. Commonly used proprietary software, such as Gaussian (Frisch et al., 2016) or Molpro (Werner et al., 2019), do not make details of their implementations available, while the few open-source computational chemistry packages either do not include ECP functionality or use outdated implementations that would not be compatible with modern codebases. A notable example of this is the widely-used Psi4 package (Smith et al., 2020), in which a rudimentary version of libecpint was originally implemented. Prior to this, the inclusion of ECPs was one of the most requested features by the user base.
Additionally, there has been a recent renaissance in the development of efficient algorithms for evaluating ECP integrals. In particular, multiple research groups have outlined new approaches to prescreening integrals, (McKenzie et al., 2018;Shaw & Hill, 2017;Song et al., 2015) greatly Shaw et al., (2021). libecpint: A C++ library for the efficient evaluation of integrals over effective core potentials. Journal of Open Source Software, 6(60), 3039. https://doi.org/10.21105/joss.03039 1 reducing the computational expense. The libecpint library implements many of these new algorithms, combining the recursive methods and fine-grained screening of Shaw et al. (Shaw & Hill, 2017) with the higher-level screening of other recent work (McKenzie et al., 2018;Song et al., 2015). The only known implementations of the latter papers are otherwise only available in proprietary software. Therefore libecpint represents a necessary contribution to the wider open-source computational chemistry community. It has already been adopted by multiple packages, including Entos QCore and Serenity (Barton et al., 2020), and will be part of a future release of Psi4 (Smith et al., 2020).

Functionalities
The core functionality of libecpint is the evaluation of both type 1 and type 2 integrals over ECP integrals parametrised in terms of contracted sets of primitive gaussians, as described in Shaw et al. (Shaw & Hill, 2017). The component parts divide into the following functionalities: • a built-in library of parametrised ECPs, with generic containers for Gaussian-type ECPs; • a highly-optimised Bessel function evaluation routine; • screening of ECP integrals over shell pairs of orbital basis functions (McKenzie et al., 2018;Song et al., 2015), across all ECPs in a system; • fine-grained screening of the individual type 2 integrals over primitive gaussians; (Shaw & Hill, 2017) • recursive, automatically-generated radial integral code; (Shaw & Hill, 2017) • adaptive quadrature for integrals not covered by the recursive routines; (Flores-Moreno et al., 2006) • first-and second-order geometric derivatives of ECP integrals over shell pairs of gaussians.
These features can be accessed via two levels of API: • a high-level interface, where the user provides a molecular geometry and basis set, then calls routines that return the full tensor of integrals (or integral derivatives) across all shell pairs; • a low-level interface, where the user provides parameters and deals with the primitive integrals directly.
This allows a great deal of flexibility for different use cases, potentially allowing for users to further develop or adapt the routines themselves.
All primitive integral routines have been designed to be thread safe, allowing users to readily parallelise their calculations. In addition, there is a built in testing and benchmarking suite, allowing for efficiency comparisons both with other codes, and when testing new algorithmic developments.