On September 22nd, OSC switched to Slurm for job scheduling and resource management on the Pitzer Cluster, along with the deployment of the new Pitzer hardware. We are in the process of updating the example job scripts for each software. If a Slurm example is not yet available, please consult our general Slurm information page or contact OSC help.


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 and classical force fields. 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.

Availability and Restrictions


CP2K is available on the OSC clusters. These are the versions currently available:

VERSION ruby owens pitzer notes
6.1     X*  
* Current default version

You can use module spider cp2k to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.


CP2K is available to all OSC users.

Publisher/Vendor/Repository and License Type

CP2K, GNU General Public License


Usage on Pitzer


CP2K usage is controlled via modules. Load one of the CP2K modulefiles at the command line, in your shell initialization script, or in your batch scripts. To load the default version of CP2K, use module load cp2k. To select a particular software version, use module load cp2k/version. For example, use module load cp2k/6.1to load CP2K version 6.1 on Pitzer. 

IMPORTANT NOTE: You need to load the prerequisite compiler and MPI modules before you can load CP2K. To determine those modules, use module spider orca/{version}.

Batch Usage

When you log into pitzer.osc.edu you are actually logged into the login node. To gain access to the vast resources in the computing environment, you must submit your job to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info.  Batch jobs run on the compute nodes of the system and not on the login node. It is desirable for big problems since more resources can be used.

Interactive Batch Session

For an interactive batch session one can run the following command:

qsub -I -l nodes=1:ppn=1 -l walltime=00:20:00

which requests one core (-l nodes=1:ppn=1), for a walltime of 20 minutes (-l walltime=00:20:00). You may adjust the numbers per your need.

Non-interactive Batch Job

batch script can be created and submitted for a serial or parallel run. You can create the batch script using any text editor you like in a working directory on the system of your choice. Below is the example batch script for a parallel run:

#PBS -N cp2k_popt_test
#PBS -l walltime=0:10:0
#PBS -l nodes=2:ppn=40
module load gnu/4.8.5
module load mvapich2/2.3
module load cp2k/6.1
module list

pbsdcp -p job.inp $TMPDIR
mpiexec -np $PBS_NP cp2k.popt -o job.out.$PBS_JOBID -i job.inp
pbsdcp -g job.out $PBS_O_WORKDIR 

Further Reading

General documentation is available from the CP2K website.