cp2k/tests
2025-07-22 16:39:38 +02:00
..
ATOM Tests: Convert TEST_TYPES to matchers.py 2025-03-01 19:07:38 +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 add ace support 2025-05-06 08:32:16 +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 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
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 Resonant Inelastic X-ray Spectroscopy (RIXS) Module 2025-07-22 16:39:38 +02:00
SE Adjust tolerance of SE/regtest-2-1/hcl_ot.inp 2025-07-20 10:20:55 +02:00
SIRIUS/regtest-1 Tests: Speedup SIRIUS/regtest-1/Fe-upf.inp 2025-05-07 13:47:19 +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 Jvp gfn grad (#4242) 2025-06-13 14:41:48 +02:00
.gitignore gitignore: fine-tune for specific subdirs 2018-11-03 07:20:21 +01:00
do_regtest.py Fixed Python scripts for (3.x but) pre-3.8 2025-07-10 15:46:18 +02: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 Atomic polarization tensors via numerical differentiation 2025-07-21 19:40:43 +02:00
README.md Tests: Rename some matchers 2025-03-08 12:10:39 +01:00
SLOW_TESTS_SUPPRESSIONS Integrate libsmeagol into regression testing 2025-01-08 09:57:38 +01:00
TEST_DIRS Resonant Inelastic X-ray Spectroscopy (RIXS) Module 2025-07-22 16:39:38 +02:00
UNIT_TESTS Toolchain: Add GreenX 2025-03-28 22:12:22 +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.