Dr. Ole Schütt - CP2K Foundation
cp2k
Container
Dr. Ole Schütt - CP2K Foundation
cp2k

A quantum chemistry and solid state physics software package

CP2k

CP2K is a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems. CP2K provides a general framework for different modeling methods such as DFT using the mixed Gaussian and plane waves approaches GPW and GAPW. Supported theory levels include DFTB, LDA, GGA, MP2, RPA, semi-empirical methods (AM1, PM3, PM6, RM1, MNDO, ...), and classical force fields (AMBER, CHARMM, ...). CP2K can do simulations of molecular dynamics, metadynamics, Monte Carlo, Ehrenfest dynamics, vibrational analysis, core level spectroscopy, energy minimization, and transition state optimization using NEB or dimer method.

System Requirements

x86_64

  • CPU with AVX2 instruction support
  • One of the following CUDA driver versions
    • >= 527.41

arm64

  • Pascal(sm60), Volta(sm70), Ampere (sm80/sm86), or Hopper (sm90) NVIDIA GPU(s)
  • CPU with Neoverse-N1 instruction support
  • One of the following CUDA driver versions
    • >=525.60.13

Running CP2k

Download the Benchmark

For this example we will use the QS_DM_LS benchmark that will perform a single-point energy calculation using linear-scaling DFT. More information on this benchmark can be found here.

Select Tag

Several CP2K images are available, depending on your needs. Set the following environment variable which will be used in the example below.

export CP2K_TAG={TAG}

Where {TAG} is v2024.3 or any other tag previously posted on NGC.

Running with the NVIDIA Container Toolkit

Without Infiniband

docker run -it --privileged --rm --gpus all --shm-size 32Gb -v ${PWD}:/host_pwd --workdir /host_pwd nvcr.io/hpc/cp2k:${CP2K_TAG} mpirun -n 2 cp2k.psmp -i H2O-dft-ls.NREP2.inp

With Infiniband

docker run -it --privileged --rm -v ${PWD}:/host_pwd --workdir /host_pwd --gpus all --shm-size 32Gb --device=/dev/infiniband --cap-add=IPC_LOCK --net=host nvcr.io/hpc/cp2k:${CP2K_TAG} mpirun -n 2 cp2k.psmp -i H2O-dft-ls.NREP2.inp

Note: Docker Versions <=20.xx.xx

There is currently a bug in older Docker versions with newer Ubuntu images, using the latest tag of CP2K requires the --privileged flag to run the container, or an update to Docker.

Running with Singularity

singularity run --nv -B ${PWD}:/host_pwd --pwd /host_pwd docker://nvcr.io/hpc/cp2k:${CP2K_TAG} mpirun -n 2 cp2k.psmp -i H2O-dft-ls.NREP2.inp

Note: Singularity 3.1.x - 3.2.x

There is currently a bug in Singularity 3.1.x and 3.2.x causing the LD_LIBRARY_PATH to be incorrectly set within the container environment. As a workaround The LD_LIBRARY_PATH must be unset before invoking Singularity:

$ LD_LIBRARY_PATH="" singularity run --nv -B ${PWD}:/host_pwd --pwd /host_pwd docker://nvcr.io/hpc/cp2k:${CP2K_TAG}

Suggested Reading

CP2k

CP2k GitHub

CP2k How To

CP2k Manual

Publisher
Dr. Ole Schütt - CP2K Foundation
Latest Tagv2024.3
UpdatedMarch 17, 2025 UTC
Compressed Size12.64 GB
Multinode SupportYes
Multi-Arch SupportYes

NVIDIA uses cookies to improve your experience on our web site. We and our third-party partners also use cookies and other tools to collect and record information you provide as well as information about your interactions with our websites for performance improvement, analytics, and to assist in marketing efforts. By clicking "Accept All", you consent to our use of cookies and other tools as described in our Cookie Policy. You can manage your cookie settings by clicking on "Manage Settings." By continuing to use this site or by clicking one of the buttons below, you agree to our Terms of Service (which contains important waivers). Please see our Privacy Policy for more information on our privacy practices.