
/**
   @defgroup Init mpqc.Init
   Supports initialization of MPQC. Provides initialization of various runtime components (ThreadGrp, MessageGrp, MADNESS, etc.)
   as well as translation of simple traditional quantum-chemistry input to the MPQC object-oriented KeyVal input.
*/

/**
  @defgroup Chemistry mpqc.Chemistry
  @anchor labelmpqcChemistry
  Provides functionality related to the domain of chemistry. This includes
  - @ref labelmpqcChemistryMolecule "mpqc.Chemistry.Molecule"
  - @ref labelmpqcChemistryBasis "mpqc.Chemistry.Basis"
  - @ref labelmpqcChemistryElectronicStructure "mpqc.Chemistry.ElectronicStructure"
*/

/**
  @defgroup ChemistryMolecule mpqc.Chemistry.Molecule
  @ingroup Chemistry
  @anchor labelmpqcChemistryMolecule
  Provides Molecule class and related functionality.
*/

/**
  @defgroup ChemistryBasis mpqc.Chemistry.Basis
  @ingroup Chemistry
  @anchor labelmpqcChemistryBasis
  Classes/functions related to basis representations used in chemistry, i.e. atomic basis functions.
*/

/**
  @defgroup ChemistryBasisGaussian mpqc.Chemistry.Basis.Gaussian
  @ingroup ChemistryBasis
  Classes/functions related to Gaussian AO basis representations.
*/

/**
  @defgroup ChemistryBasisIntegral mpqc.Chemistry.Basis.Integral
  @ingroup ChemistryBasis
  Classes/functions related to integrals over atomic basis function.

  Synopsis:
    @code
    // get the default Integral factory. MPQC supports several factories that
    // may not be interoperable with each other, to be safe use the same one throughout
    Ref<Integral> integral_factory = Integral::get_default_integral();

    // need to compute overlap integrals between 2 basis sets?
    integral_factory->set_basis(bs1, bs2);
    Ref<OneBodyInt> overlap_12 = integral_factory->overlap();

    // loop over shell combinations, call overlap_12->compute_shell()
    const double* ints_buffer = overlap_12->buffer();
    for(int s1=0; s1<bs1->nshell(); ++s1) {
      for(int s2=0; s2<bs2->nshell(); ++s2) {
        // compute shell block
        overlap_12->compute_shell(s1, s2);

        // read integrals from ints_buffer
        for(int f1=0, f12=0; f1<bs1->shell(s1).nfunction(); ++f1) {
          for(int f2=0; f2<bs2->shell(s2).nfunction(); ++f2, ++f12) {
            const double v = ints_buffer[f12];
            // integral in v corresponds to these basis functions:
            // bra index = f1 + bs1->shell_to_function(s1)
            // ket index = f2 + bs2->shell_to_function(s2)
            // use v here
          }
        }

      }
    }
    @endcode
  In this example the computed integrals are extracted one-by-one. Often you want to copy the entire shell block
  of integrals to another array. This can be done using new range-style access described
  in @ref ChemistryBasisIntegralRange "mpqc.Chemistry.Basis.Integral.Range".
*/

/**
   @defgroup ChemistryBasisIntegralRange mpqc.Chemistry.Basis.Integral.Range
   @ingroup ChemistryBasisIntegral
   Provides new range-style compute wrapper to the mpqc.Chemistry.Basis.Integral functionality.

   Synopsys:
   @code
    // get the default Integral factory. MPQC supports several factories that
    // may not be interoperable with each other, to be safe use the same one throughout
    Ref<Integral> integral_factory = Integral::get_default_integral();

    // need to compute overlap integrals between 2 basis sets?
    integral_factory->set_basis(bs1, bs2);
    Ref<OneBodyInt> overlap_12 = integral_factory->overlap();

    // to be continued
    @endcode
*/

/**
   @defgroup ChemistryBasisIntegralTA mpqc.Chemistry.Basis.Integral.TiledArray
   @ingroup ChemistryBasisIntegral
 * Provides interface to get atomic basis integrals into TiledArray tensors.
 * @code
 * IntegralEnginePool<Engine_type> engine_pool(seed_engine);
 * TiledArray::Array<double, 2> array = Integrals(world, engine_pool);
 * @endcode
 */

/**
  @defgroup ChemistryElectronicStructure mpqc.Chemistry.ElectronicStructure
  @ingroup Chemistry
  @anchor labelmpqcChemistryElectronicStructure
  Classes/functions related to state of electrons in Molecule.
*/

/**
  @defgroup ChemistryElectronicStructureOneBody mpqc.Chemistry.ElectronicStructure.OneBody
  @ingroup ChemistryElectronicStructure
  Classes/functions related to one-body models of electronic structure.
*/

/**
  @defgroup ChemistryElectronicStructureOneBodyHF mpqc.Chemistry.ElectronicStructure.OneBody.HF
  @ingroup ChemistryElectronicStructureOneBody
  Classes/functions related to Hartree-Fock (HF) one-body models of electronic structure.
*/

/**
  @defgroup ChemistryElectronicStructureOneBodyHFCADF mpqc.Chemistry.ElectronicStructure.OneBody.HF.CADF
  @ingroup ChemistryElectronicStructureOneBody
  Classes/functions related to concentric atomic density fitting (CADF) formulation of Hartree-Fock
*/

/**
  @defgroup ChemistryElectronicStructureNBody mpqc.Chemistry.ElectronicStructure.NBody
  @ingroup ChemistryElectronicStructure
  Classes/functions related to many-body models of electronic structure.
*/

/**
  @defgroup CI mpqc.Chemistry.ElectronicStructure.NBody.CI
  @ingroup ChemistryElectronicStructureNBody
  Configuration Interaction (CI) implementation 
*/

/**
  @defgroup TAWFN mpqc.Chemistry.ElectronicStructure.TAWFN
  @ingroup ChemistryElectronicStructure
  TiledArray-based wavefunctions
*/

/**
  @defgroup TAWFN.OneBody mpqc.Chemistry.ElectronicStructure.TAWFN.OneBody
  @ingroup TAWFN
  TiledArray-based one-body wave functions
*/

/**
  @defgroup ChemistryElectronicStructureSpin mpqc.Chemistry.ElectronicStructure.Spin
  @ingroup ChemistryElectronicStructure
  Functionality related to spin states of electrons.
*/

/**
   @defgroup Core mpqc.Core
   @anchor labelmpqcCore
   Provides core, domain-independent functionality: core libraries for managing memory,
   saving and restoring the state of objects, reading objects from an input file, parallel communication, among others.
   mpqc.Core was also known as the Scientific Toolkit (SC) in the past.
*/

/**
   @defgroup CoreKeyVal mpqc.Core.KeyVal
   @ingroup Core
   Classes/functions for managing structured sets of keyword-value associations, such as encoded in the MPQC object-oriented input format.
*/

/**
   @defgroup CoreState mpqc.Core.State
   @ingroup Core
   Classes/functions used for serialization/deserialization.
*/

/**
   @defgroup CoreMPI mpqc.Core.MPI
   @ingroup Core
   <a href=http://www.mpi-forum.org>MPI</a> wrappers/stubs.
*/

/**
   @defgroup CoreFile mpqc.Core.File
   @ingroup Core
   Implementation of hierarchical file objects based on
   <a href="http://www.hdfgroup.org/HDF5/">HDF5</a>.

   To work with files:
   - create a file object
   - create a dataset in that file (where actual data resides)
   - write/read data to/from the dataset
   @code

   File file("file.h5");
   std::vector<size_t> dims{m,n};
   File::Dataset<double> ds(file, "my dataset", dims);
   Vector v(m*n);
   ds.write(v.data());
   ds.read(v.data());
   // or
   ds << v; // write v to ds
   ds >> v; // read ds to v
   @endcode
*/

/**
   @defgroup CoreUtility mpqc.Core.Util
   @ingroup Core
   Miscellaneous utilities
*/

/**
   @defgroup Math mpqc.Math
   @anchor labelmpqcMath
   Provides mathematical functionality, e.g. Matrix and Tensor classes, linear algebra, etc.
*/

/** @defgroup MathMatrix mpqc.Math.Matrix
    @ingroup Math
    Matrix and Vector classes and function,
    derived from <a href="http://eigen.tuxfamily.org">Eigen</a>.
    @anchor MatrixOperators
    The matrix and vector objects overide <c>operator()</c>,
    s.t. if one of the arguments is a range, a block is returned rather
    than a single element.
    Example:
    @code
    matrix(0,range(0,4)); // returns 1x4 sub-matrix (0,0:3)
    matrix(0,0); // returns matrix element (0,0);
    vector(range(2,4)); // returns sub-vector (2:3)
    @endcode
*/

/**
   @defgroup MathTensor mpqc.Math.Tensor
   @ingroup Math
   Tensor objects and functions.
*/

/**
   @defgroup MathArray mpqc.Math.Array
   @ingroup Math
   Distributed/serial array implementation.
*/

/**
   @defgroup MathRange mpqc.Math.Range
   @ingroup Math
   Range objects for iterating or accessing slices of data.
*/

/**
   @defgroup MathBLAS mpqc.Math.BLAS
   @ingroup Math
   BLAS bindings.
   The BLAS biding are meant to serve as a safer way to interface
   C++ Matrix objects, namely Eigen::Matrix and mpqc::matrix, with
   BLAS libraries, eg:

   @code
   auto a = MatrixXd::Map(data, m, k);
   Eigen::MatrixXd b(k,n);
   mpqc::Matrix c(m,n);
   // c = 1.0*a*b + 0.0*c;
   blas::gemm(1.0, a, b, 0.0, c);
   @endcode

   BLAS bindings can be disabled and  Eigen expression equivalents will
   be used instead by setting the value of <code>MPQCMATH_USE_BLAS</code> macro to 0.  This gives
   a good way to test if interface is working correctly.

   BLAS bindings are implemented on top of
   <a href=http://svn.boost.org/svn/boost/sandbox/numeric_bindings/>
   Boost.Numeric.Bindings</a>.
 */

/**
   @defgroup MathTiledArray mpqc.Math.TiledArray
   @ingroup Math
   Supports the use of <a href="https://github.com/ValeevGroup/tiledarray">TiledArray</a>, a new massively-parallel
   runtime for dense and block-sparse tensor computing.
*/
