General information

CP2K is a freely available 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.


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 module environment appropriate first after login to one of our system (SuperMUC or Linux-Cluster) via:

 module load cp2k

Serial execution of CP2K

After loading the module of CP2K, the executables files are in:

echo $CP2K_BIN

You can call the sequential execution of CP2K on SuperMUC or Linux-Cluster via:

cp2k inputfilename or cp2k -n 1 inputfilename 

Parallel execution on Linux-Cluster and SuperMUC

Linux-Cluster (SLURM)


#SBATCH -o /home/cluster/<group>/<user>/mydir/cp2k.%j.out
#SBATCH -D /home/cluster/<group>/<user>/mydir
#SBATCH -J <job_name>
#SBATCH --clusters=cm2_tiny
#SBATCH --get-user-env
#SBATCH --ntasks=28
#SBATCH --mail-type=end
#SBATCH --mail-user=<email_address>@<domain>
#SBATCH --export=NONE
#SBATCH --time=24:00:00

module load slurm_setup
module load cp2k cd mydire <link to your data-set> mpiexec -n 28 cp2k.popt inp.files >& out.log
#or with OpenMP use cp2k.psmp
# Job Name and Files (also --job-name)
#SBATCH -J jobname
#Output and error (also --output, --error):
#SBATCH -o ./%x.%j.out
#SBATCH -e ./%x.%j.err
#Initial working directory (also --chdir):
#Notification and type
#SBATCH --mail-type=END
#SBATCH --mail-user=insert_your_email_here
# Wall clock limit:
#SBATCH --time=24:00:00
#SBATCH --no-requeue
#Setup of execution environment
#SBATCH --export=NONE
#SBATCH --get-user-env
#SBATCH --account=insert your_projectID_here
#SBATCH --partition=insert test, micro, general, large or fat

module load slurm_setup
module load cp2k
cd $HOME/mydir

mpiexec -n 160 cp2k.popt inp.files >& out.log

Then submit the job script using sbatch (SLURM) command.

e.g., assume the job script name is name-job.sh:

% sbatch  name-job.sh


After loading the appropriate module of CP2K, the directory below contain the CP2K documentation as it comes with the source code:

 % echo $CP2K_DOC

Please consult the CP2K-webpage for more documentation.


After loading the environment appropriate module, the CP2K the examples are in:



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.