Interface to Libint by E. Valeev

Code author: Edward F. Valeev and Justin T. Fermann

Section author: Lori A. Burns

PSI4, particularly libmints utterly relies upon the Libint library developed by E. Valeev from early roots by J. Fermann. Libint requires no additional licence, downloads, or configuration. Conversely, PSI4 cannot build without Libint.


As of Nov 2020 or release v1.4, PSI4 uses Libint2, not Libint1. Compared to many other open-source QC codes, PSI4 requires a separate Libint compilation with a different integrals ordering. See notes at top of



  • Libint is available as a conda package for Linux and macOS (and Windows, through the Ubuntu shell).

  • If using the PSI4 binary, Libint has already been installed alongside.

  • If using PSI4 built from source, and anaconda or miniconda has already been installed (instructions at Quick Installation), Libint can be obtained through conda install libint -c psi4. Then, hint its location with CMAKE_PREFIX_PATH, and rebuild PSI4 to detect Libint and activate dependent code.

  • To remove a conda installation, conda remove libint.



    Note that PSI4 uses v1.

  • If using PSI4 built from source and you want Libint built from from source also, let the build system fetch and build it and activate dependent code.

How to configure Libint for building Psi4

Role and Dependencies

  • Role — In PSI4, Libint is a library that provides essential two-body molecular integrals over Gaussian functions.

  • Downstream Dependencies — PSI4 \(\Leftarrow\) Libint

  • Upstream Dependencies — Libint \(\Leftarrow\) None

CMake Variables

  • CMAKE_PREFIX_PATH — CMake list variable to specify where pre-built dependencies can be found. For Libint, set to an installation directory containing include/libint/libint.h

  • Libint_DIR — CMake variable to specify where pre-built Libint can be found. Set to installation directory containing share/cmake/Libint/LibintConfig.cmake

  • CMAKE_DISABLE_FIND_PACKAGE_Libint — CMake variable to force internal build of Libint instead of detecting pre-built

  • CMAKE_INSIST_FIND_PACKAGE_Libint — CMake variable to force detecting pre-built Libint and not falling back on internal build

  • MAX_AM_ERI — CMake variable to specify minimum highest angular momentum built or detected


  1. Build bundled

>>> cmake
  1. Link against pre-built

>>> cmake -DCMAKE_PREFIX_PATH=/path/to/libint/root
>>> cmake -DLibint_DIR=/path/to/libint/configdir
  1. Build bundled despite pre-built being detectable

>>> cmake -DCMAKE_PREFIX_PATH=/path/to/unwanted/libint/root/and/wanted/other/dependencies/root -DCMAKE_DISABLE_FIND_PACKAGE_Libint=ON
  1. Build bundled shared library with AM=6