Below we provide installation instructions for octopus for the TDDFT school in Benasque 2025
Installing required libraries
During the school we use several features of Octopus that require external libraries. As a first step
these libraries have to be installed. Below we provide a few shell scripts that help to install the
libraries and octopus. All of the scripts have to be executed in the same folder.
Installing libxc
Copy this bash code to a script with name build-libxc.sh. Note, that for libxc
we have to enable the Fortran support.
Expand to see the shell script
#!/bin/bash
set -x
# Fetch recent version of libxcwget https://gitlab.com/libxc/libxc/-/archive/7.0.0/libxc-7.0.0.tar.bz2
# Unpacktar -jxvf libxc-7.0.0.tar.bz2
# Configure with Fortran support and build libxcpushd libxc-7.0.0
cmake -B build --fresh -G Ninja \
-DENABLE_FORTRAN=ON \
-DDISABLE_KXC=OFF \
-DCMAKE_INSTALL_PREFIX="$(pwd)-install" cmake --build build
cmake --install build
popd
Next, we have to make the script executable and run it
chmod +x build-libxc.sh
./build-libxc.sh
Installing CGAL library
Copy the following bash code to build-cgal.sh
Expand to see the shell script
#!/bin/bash
set -x
# Fetch recent version of CGALwget https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1-library.tar.xz
# Unpacktar -Jxvf CGAL-6.0.1-library.tar.xz
# Configure and build CGALpushd CGAL-6.0.1
cmake -B build --fresh -G Ninja \
-DCMAKE_INSTALL_PREFIX="$(pwd)-install" cmake --build build
cmake --install build
popd
As for the case of libxc, we also make this executable and run it
chmod +x build-cgal.sh
./build-cgal.sh
Installing Octopus
Once the required libraries are in place, we finally can install octopus.