CP2K
CP2K is a free and open-source quantum chemistry and solid-state physics software package for atomistic simulations, including electronic structure calculations, molecular dynamics, geometry optimization, and related molecular modelling tasks.
Installed version
2026.2 (installed with CUDA/A100 GPU support with GNU toolchain, OpenMPI, OpenBLAS, FFTW, ScaLAPACK, libxc, libint, libxsmm, DBCSR, spglib)
Load the CP2K module environment with:
module use /opt/software/packages/cp2k/modulefiles
module load cp2k/2026.2
Example input
This minimal CP2K input performs a single-point DFT energy calculation for an isolated H₂ molecule. The calculation uses the CP2K Quickstep method with the PBE exchange-correlation functional, the DZVP-MOLOPT-SR-GTH basis set, and the GTH-PBE pseudopotential. The two hydrogen atoms are placed 0.74 Å apart inside a 10 × 10 × 10 Å simulation cell. Since it is an example input, CP2K does not optimize the geometry or run molecular dynamics; it only computes the electronic energy of the given structure (RUN_TYPE ENERGY is used).
A minimal single-point DFT input file:
&GLOBAL
PROJECT test
RUN_TYPE ENERGY
PRINT_LEVEL LOW
&END GLOBAL
&FORCE_EVAL
METHOD QS
&DFT
BASIS_SET_FILE_NAME /opt/software/packages/cp2k/2026.2/data/BASIS_MOLOPT
POTENTIAL_FILE_NAME /opt/software/packages/cp2k/2026.2/data/POTENTIAL
&MGRID
CUTOFF 280
REL_CUTOFF 40
&END MGRID
&SCF
MAX_SCF 50
EPS_SCF 1.0E-6
SCF_GUESS ATOMIC
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC 10.0 10.0 10.0
&END CELL
&COORD
H 0.0 0.0 0.0
H 0.0 0.0 0.74
&END COORD
&KIND H
BASIS_SET DZVP-MOLOPT-SR-GTH
POTENTIAL GTH-PBE
&END KIND
&END SUBSYS
&END FORCE_EVAL
Submitting a CP2K calculation
The subCP2K helper script can be used to submit CP2K calculations to Slurm:
subCP2K -t <hours> -n <num_gpus> <input>.inp
The -t option specifies the Slurm time limit in hours. Its default value is 24 hours, and fractional values such as 1.5 may also be used. The -n option specifies the number of GPUs and MPI ranks. Between one and four GPUs can be requested per node, with one MPI rank assigned to each GPU. The default value is 1.
For example, the following command submits test.inp using single GPU with a time limit of 1 hour:
subCP2K -t 1 -n 1 test.inp
How to cite CP2K
Kühne, T. D., Iannuzzi, M., Del Ben, M., Rybkin, V. V., Seewald, P., Stein, F., Laino, T., Khaliullin, R. Z., Schütt, O., Schiffmann, F., Golze, D., Wilhelm, J., Chulkov, S., Bani-Hashemian, M. H., Weber, V., Borštnik, U., Taillefumier, M., Jakobovits, A. S., Lazzaro, A., Pabst, H., Müller, T., Schade, R., Guidon, M., Andermatt, S., Holmberg, N., Gomes, A. S. P., Bussy, A., Belleflamme, F., Tabacchi, G., Glöß, A., Lass, M., Bethune, I., Mundy, C. J., Plessl, C., Watkins, M., VandeVondele, J., Krack, M., and Hutter, J. CP2K: An electronic structure and molecular dynamics software package - Quickstep: Efficient and accurate electronic structure calculations. Journal of Chemical Physics 152, 194103 (2020).
Last update by Milán SZŐRI: 2026-07-20