cp2k/tests
2026-01-05 18:02:27 +01:00
..
ATOM PP optimization: Reference can be also a PP (#4635) 2025-12-27 16:51:21 +01:00
DFTB CG/Linesearch (#4141) 2025-04-15 20:13:30 +02:00
FARMING Tests: Convert TEST_TYPES to matchers.py 2025-03-01 19:07:38 +01:00
FE Tests: Convert TEST_TYPES to matchers.py 2025-03-01 19:07:38 +01:00
Fist Remove unnecessary CG optimizer input section 2026-01-05 18:02:27 +01:00
HP-DFT HP-DFT modules and regtests (#4138) 2025-05-15 14:35:20 +02:00
i-PI Docker: Fix i-PI test 2024-11-20 00:55:32 -08:00
LIBTEST Tests: Convert TEST_TYPES to matchers.py 2025-03-01 19:07:38 +01:00
MC/regtest Tests: Rename some matchers 2025-03-08 12:10:39 +01:00
MIMIC/regtest-qmmm Add interface to the MiMiC framework for multiscale simulations 2025-12-28 15:00:33 +01:00
NEB Tests: Convert TEST_TYPES to matchers.py 2025-03-01 19:07:38 +01:00
NNP/regtest-1 Tests: Convert TEST_TYPES to matchers.py 2025-03-01 19:07:38 +01:00
optimize_input/regtest-1 Tests: Convert TEST_TYPES to matchers.py 2025-03-01 19:07:38 +01:00
Pimd add some additional NNP and helium related data/inputs 2025-07-03 10:48:15 +02:00
QMMM CG/Linesearch (#4141) 2025-04-15 20:13:30 +02:00
QS Fix C-levelshift.inp with 4 ranks 2026-01-02 23:39:35 +01:00
SE Adjusted tolerance 2025-10-17 09:54:44 +02:00
SIRIUS/regtest-1 Activate handling of GTH-SOC PP in Sirius (#4363) 2025-08-14 15:46:53 +02:00
SWARM/regtest-glbopt-1 Tests: Convert TEST_TYPES to matchers.py 2025-03-01 19:07:38 +01:00
TAMC/regtest Tests: Convert TEST_TYPES to matchers.py 2025-03-01 19:07:38 +01:00
TMC Tests: Rename some matchers 2025-03-08 12:10:39 +01:00
xTB Docker: Add psmp test running with 4 MPI ranks 2025-12-05 00:04:25 +01:00
.gitignore gitignore: fine-tune for specific subdirs 2018-11-03 07:20:21 +01:00
do_regtest.py Remove hard-set CP2K_DATA_DIR in do_regtest.py (#4659) 2026-01-03 22:09:57 +01:00
HUGE_TESTS_SUPPRESSIONS CP2K+SMEAGOL interface for electron transport with non-equilibrium Green’s functions 2024-10-21 11:05:08 +02:00
matchers.py Implementation of moments for k-point calculations 2025-12-27 13:23:28 +01:00
README.md Tests: Rename some matchers 2025-03-08 12:10:39 +01:00
SLOW_TESTS_SUPPRESSIONS Fix slow tests 2026-01-02 17:36:45 +01:00
TEST_DIRS Add interface to the MiMiC framework for multiscale simulations 2025-12-28 15:00:33 +01:00
UNIT_TESTS mathlib: Add utility functions for square matrix gemm 2025-11-28 12:23:47 +01:00

CP2K Tests

This directory contains input files for CP2K's tests and regression tests.

Automatic test results are collected on CP2K's dashboard for different machines. For documentation on CP2K's input files, please refer to the Input Reference Manual.

Note: the test names make common use of acronyms. For explanations, please refer to the Glossary of Acronyms and Abbreviations.

Regression Tests

There is a very large number of regtests. For this reason, each individual regtest should be fast (e.g. shorter than a minute on a regular laptop with an sdbg version of the code). Since these tests do not need to return meaningful results (just consistent results), one can use e.g. small basis sets, low cutoffs, small EPS_DEFAULT, ...

Test Directories Structure

The test-suite is fully controlled by the following files:

  • TEST_DIRS is a list of directories that contain tests.
  • matchers.py implements the matchers that are executed after an input file was run to check if the output matches expectations.

Additionally, each test-subdirectory contain TEST_FILES.toml, which lists the input files that should be run alongside with a list of matchers. Commonly each matcher takes a reference value and a tolerance as input.

Each regtests can list zero, one, or more matchers:

"wat_mode_sel.inp"                      = []

"Ar.inp"                                = [{matcher="M001", tol=3e-13, ref=-21.04944231395054}]

"h2_gapw_2-2.inp"                       = [{matcher="M001", tol=1e-12, ref=-1.12703481947359},
                                           {matcher="M092", tol=1e-8,  ref=4.08763868}]

Matchers can be easily renamed. For example, the following command renames matcher M001 to E_total:

sed -i  s/\"M001\"/\"E_total\"/g  matchers.py */TEST_FILES.toml */*/TEST_FILES.toml */*/*/TEST_FILES.toml

Some regression testing directories contain:

  • untested_inputs: list of input files, which have a more meaningful setup compared to the regtests, but that are not checked at every single commit.

How to Run Regression Tests

For information on how to run regression testing, please refer to the regression testing documentation.

How to Add a Regression Test

To add a regression test, commit the .inp file and add a corresponding entry to TEST_DIRS and TEST_FILES.