MetaWave: A Platform for Unified Implementation of Nonrelativistic and Relativistic Wavefunctions (2501.18185v2)
Abstract: \texttt{MetaWave} is a C++ template-based architecture designed for unified implementation of nonrelativistic and relativistic wavefunction-based quantum chemical methods. It is highly modular, extendable, and efficient. This is achieved by decoupling the three distinct aspects of quantum chemical methods (i.e., nature of Hamiltonian, structure of wavefunction, and strategy of parallelization ), thereby allowing for separate treatment of them through their internal type-trait and tagging systems furnished by C++ metaprogramming. Once the second-quantized Hamiltonians, whether nonrelativistic (spin-free) or relativistic (spin-dependent), are decomposed into topologically equivalent diagrams for a unified evaluation of the basic coupling coefficients between (randomly selected) spin-free or spin-dependent configuration state functions or Slater determinants incorporating full molecular symmetry (including single or double point group and spin or time reversal symmetry), the many-electron wavefunctions, whether built up with scalar or spinor orbitals, can be assembled with the same templates. As for parallelization, \texttt{MetaWave} supports both OpenMP and MPI, with the majority of the latter being translated automatically from its OpenMP counterparts.The whole structure of \texttt{MetaWave} is reviewed here, with some showcases for illustrating its performance.