CP2K

Software name: 
CP2K
Policy 

CP2K is freely available to users at HPC2N.

General 

CP2K is a freely available program to perform atomistic and molecular simulations of solid state, liquid, molecular and biological systems.

Description 

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

CP2K provides state-of-the-art methods for efficient and accurate atomistic simulations, sources are freely available and actively improved.

It can be compiled for different platforms and compilers, and for serial, MPI, OpenMP, and hybrid MPI/OpenMP jobs. 

Availability 

On HPC2N we have CP2K available as a module on Abisko and Kebnekaise. Only the parallel version is installed.

Usage at HPC2N 

To use the cp2k module, add it to your environment. Use:

module spider cp2k

to see which version sare available. Then do

module spider CP2K/<version>

to determine how to load the module and prerequisite modules. Loading the module should set any needed environmental variables as well as the path. 

You can read more about loading modules on our Accessing software with Lmod page and our Using modules (Lmod) page.

In order to run a case, you should stand inside the case directory in order to be able to read any data files (parameters etc.) associated with the input-file.

Examples can be found in $EBROOTCP2K/tests when the module has been loaded.

MPI

MPI-jobs should be run as batch-jobs. The executable is named

cp2k.popt

Make a batch-script similar to this example:

#!/bin/bash
# Project to run under
#SBATCH -A SNICXXX-YY-ZZ
# Name of job script 
#SBATCH -J My_CP2K_job
# name of the output file
#SBATCH --output=My_CP2K_job.out
# name of the error file
#SBATCH --error=My_CP2K_job.err

# asking for 8 cores
#SBATCH -n 8
# the job may to use up to 30 minutes to run
#SBATCH --time=00:30:00

# Load the CP2K module - 4.1 in this example  
ml icc/2017.1.132-GCC-6.3.0-2.27  impi/2017.1.132
ml CP2K/4.1

# run the job
srun cp2k.popt <yourfile.inp>

Submit it with

sbatch <jobscript>

where <jobscript> is the name you give your batch-script. Remember to submit from your case-directory.

Additional info 

You can get more information about various flags (for instances, setting input and output files), by running

$ cp2k.popt -help

References

Updated: 2017-12-06, 15:21