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 psi4/external/upstream/libint2/CMakeLists.txt .
Libint is available as a conda package for Linux and macOS and Windows.
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 libint2 -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 libint2.
Note that PSI4 uses v2 and a modified branch.
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. Note that Libint2 has many more integral class enabling and AM knobs than Libint1 and that the generation step (generator source to library source) preceding the compilation step (library source to built library) takes far longer than in Libint1 for production builds.
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_PREFIX_PATH — CMake list variable to specify where pre-built dependencies can be found. For Libint, set to an installation directory containing
Libint2_DIR — CMake variable to specify where pre-built Libint can be found. Set to installation directory containing
CMAKE_DISABLE_FIND_PACKAGE_Libint2 — CMake variable to force internal build of Libint instead of detecting pre-built
CMAKE_INSIST_FIND_PACKAGE_Libint2 — CMake variable to force detecting pre-built Libint and not falling back on internal build
BUILD_Libint2_GENERATOR — CMake variable to allow internal build to start from generator source, not generated source
MAX_AM_ERI — CMake variable to specify minimum highest angular momentum built or detected
Link against pre-built
>>> cmake -DCMAKE_PREFIX_PATH=/path/to/libint/root>>> cmake -DLibint_DIR2=/path/to/libint/configdir
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_Libint2=ON
Build bundled shared library with up to AM=5
>>> cmake -DBUILD_SHARED_LIBS=ON
Build custom library from generator source
>>> # find the "new-cmake-harness-lab-rb1" block at :source:`external/upstream/libint2/CMakeLists.txt` >>> # edit the "ENABLE" and "AM" variables >>> cmake -DBUILD_Libint2_GENERATOR=ON -DCMAKE_DISABLE_FIND_PACKAGE_Libint2=ON