An improved version of ORCA's automated generator environment (ORCA-AGE II) is presented. The algorithmic improvements and the move to C++ as the programming language lead to a performance gain of up to two orders of magnitude compared to the previously developed PYTHON toolchain. Additionally, the restructured modular design allows for far more complex code engines to be implemented readily. Importantly, we have realised an extremely tight integration with the ORCA host program. This allows for a workflow in which only the wavefunction Ansatz is part of the source code repository while all actual high-level code is generated automatically, inserted at the appropriate place in the host program before it is compiled and linked together with the hand written code parts. This construction ensures longevity and uniform code quality. Furthermore the new developments allow ORCA-AGE II to generate parallelised production-level code for highly complex theories, such as fully internally contracted multireference coupled-cluster theory (fic-MRCC) with an enormous number of contributing tensor contractions. We also discuss the automated implementation of nuclear gradients for arbitrary theories. All these improvements enable the implementation of theories that are too complex for the human mind and also reduce development times by orders of magnitude. We hope that this work enables researchers to concentrate on the intellectual content of the theories they develop rather than be concerned with technical details of the implementation.
In this paper, an efficient implementation of the renormalized internally contracted multireference coupled cluster with singles and doubles (RIC-MRCCSD) into the ORCA quantum chemistry program suite is reported. To this end, Evangelista's Wick&d equation generator was combined with ORCA's native AGE code generator in order to implement the many-body residuals required for the RIC-MRCCSD method. Substantial efficiency gains are realized by deriving a spin-free formulation instead of the previously reported spin-orbital version developed by some of us. Since AGE produces parallelized code, the resulting implementation can directly be run in parallel with substantial speedups when executed on multiple cores. In terms of runtime, the cost of RIC-MRCCSD is shown to be between single-reference RHF-CCSD and UHF-CCSD, even when active space spaces as large as CAS(14,14) are considered. This achievement is largely due to the fact that no reduced density matrices or cumulants higher than three-body enter the formalism. The scalability of the method to large systems is furthermore demonstrated by computing the ground-state of a vitamin B12 model comprised of an active space of CAS(12,12) and 809 orbitals. In terms of accuracy, RIC-MRCCSD is carefully compared to second- and approximate fourth-order n-electron valence state perturbation theories (NEVPT2, NEVPT4(SD)), to the multireference zeroth-order coupled-electron pair approximation (CEPA(0)), as well as to the IC-MRCCSD from Kohn. In contrast to RIC-MRCCSD, the IC-MRCCSD equations are entirely derived by AGE using the conventional projection-based approach, which, however, leads to much higher algorithmic complexity than the former as well as the necessity to calculate up to the five-body RDMs. Remaining challenges such as the variation of the results with the flow, a free parameter that enters the RIC-MRCCSD theory, are discussed.
High Resolution Image Download MS PowerPoint Slide In this paper, an efficient implementation of the renormalized internally contracted multireference coupled cluster with singles and doubles (RIC-MRCCSD) into the ORCA quantum chemistry program suite is reported. To this end, Evangelista’s Wick&d equation generator was combined with ORCA’s native AGE code generator in order to implement the many-body residuals required for the RIC-MRCCSD method. Substantial efficiency gains are realized by deriving a spin-free formulation instead of the previously reported spin–orbital version developed by some of us. Since AGE produces parallelized code, the resulting implementation can directly be run in parallel with substantial speedups when executed on multiple cores. In terms of runtime, the cost of RIC-MRCCSD is shown to be between single-reference RHF-CCSD and UHF-CCSD, even when active space spaces as large as CAS(14,14) are considered. This achievement is largely due to the fact that no reduced density matrices or cumulants higher than three-body enter the formalism. The scalability of the method to large systems is furthermore demonstrated by computing the ground-state of a vitamin B 12 model comprised of an active space of CAS(12,12) and 809 orbitals. In terms of accuracy, RIC-MRCCSD is carefully compared to second- and approximate fourth-order n -electron valence state perturbation theories (NEVPT2, NEVPT4(SD)), to the multireference zeroth-order coupled-electron pair approximation (CEPA(0)), as well as to the IC-MRCCSD from Köhn. In contrast to RIC-MRCCSD, the IC-MRCCSD equations are entirely derived by AGE using the conventional projection-based approach, which, however, leads to much higher algorithmic complexity than the former as well as the necessity to calculate up to the five-body RDMs. Remaining challenges such as the variation of the results with the flow, a free parameter that enters the RIC-MRCCSD theory, are discussed.
Automated Quantum Chemistry Code Generation with the p†q Package
This article summarizes recent updates to the p†q package, which is a C++ accelerated Python library for generating equations and computer code corresponding to singly-reference many-body quantum chemistry methods such as coupled-cluster (CC) and equation-of-motion (EOM) CC theory. Since 2021, the functionality in \pq has expanded to include boson operators, coupled fermion-boson operators, unitary cluster operators, non-particle-conserving EOM operators, spin tracing, multiple single-particle subspaces, and more. Additional developments allow for the generation of C++ and Python code that minimizes floating-point operations via contraction order optimization, sub-expression elimination, and the fusion of similar terms.
This thesis deals with selected aspects of a new implementation of many-body methods which can be formulated in the framework of second quantization, in particular the coupled-cluster (CC) method with arbitrary excitation level. Coupled-cluster is one of the most successful and widely used quantum chemical methods for accurate calculations on small to medium-sized molecules. Since it employs a nonlinear parametrization of the wave function, its implementation is rather difficult, in particular if higher (i.e. more than double) excitations are to be included. The latter is necessary to obtain highly accurate results and also as a prerequisite for the generalization to multi-reference cases. The implementation described here has a twofold focus. One is on generality and flexibility regarding the method to be implemented, the other is on efficiency. To achieve flexibility, it is useful to have a machinery which automatically derives working equations for a given method. We realize this by applying techniques of second quantization. This work treats in particular the last step of this procedure, namely the simplification of the resulting equations by the identification of equivalent terms. The algorithm used here is based on the interpretation of algebraic terms as graphs. The derived CC equations then have to be solved iteratively. The efficiency of the program is mainly determined by the evaluation of the occurring expressions, which has to be done in each iteration step. The evaluation is split up in a sequence of tensor contractions. Their generic implementation is complicated by the particular structure of the involved tensors. We reduce each contraction to a sequence of matrix multiplications, which requires a previous data rearranging. But since matrix multiplication is the most efficient operation on modern computers, this additional effort pays off. Preliminary tests show that our program is at least as fast as the most efficient general coupled-cluster implementation so far, and the relation is expected to improve for calculations with larger basis sets where the matrix multiplication becomes the time-determining step. Finally, we give an outlook to possible further developments. In particular, the preparation of the equations before the actual evaluation (factorization) offers much potential for optimizations which we do not exploit at the moment, in contrast to the program with which we compare, which employs at least a partial optimization at this point.