# CheMPS2 documentation

CheMPS2 is a scientific library which contains a spin-adapted implementation of the density matrix renormalization group (DMRG) for ab initio quantum chemistry. This wavefunction method allows to obtain numerical accuracy in active spaces beyond the capabilities of full configuration interaction (FCI), and allows to extract the 2-, 3-, and 4-particle reduced density matrices (2-, 3- and 4-RDM) of the active space.

For general active spaces up to 40 electrons in 40 orbitals can be handled with DMRG, and for one-dimensional active spaces up to 100 electrons in 100 orbitals. The 2-RDM of these active spaces can also be easily extracted, while the 3- and 4-RDM are limited to about 28 orbitals.

When the active space size becomes prohibitively expensive for FCI, DMRG can be used to replace the FCI solver in the complete active space self consistent field (CASSCF) method and the corresponding complete active space second order perturbation theory (CASPT2). The corresponding methods are called DMRG-SCF and DMRG-CASPT2, respectively. For DMRG-SCF the active space 2-RDM is required, and for DMRG-CASPT2 the active space 4-RDM.

CheMPS2 is designed for high-performance computers, with a hybrid parallelization for mixed distributed and shared memory architectures, realized with MPI and OpenMP.

CheMPS2 is distributed under the GNU General Public License version 2, and can be downloaded from https://github.com/sebwouters/chemps2.

## Contents

- 1. Installation
  - 1.1. Dependencies
  - 1.2. Download
  - 1.3. Build the chemps2 library and binary
  - 1.4. Test libchemps2
  - 1.5. Test the chemps2 binary
  - 1.6. Build PyCheMPS2
  - 1.7. Test PyCheMPS2
- 2. Publications
- 3. DMRG algorithm
- 4. Symmetries
- 5. `CheMPS2::Hamiltonian`
  - 5.1. psi4 `fcidump` plugin
  - 5.2. psi4 `savehdf` plugin
  - 5.3. Custom matrix elements
- 6. DMRG calculations
  - 6.1. `CheMPS2::Problem`
  - 6.2. `CheMPS2::ConvergenceScheme`
  - 6.3. `CheMPS2::DMRG`
  - 6.4. Excited states
  - 6.5. Extrapolation
  - 6.6. Orbital choice and ordering
- 7. Typical resource requirements
  - 7.1. Scaling with system size
  - 7.2. N2/cc-pVDZ
  - 7.3. H2O/Roos’ ANO DZ
  - 7.4. Hybrid parallelization
- 8. DMRG-SCF
  - 8.1. Augmented Hessian Newton-Raphson
  - 8.2. DIIS
- 9. DMRG-SCF calculations
  - 9.1. `CheMPS2::DMRGSCFoptions`
  - 9.2. `CheMPS2::CASSCF`
- 10. Internally contracted CASPT2
  - 10.1. The required 4-RDM elements
  - 10.2. CAS perturbation theory
  - 10.3. CASPT2 calculations
- 11. Interfaces to psi4 and pyscf
  - 11.1. psi4 `dmrg` plugin
  - 11.2. pyscf
- 12. DMRG workshop (12-jul-2016): hands-on session
  - 12.1. Introduction
  - 12.2. UGent HPC
  - 12.3. `FCIDUMP` and `MOLDEN`
  - 12.4. Basis choice
  - 12.5. DMRG-SCF
  - 12.6. DMRG-CASPT2
  - 12.7. Solutions

For more elaborate information on CheMPS2, please consult the publications, workshop video, and the doxygen html output.