CP2K
General information
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. CP2K is written in Fortran 2008 and can be run efficiently in parallel using a combination of multi-threading, MPI, and CUDA.
Licensing
The sources of CP2K are free for all users (GPL license) and all versions of the code are available from CVS.
Please visit the CP2K-webpage for complete information and documentation.
How to run CP2K
Before running CP2K jobs, please load the appropriate module environment first after login to one of our system, SuperMUC Phase 1/Phase 2 or CoolMUC).
For instance, to use latest cp2k version, load latest software stack as below:
module load stack/ #TAB multiple times to see list of stacks available
OUTPUT: stack/21.1.1 stack/23.1.0 stack/24.5.0 stack/default
#Switch to latest stack
module purge
module load stack/24.5.0
then search for cp2k as below:
module avail cp2k
OUTPUT:
---------------------- /lrz/sys/spack/release/sles15.3/24.5.0/modules/skylake_avx512 ---------------------
cp2k/2023.2-gcc14-impi-openmp: applications:quantum chemistry and solid state physics software:CP2K
cp2k/2024.1-gcc14-impi-openmp: applications:quantum chemistry and solid state physics software:CP2K
cp2k/2024.3-gcc14-impi-openmp-plumed: applications:quantum chemistry and solid state physics software:CP2K
cp2k/2025.1-gcc14-impi-openmp-plumed: applications:quantum chemistry and solid state physics software:CP2K
then select required version and load cp2k as:
module load cp2k/2025.1-gcc14-impi-openmp-plumed
Serial execution of CP2K
After loading the module of CP2K, the executables files are in:
echo $CP2K_BIN/bin
You can perform the sequential execution of CP2K via:
cp2k.psmp -n 1 -i inputfilename
Parallel execution on CoolMUC, SuperMUC Phase 1 and SuperMUC Phase 2
CoolMUC job submission details: https://doku.lrz.de/job-processing-on-the-linux-cluster-10745970.html
SuperMUC Phase 1 job submission details: https://doku.lrz.de/job-processing-with-slurm-on-supermuc-ng-10746568.html
SuperMUC Phase 2 job submission details: https://doku.lrz.de/operation-of-supermuc-ng-phase-2-403079197.html
#!/bin/bash #SBATCH -o cp2k.%j.out # good to check errors #SBATCH -D ./ # current dir #SBATCH -J JOB_NAME #SBATCH --clusters=cm4 # inter, serial | #!/bin/bash | #!/bin/bash |
Then submit the job script using sbatch (SLURM) command.
e.g., assume the job script name is name-job.sh:
sbatch slurm-script.sh
Documentation
For documentation, please consult the CP2K-webpage.
To check the specs of loaded cp2k module
more $CP2K_SPEC
Examples
CP2K examples are available at https://github.com/cp2k/cp2k-examples
Support
If you have any questions or problems with the installed version of CP2K on the different LRZ platforms, please contact Dr. M. Allalen: allalen_at_lrz.de / Dr. P. B. Ganta: prasanth.ganta_at_lrz.de