cp2k/tests
2026-06-14 12:46:35 +02:00
..
ATOM PP optimization: Reference can be also a PP (#4635) 2025-12-27 16:51:21 +01:00
DFTB Adjust regtests and ignore tblite SCC mixer residual for OT/LS_SCF (#5357) 2026-06-06 00:14:32 +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 Add conservative AUTO default for cell canonicalization (#5318) 2026-05-30 20:11:58 +02: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 Testing: Split LIBTEST directory 2026-03-23 17:48:46 +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 BCMD propagator to PINT (#5247) 2026-05-19 09:57:35 +02:00
QMMM CG/Linesearch (#4141) 2025-04-15 20:13:30 +02:00
QS Floquet physics (#5380) 2026-06-14 12:46:35 +02:00
SE Fix TB gradients, virials, and k-point symmetry 2026-05-06 00:47:46 +02:00
SIRIUS/regtest-1 Add conservative AUTO default for cell canonicalization (#5318) 2026-05-30 20:11:58 +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 Adjust regtests and ignore tblite SCC mixer residual for OT/LS_SCF (#5357) 2026-06-06 00:14:32 +02:00
.gitignore gitignore: fine-tune for specific subdirs 2018-11-03 07:20:21 +01:00
do_regtest.py Regtesting for secondary output files (#5315) 2026-05-29 14:37:11 +02:00
HUGE_TESTS_SUPPRESSIONS Regtest: suppress wavefunction restart file in some huge tests (#4983) 2026-03-21 20:51:52 +01:00
matchers.py Floquet physics (#5380) 2026-06-14 12:46:35 +02:00
README.md Tests: Rename some matchers 2025-03-08 12:10:39 +01:00
SLOW_TESTS_SUPPRESSIONS Add native GPW Skala grid evaluation (#5319) 2026-05-31 09:05:59 +02:00
TEST_DIRS Floquet physics (#5380) 2026-06-14 12:46:35 +02:00
UNIT_TESTS Fix high-l real spherical harmonic rotations (#5313) 2026-05-29 16:12:41 +02: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.