CP2K 

Description

CP2K is a freely available (GPL) program, written in Fortran 95, to perform atomistic and molecular simulations of solid state, liquid, molecular and biological systems. It provides a general framework for different methods such as e.g. density functional theory (DFT) using a mixed Gaussian and plane waves approach (GPW), and classical pair and many-body potentials.

More information

- Homepage: https://www.cp2k.org/

Available Versions of CP2K

Version

Module

Available on

Version

Module

Available on

c415b5d-foss-2023b-gcc-openmpi-openblas

chem/CP2K/c415b5d-foss-2023b-gcc-openmpi-openblas

Noctua 2

c0268df-foss-2023b-gcc-openmpi-openblas

chem/CP2K/c0268df-foss-2023b-gcc-openmpi-openblas

Noctua 2

bbd302a-foss-2023b-gcc-openmpi-openblas

chem/CP2K/bbd302a-foss-2023b-gcc-openmpi-openblas

Noctua 2

2024.3-foss-2023b-gcc-openmpi-openblas

chem/CP2K/2024.3-foss-2023b-gcc-openmpi-openblas

Noctua 2

2024.2-foss-2023b-gcc-openmpi-openblas

chem/CP2K/2024.2-foss-2023b-gcc-openmpi-openblas

Noctua 2

2024.1-foss-2023b-gcc-openmpi-openblas-libgrpp

chem/CP2K/2024.1-foss-2023b-gcc-openmpi-openblas-libgrpp

Noctua 2

2024.1-foss-2023b-gcc-openmpi-openblas-cuda2

chem/CP2K/2024.1-foss-2023b-gcc-openmpi-openblas-cuda2

Noctua 2

2024.1-foss-2023b-gcc-openmpi-openblas-cuda

chem/CP2K/2024.1-foss-2023b-gcc-openmpi-openblas-cuda

Noctua 2

2023.1-foss-2022b-gcc-openmpi-openblas-cuda

chem/CP2K/2023.1-foss-2022b-gcc-openmpi-openblas-cuda

Noctua 1, Noctua 2

2023.1-foss-2022b-gcc-openmpi-openblas

chem/CP2K/2023.1-foss-2022b-gcc-openmpi-openblas

Noctua 2

47e307d-foss-2023b-gcc-openmpi-openblas

chem/CP2K/47e307d-foss-2023b-gcc-openmpi-openblas

Noctua 2

26e5994-foss-2023b-gcc-openmpi-openblas

chem/CP2K/26e5994-foss-2023b-gcc-openmpi-openblas

Noctua 2

9.1-foss-2021b

chem/CP2K/9.1-foss-2021b

Noctua 1, Noctua 2

8.2-foss-2021a

chem/CP2K/8.2-foss-2021a

Noctua 1, Noctua 2

This table is generated automatically. If you need other versions please click pc2-support@uni-paderborn.de.

Usage Hints for CP2K

If you need support in using this software or example job scripts please contact pc2-support@uni-paderborn.de.



Noctua 2

On CPUs

An example job script and configuration that has been tuned for the example of a DFT-based MD calculation (with DIIS in OT) for about 1000 atoms in a DZVP-like basis 

#!/bin/bash #SBATCH -t 2:00:00 #SBATCH --exclusive #SBATCH --ntasks-per-node=32 #SBATCH --cpus-per-task=4 #SBATCH -N 2 #SBATCH -J "cp2k test" export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK export OMP_PLACES=cores export OMP_PROC_BIND=true module reset module load chem/CP2K/2023.1-foss-2022b-gcc-openmpi-openblas srun cp2k.psmp bench.inp

On NVIDIA GPUs

#!/bin/bash #SBATCH -t 2:00:00 #SBATCH --ntasks-per-node=1 #SBATCH --cpus-per-task=32 #SBATCH --gres=gpu:a100:1 #SBATCH -N 1 #SBATCH -J "cp2k test" export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK export OMP_PLACES=cores export OMP_PROC_BIND=true module reset module load chem/CP2K/2023.1-foss-2022b-gcc-openmpi-openblas-cuda srun cp2k.psmp bench.inp

 

CP2K Testsuite Results

Module

Binary

Arch file

cp2kflags

libint lmax

Test run/Test successful

Module

Binary

Arch file

cp2kflags

libint lmax

Test run/Test successful

2023.1-foss-2022b-gcc-openmpi-openblas

cp2k.psmp

$EBROOTCP2K/arch/local.psmp

omp libint fftw3 libxc elpa parallel scalapack cosma xsmm plumed2 spglib sirius libvori libbqb libvdwxc

7

3921/3921

2023.1-foss-2022b-gcc-openmpi-openblas-cuda

cp2k.psmp

$EBROOTCP2K/arch/local_cuda.psmp

omp libint fftw3 libxc elpa elpa_nvidia_gpu parallel scalapack cosma xsmm dbcsr_acc plumed2 spglib sirius libvori libbqb offload_cuda spla_gemm_offloading libvdwxc

7

3863/3863

2024.1-foss-2023b-gcc-openmpi-openblas

cp2k.psmp

$EBROOTCP2K/arch/local.psmp

omp libint fftw3 libxc libgrpp elpa parallel mpi_f08 scalapack cosma xsmm plumed2 spglib sirius libvori libbqb libvdwxc hdf5

7

4171/4171

26e5994-foss-2023b-gcc-openmpi-openblas

cp2k.psmp

$EBROOTCP2K/arch/local.psmp

omp libint fftw3 libxc libgrpp elpa parallel mpi_f08 scalapack cosma deepmd xsmm plumed2 spglib sirius libvori libbqb libvdwxc hdf5

7

4180/4180

Building Custom CP2K Versions

If you are a CP2K developer or have another reason for not using one of the installed versions above like a required code change, then we provide two variants for easily building your own CP2K version.

Using Provided Arch-Files

Let’s say that you for example want to build the current development version or any other special version of CP2K on Noctua 2. Then you can use the arch-file and all dependencies from an installed CP2K module above. The steps are

  1. clone the source of the cp2k version you want. For example for the current development version from github:

    git clone --recursive https://github.com/cp2k/cp2k.git cp2k
  2. change into the cp2k source tree

  3. load one of the available modules like 2024.3-foss-2022b-gcc-openmpi-openblas

  4. copy the arch file from the module to your local cp2k arch directory. The path to the arch-files is in the environment variable EBROOTCP2K

  5. Build cp2k, for example for cp2k.psmp

  6. You can now use your custom cp2k version in job scripts like

    Remember to load the module that you used to build cp2k because it holds all the dependencies (xsmm, ELPA, …)

Using Spack

Another variant is to use Spack to build a custom version of CP2K. The steps are for example for the development version of cp2k with the development version of SIRIUS in a new spack environment in the current directory.

Install Spack:

Create a spack virtual environment:

Compile dependencies and CP2K (this takes a while):

Using the dependencies built with Spack to build a custom cp2k version:


If you have any problems, please let us know at pc2-support@uni-paderborn.de.

 

Using Databases like Materials Project

Our HPC nodes can easily access databases with structure information like Materials Project because the frontend and compute nodes have direct access to the Internet.

Materials Project

You can use data from the materials project (materialsproject.org) on our systems with the following steps:

One-time steps:

  1. register with the materials project to get an API key via https://next-gen.materialsproject.org/api#api-key

  2. On the cluster:

    1. load a recent Python module  like lang/Python/3.12.3-GCCcore-13.3.0, i.e.
      module load lang/Python/3.12.3-GCCcore-13.3.0

    2. install the Material Projects client with
      pip3 install --user mp_api
      If you need different versions of the Materials Project client instead of installing on version in your Home directory you can also use individual Python environments or Conda environments.

Using it in practice:

  1. load the above-used module like lang/Python/3.12.3-GCCcore-13.3.0, i.e.
    module load lang/Python/3.12.3-GCCcore-13.3.0

  2. Use a Python script like

You can find more examples at https://docs.materialsproject.org/downloading-data/using-the-api/examples.

The documentation of the Materials Project can be found at https://docs.materialsproject.org/downloading-data/how-do-i-download-the-materials-project-database. We are happy to support you, please let us know at pc2-support@uni-paderborn.de.