Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Physical Chemistry Chemical Physics

Code generation in ORCA: progress, efficiency and tight integration

Marvin H. Lechner, Anastasios Papadopoulos, Kantharuban Sivalingam, Alexander A. Auer, Axel Koslowski, Ute Becker, Frank Wennmohs, Frank Neese

Published Jan 1, 2024• 27 citations
Publisher

Abstract

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.

DOI
10.1039/d4cp00444b

Related papers

A toolchain for the automatic generation of computer codes for correlated wavefunction calculations

Martin Krupička, Kantharuban Sivalingam, Lee M. J. Huntington +2 more

In this work, the automated generator environment for ORCA (ORCA-AGE) is described. It is a powerful toolchain for the automatic implementation of wavefunction-based quantum chemical methods. ORCA-AGE consists of three main modules: (1) generation of "raw" equations from a second quantized Ansatz for the wavefunction, (2) factorization and optimization of equations, and (3) generation of actual computer code. We generate code for the ORCA package, making use of the powerful functionality for wavefunction-based correlation calculations that is already present in the code. The equation generation makes use of the most elementary commutation relations and hence is extremely general. Consequently, code can be generated for single reference as well as multireference approaches and spin-independent as well as spin-dependent operators. The performance of the generated code is demonstrated through comparison with efficient hand-optimized code for some well-understood standard configuration interaction and coupled cluster methods. In general, the speed of the generated code is no more than 30% slower than the hand-optimized code, thus allowing for routine application of canonical ab initio methods to molecules with about 500-1000 basis functions. Using the toolchain, complicated methods, especially those surpassing human ability for handling complexity, can be efficiently and reliably implemented in very short times. This enables the developer to shift the attention from debugging code to the physical content of the chosen wavefunction Ansatz. Automatic code generation also has the desirable property that any improvement in the toolchain immediately applies to all generated code. © 2017 Wiley Periodicals, Inc.

Journal of Computational Chemistry•Jun 5, 2017•26 citations

Automated Code Engine for Tensor HyperContraction: Derivation, Optimization and Implementation of Rank-reduced Coupled Cluster Theories

Zhao Yao

The ultimate goal of electronic structure theory is solving the electronic Schr¨odinger Equation. However, even accurate approximations of solving Schr¨odinger Equation, such as high order coupled cluster theories, require computational efforts that are too demanding to be applied on large chemical systems. This thesis tackles the problem of curse of dimensionality: how to reduce the time complexity of high-accuracy coupled cluster methods in order to accelerate computations of molecular energy. On one hand, we believe that low-rank approximation (i.e. Tensor HyperContraction) of high-order tensors appearing in coupled cluster theory is a promising way to achieve rank-reduced coupled cluster theory. On the other hand, we think that the work of deriving, optimizing and implementing low-rank approximated coupled cluster theory is both tedious and repetitious, and shall be performed by an automatic code engine other than chemists. In this thesis, we introduce our chemistry equation compiler, Autom: a code engine that is designed for automatically deriving, optimizing and implementing low-rank approximated coupled cluster theories. With Autom, the development of electronic theories is greatly simplified. Autom can easily generate runnable codes in minutes for tensor-algebra based chemistry equations with customized low-rank approximation rules; conventionally, such procedure may take an expert weeks or even months to manually program. This thesis roughly consists of two parts. In the first part, we aim to cover the lowrank approximation techniques for high-accuracy coupled cluster theories, emphasizing on two new factorization techniques we developed especially for several coupled cluster theories including triple contributions. In the second part, we demonstrate the algorithms of our automatic code engine. We also summarize recent advances of domain specific compilers in Machine Learning community and discuss future directions for compute graph optimization. We believe that this new software infrastructure holds great promise for future chemistry package designs.

•Jan 1, 2021•0 citations

Automatic code generation for many-body electronic structure methods: the tensor contraction engine‡‡

Alexander A. Auer, Gerald Baumgartner, David E. Bernholdt +14 more

As both electronic structure methods and the computers on which they are run become increasingly complex, the task of producing robust, reliable, high-performance implementations of methods at a rapid pace becomes increasingly daunting. In this paper we present an overview of the Tensor Contraction Engine (TCE), a unique effort to address issues of both productivity and performance through automatic code generation. The TCE is designed to take equations for many-body methods in a convenient high-level form and acts like an optimizing compiler, producing an implementation tuned to the target computer system and even to the specific chemical problem of interest. We provide examples to illustrate the TCE approach, including the ability to target different parallel programming models, and the effects of particular optimizations.

Molecular Physics•Jan 20, 2006•135 citations

Efficient Implementation of the Spin-Free Renormalized Internally-Contracted Multireference Coupled Cluster Theory

Kalman Szenes, Riya Kayal, Kantharuban Sivalingam +3 more

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.

arXiv:2511.03567•The Journal of Physical Chemistry A•Feb 3, 2026•1 citation

Software update: The ORCA program system—Version 5.0

Frank Neese

Abstract Version 5.0 of the ORCA quantum chemistry program suite was released in July 2021. ORCA 5.0 represents a major improvement over all previous versions of ORCA and features (1) highly improved performance, (2) increased numerical robustness, (3) a host of new functionality, and (4) greatly improved user friendliness. The article describes the most salient features of the program. This article is categorized under: Electronic Structure Theory > Ab Initio Electronic Structure Methods Data Science > Computer Algorithms and Programming Software > Quantum Chemistry

Wiley Interdisciplinary Reviews Computational Molecular Science•Mar 7, 2022•5,407 citations

Automated Implementation of Advanced Electronic Structure Methods

Bimal Gaudel

The continuous demand for higher accuracy in computational chemistry necessitates the development of advanced many-body electronic structure methods. However, the derivation and efficient implementation of these theories constitute a significant bottleneck. As the rank of the associated tensors increases, the governing equations explode in complexity, rendering manual implementation labor-intensive, error-prone, and difficult to optimize for modern hardware. To address this challenge, this dissertation presents SeQuant, a comprehensive framework for the automated derivation and parallel implementation of many-body quantum chemistry methods. Built upon a robust symbolic algebra engine, SeQuant allows for the expression of theories in the natural language of second quantization. It automates the transformation of high-level theoretical ansatzes into explicit tensor contraction expressions and subsequently generates optimized, high-performance C++ code. A central innovation of this work is the extension of automated implementation to reduced-scaling methods, which exploit the sparsity inherent in electronic correlation. We introduce a novel "tensor-of-tensors" data structure designed to manage the irregular sparsity patterns of Pair Natural Orbital (PNO) formulations. This development enables the first fully automated implementation of PNO-Coupled Cluster (PNO-CC) methods, bridging the gap between symbolic abstraction and the runtime requirements of sparse tensor algebra. The results demonstrate that SeQuant not only reproduces established dense methods (such as CCSD and CCSDT) with high fidelity but also effectively handles the complexity of sparse, local correlation approaches. By decoupling the complexity of the physics from the details of the implementation, this framework establishes a new paradigm for method development, dramatically accelerating the translation of theoretical insights into computational reality.

•Feb 4, 2026•0 citations
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 work, the automated generator environment for ORCA (ORCA-AGE) is described. It is a powerful toolchain for the automatic implementation of wavefunction-based quantum chemical methods. ORCA-AGE consists of three main modules: (1) generation of "raw" equations from a second quantized Ansatz for the wavefunction, (2) factorization and optimization of equations, and (3) generation of actual computer code. We generate code for the ORCA package, making use of the powerful functionality for wavefunction-based correlation calculations that is already present in the code. The equation generation makes use of the most elementary commutation relations and hence is extremely general. Consequently, code can be generated for single reference as well as multireference approaches and spin-independent as well as spin-dependent operators. The performance of the generated code is demonstrated through comparison with efficient hand-optimized code for some well-understood standard configuration interaction and coupled cluster methods. In general, the speed of the generated code is no more than 30% slower than the hand-optimized code, thus allowing for routine application of canonical ab initio methods to molecules with about 500-1000 basis functions. Using the toolchain, complicated methods, especially those surpassing human ability for handling complexity, can be efficiently and reliably implemented in very short times. This enables the developer to shift the attention from debugging code to the physical content of the chosen wavefunction Ansatz. Automatic code generation also has the desirable property that any improvement in the toolchain immediately applies to all generated code. © 2017 Wiley Periodicals, Inc.
The ultimate goal of electronic structure theory is solving the electronic Schr¨odinger Equation. However, even accurate approximations of solving Schr¨odinger Equation, such as high order coupled cluster theories, require computational efforts that are too demanding to be applied on large chemical systems. This thesis tackles the problem of curse of dimensionality: how to reduce the time complexity of high-accuracy coupled cluster methods in order to accelerate computations of molecular energy. On one hand, we believe that low-rank approximation (i.e. Tensor HyperContraction) of high-order tensors appearing in coupled cluster theory is a promising way to achieve rank-reduced coupled cluster theory. On the other hand, we think that the work of deriving, optimizing and implementing low-rank approximated coupled cluster theory is both tedious and repetitious, and shall be performed by an automatic code engine other than chemists. In this thesis, we introduce our chemistry equation compiler, Autom: a code engine that is designed for automatically deriving, optimizing and implementing low-rank approximated coupled cluster theories. With Autom, the development of electronic theories is greatly simplified. Autom can easily generate runnable codes in minutes for tensor-algebra based chemistry equations with customized low-rank approximation rules; conventionally, such procedure may take an expert weeks or even months to manually program. This thesis roughly consists of two parts. In the first part, we aim to cover the lowrank approximation techniques for high-accuracy coupled cluster theories, emphasizing on two new factorization techniques we developed especially for several coupled cluster theories including triple contributions. In the second part, we demonstrate the algorithms of our automatic code engine. We also summarize recent advances of domain specific compilers in Machine Learning community and discuss future directions for compute graph optimization. We believe that this new software infrastructure holds great promise for future chemistry package designs.
As both electronic structure methods and the computers on which they are run become increasingly complex, the task of producing robust, reliable, high-performance implementations of methods at a rapid pace becomes increasingly daunting. In this paper we present an overview of the Tensor Contraction Engine (TCE), a unique effort to address issues of both productivity and performance through automatic code generation. The TCE is designed to take equations for many-body methods in a convenient high-level form and acts like an optimizing compiler, producing an implementation tuned to the target computer system and even to the specific chemical problem of interest. We provide examples to illustrate the TCE approach, including the ability to target different parallel programming models, and the effects of particular optimizations.
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.
Abstract Version 5.0 of the ORCA quantum chemistry program suite was released in July 2021. ORCA 5.0 represents a major improvement over all previous versions of ORCA and features (1) highly improved performance, (2) increased numerical robustness, (3) a host of new functionality, and (4) greatly improved user friendliness. The article describes the most salient features of the program. This article is categorized under: Electronic Structure Theory > Ab Initio Electronic Structure Methods Data Science > Computer Algorithms and Programming Software > Quantum Chemistry
The continuous demand for higher accuracy in computational chemistry necessitates the development of advanced many-body electronic structure methods. However, the derivation and efficient implementation of these theories constitute a significant bottleneck. As the rank of the associated tensors increases, the governing equations explode in complexity, rendering manual implementation labor-intensive, error-prone, and difficult to optimize for modern hardware. To address this challenge, this dissertation presents SeQuant, a comprehensive framework for the automated derivation and parallel implementation of many-body quantum chemistry methods. Built upon a robust symbolic algebra engine, SeQuant allows for the expression of theories in the natural language of second quantization. It automates the transformation of high-level theoretical ansatzes into explicit tensor contraction expressions and subsequently generates optimized, high-performance C++ code. A central innovation of this work is the extension of automated implementation to reduced-scaling methods, which exploit the sparsity inherent in electronic correlation. We introduce a novel "tensor-of-tensors" data structure designed to manage the irregular sparsity patterns of Pair Natural Orbital (PNO) formulations. This development enables the first fully automated implementation of PNO-Coupled Cluster (PNO-CC) methods, bridging the gap between symbolic abstraction and the runtime requirements of sparse tensor algebra. The results demonstrate that SeQuant not only reproduces established dense methods (such as CCSD and CCSDT) with high fidelity but also effectively handles the complexity of sparse, local correlation approaches. By decoupling the complexity of the physics from the details of the implementation, this framework establishes a new paradigm for method development, dramatically accelerating the translation of theoretical insights into computational reality.