CP2K
Excels at ab initio molecular dynamics of solids and liquids thanks to its mixed Gaussian and plane-wave scheme.
Tool 013 of 100 in the MolForge directory of open-source tools. Every fact below was read from the repository's host on 2026-11-28.

What CP2K is
CP2K is an atomistic simulation package whose core is Quickstep, a DFT implementation that mixes Gaussian and plane waves (GPW). Orbitals are expanded in atom-centred Gaussians while the electron density is also represented on a real-space grid, so electrostatics are handled by fast Fourier transforms. This combination makes energy and force evaluation cheap enough for Born-Oppenheimer molecular dynamics of condensed systems, liquids and interfaces, which is the historical focus of the programme. Hybrid functionals with auxiliary density matrices, linear-scaling DFT, MP2 and RPA correlation, and GW for molecules and solids extend the range.
Input is a hierarchical text file of sections (&GLOBAL, &FORCE_EVAL, &MOTION) with GTH pseudopotentials and MOLOPT basis sets shipped with the code. Outputs include trajectories, cube files, restart files and property reports. CP2K also contains DFTB and xTB tight binding, classical force fields with QM/MM, metadynamics and free-energy methods, nudged elastic band, real-time TDDFT and NMR and EPR properties. It integrates with ASE, i-PI and PLUMED, and runs on GPUs through its DBCSR and grid libraries.
The input format is verbose and the number of options is large; reproducing a published setup requires attention to basis set, cutoff and pseudopotential choices.
Features
- Gaussian and plane-wave DFT (GPW and GAPW) with GTH pseudopotentials and MOLOPT basis sets
- Born-Oppenheimer molecular dynamics with thermostats, barostats and metadynamics
- Hybrid functionals with ADMM; linear-scaling DFT for very large systems
- MP2, RPA and GW for molecules and periodic systems
- DFTB, xTB and classical force fields with QM/MM coupling
- Linear-response and real-time TDDFT; NMR, EPR and X-ray absorption properties
- Interfaces to ASE, i-PI and PLUMED; GPU support through DBCSR and grid kernels
What it is for
- Run ab initio molecular dynamics of liquids, solutions and solid-liquid interfaces
- Compute free-energy profiles of reactions in condensed phase with metadynamics
- Model enzymatic or solvated reactions with QM/MM
- Treat systems of thousands of atoms with linear-scaling DFT
Verified facts
| Family | Electronic structure of solids (periodic DFT) |
|---|---|
| Language or basis | Gaussians and plane waves |
| Repository | https://github.com/cp2k/cp2k (GitHub) |
| Licence | GPL-2.0 (SPDX identifier as declared in the repository) |
| Main language on GitHub | Fortran |
| Last commit | 2026-11-28 |
| Latest release | v2026.2 (2026-07-15) |
| Stars | 1,251 on 2026-11-28 |
| Open issues and pull requests | 150 on 2026-11-28 |
| Repository created | 2018-10-02 |
| Verified | 2026-11-28 by MolForge's checking script, against the host's API |
Where CP2K fits
Codes for crystals, surfaces and periodic materials, with plane waves, augmented plane waves or localised bases. VASP, WIEN2k and CASTEP are the proprietary references.
It is the first place to look when you want a crystal or a surface (periodic DFT).
Questions people ask
- How is CP2K different from Quantum ESPRESSO or VASP?
- Those codes expand orbitals in plane waves, which suits crystals with small cells. CP2K uses Gaussian orbitals with a plane-wave grid for the density, which keeps the cost per molecular dynamics step low for large, low-symmetry systems such as liquids and interfaces. It is less commonly used for metals with dense k-point requirements, where plane-wave codes are the usual choice.
- Does CP2K run on GPUs?
- Yes. The sparse matrix library DBCSR and the collocation and integration grid kernels have CUDA and HIP back-ends, and the build system has GPU target options. Acceleration benefits linear-scaling DFT and large molecular dynamics runs most; some methods remain CPU-only, so the documentation should be checked for the method in question.
- Can CP2K do QM/MM?
- Yes. A QM region treated with DFT, DFTB or xTB can be coupled to a classical region described by force fields in AMBER, CHARMM or GROMOS formats, with electrostatic embedding handled through the GPW grid. It supports molecular dynamics and free-energy methods on the combined system, and is used for enzymatic reactions and solvated chromophores.
- What basis sets and pseudopotentials does CP2K use?
- Gaussian basis sets optimised for condensed-phase use, the MOLOPT family, together with Goedecker-Teter-Hutter (GTH) pseudopotentials matched to each functional; both are distributed with the code in text files. All-electron calculations are possible with the GAPW method and standard Gaussian basis sets. Basis set and plane-wave cutoff both need convergence testing.
- Is CP2K open source?
- Yes. The repository declares the GPL-2.0 licence (SPDX identifier read from the host on 2026-11-28). Read the licence text in the repository before redistributing or embedding it.
- Where is the CP2K source code?
- At https://github.com/cp2k/cp2k (GitHub). This is the address the host reported on the day of verification; renamed repositories are followed to their new home.
- Is CP2K still maintained?
- The last commit was pushed on 2026-11-28 and the latest tagged release is v2026.2 from 2026-07-15; the repository had 150 open issues and pull requests on 2026-11-28.
- Does MolForge use CP2K?
- No. MolForge runs nine of the hundred tools in this directory (RDKit, OpenMM, AutoDock Vina, Open Babel, MDTraj, pymbar and NGL, plus PySCF and xTB in MFsig); CP2K is listed because of its place in electronic structure of solids (periodic DFT), not because we run it.
Our comments on CP2K
MolForge does not run CP2K in production. This page is a verified pointer, not a review: the facts above come from the repository on the date shown, the description is ours, and we make no claim about accuracy or speed that we have not measured. If you maintain CP2K and something here is wrong or out of date, write to hello@molforge.ai and we will correct the source file.
Test status
Not tested by MolForge. To check CP2K yourself: clone the repository, follow the installation section of its README, and run the test suite the project ships before trusting a result; the last-commit date and the open issue count above tell you how alive the project is.