From 1233a2ca2a83620b6a50c76e893dbdce4d6e0d56 Mon Sep 17 00:00:00 2001 From: "Johann Potot." Date: Wed, 13 May 2026 18:05:44 +0200 Subject: [PATCH] small fixes for testing (#5177) Co-authored-by: Johann Pototschnig --- tests/DFTB/regtest-scc/TEST_FILES.toml | 2 +- tests/DFTB/regtest-scc/ch2o_tblite_mixer.inp | 2 +- tests/QS/regtest-gpw-8/TEST_FILES.toml | 2 +- tests/QS/regtest-kp-1-spg/TEST_FILES.toml | 22 +++++++++++++++++ .../c_cell_opt_kpsym_guard.inp | 0 .../c_debug_kpsym_default.inp | 0 .../c_debug_kpsym_full.inp | 0 .../c_geo_opt_kpsym_spglib.inp | 1 + .../c_spglib_backend_gamma_real_wfn.inp | 0 .../h_hex_c3_gamma_macdonald_spglib.inp | 0 .../h_hex_c3_gamma_spglib.inp | 0 .../h_hex_c3_sym_red.inp | 0 .../h_spglib_sym_red.inp | 0 .../h_spglib_sym_red_restart.inp | 0 tests/QS/regtest-kp-1/TEST_FILES.toml | 24 ++----------------- tests/TEST_DIRS | 1 + 16 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 tests/QS/regtest-kp-1-spg/TEST_FILES.toml rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/c_cell_opt_kpsym_guard.inp (100%) rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/c_debug_kpsym_default.inp (100%) rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/c_debug_kpsym_full.inp (100%) rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/c_geo_opt_kpsym_spglib.inp (98%) rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/c_spglib_backend_gamma_real_wfn.inp (100%) rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/h_hex_c3_gamma_macdonald_spglib.inp (100%) rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/h_hex_c3_gamma_spglib.inp (100%) rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/h_hex_c3_sym_red.inp (100%) rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/h_spglib_sym_red.inp (100%) rename tests/QS/{regtest-kp-1 => regtest-kp-1-spg}/h_spglib_sym_red_restart.inp (100%) diff --git a/tests/DFTB/regtest-scc/TEST_FILES.toml b/tests/DFTB/regtest-scc/TEST_FILES.toml index 49ab294735..b0dce4e3cc 100644 --- a/tests/DFTB/regtest-scc/TEST_FILES.toml +++ b/tests/DFTB/regtest-scc/TEST_FILES.toml @@ -2,7 +2,7 @@ # the second field tells which test should be run in order to compare with the last available output # see regtest/TEST_FILES "ch2o-1.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.7625096274801404}] -"ch2o_tblite_mixer.inp" = [{matcher="E_total", tol=1.0E-09, ref=-5.75878702944325}] +"ch2o_tblite_mixer.inp" = [{matcher="E_total", tol=3.0E-08, ref=-5.75878702944325}] # not yet implemented # isolated system.. "ch2o-2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75087368892706}] diff --git a/tests/DFTB/regtest-scc/ch2o_tblite_mixer.inp b/tests/DFTB/regtest-scc/ch2o_tblite_mixer.inp index c934b03e11..dd911695b2 100644 --- a/tests/DFTB/regtest-scc/ch2o_tblite_mixer.inp +++ b/tests/DFTB/regtest-scc/ch2o_tblite_mixer.inp @@ -36,7 +36,7 @@ &END DFTB &END QS &SCF - EPS_SCF 1.0E-10 + EPS_SCF 1.0E-9 MAX_SCF 500 SCF_GUESS CORE &END SCF diff --git a/tests/QS/regtest-gpw-8/TEST_FILES.toml b/tests/QS/regtest-gpw-8/TEST_FILES.toml index b285d2fe6a..5506ca7fbc 100644 --- a/tests/QS/regtest-gpw-8/TEST_FILES.toml +++ b/tests/QS/regtest-gpw-8/TEST_FILES.toml @@ -7,7 +7,7 @@ "si8_broy_wc_crazy_ene.inp" = [{matcher="M023", tol=2e-06, ref=154.4040134571}] # block Davidson diagonalization "si8_broy_dav_t300.inp" = [{matcher="E_total", tol=6e-12, ref=-30.971242894115930}] -"si8_modified_broy_dav_t300.inp" = [{matcher="E_total", tol=6e-12, ref=-30.906865643982179}] +"si8_modified_broy_dav_t300.inp" = [{matcher="E_total", tol=6e-11, ref=-30.906865643982179}] "si8_broy_dav_t300_r.inp" = [{matcher="E_total", tol=1e-13, ref=-31.065361047969130}] "si8_broy_dav_t5000_r.inp" = [{matcher="E_total", tol=2e-10, ref=-31.158514641268031}] "si8_broy_dav_t300_lsd.inp" = [{matcher="E_total", tol=1e-13, ref=-30.973002070972000}] diff --git a/tests/QS/regtest-kp-1-spg/TEST_FILES.toml b/tests/QS/regtest-kp-1-spg/TEST_FILES.toml new file mode 100644 index 0000000000..9cb9dd2754 --- /dev/null +++ b/tests/QS/regtest-kp-1-spg/TEST_FILES.toml @@ -0,0 +1,22 @@ +# runs are executed in the same order as in this file +# the second field tells which test should be run in order to compare with the last available output +# e.g. 0 means do not compare anything, running is enough +# 1 compares the last total energy in the file +# for details see cp2k/tools/do_regtest +# +# spglib-dependent tests +"c_cell_opt_kpsym_guard.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=1}] +"c_debug_kpsym_default.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=4}] +"c_debug_kpsym_full.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=3}] +"c_geo_opt_kpsym_spglib.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=1}] +"c_spglib_backend_gamma_real_wfn.inp" = [{matcher="E_total", tol=1e-13, ref=-45.10384660417728}, + {matcher="N_special_kpoints", tol=0.0, ref=1}] +"h_spglib_sym_red.inp" = [{matcher="E_total", tol=1e-13, ref=-4.34916646889997}] +"h_spglib_sym_red_restart.inp" = [{matcher="E_total", tol=1e-8, ref=-4.34916647312477}] +"h_hex_c3_sym_red.inp" = [{matcher="E_total", tol=1e-8, ref=-9.17691856252346}, + {matcher="N_special_kpoints", tol=0.0, ref=9}] +"h_hex_c3_gamma_spglib.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41333967352940}, + {matcher="N_special_kpoints", tol=0.0, ref=8}] +"h_hex_c3_gamma_macdonald_spglib.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41375200649571}, + {matcher="N_special_kpoints", tol=0.0, ref=12}] +#EOF diff --git a/tests/QS/regtest-kp-1/c_cell_opt_kpsym_guard.inp b/tests/QS/regtest-kp-1-spg/c_cell_opt_kpsym_guard.inp similarity index 100% rename from tests/QS/regtest-kp-1/c_cell_opt_kpsym_guard.inp rename to tests/QS/regtest-kp-1-spg/c_cell_opt_kpsym_guard.inp diff --git a/tests/QS/regtest-kp-1/c_debug_kpsym_default.inp b/tests/QS/regtest-kp-1-spg/c_debug_kpsym_default.inp similarity index 100% rename from tests/QS/regtest-kp-1/c_debug_kpsym_default.inp rename to tests/QS/regtest-kp-1-spg/c_debug_kpsym_default.inp diff --git a/tests/QS/regtest-kp-1/c_debug_kpsym_full.inp b/tests/QS/regtest-kp-1-spg/c_debug_kpsym_full.inp similarity index 100% rename from tests/QS/regtest-kp-1/c_debug_kpsym_full.inp rename to tests/QS/regtest-kp-1-spg/c_debug_kpsym_full.inp diff --git a/tests/QS/regtest-kp-1/c_geo_opt_kpsym_spglib.inp b/tests/QS/regtest-kp-1-spg/c_geo_opt_kpsym_spglib.inp similarity index 98% rename from tests/QS/regtest-kp-1/c_geo_opt_kpsym_spglib.inp rename to tests/QS/regtest-kp-1-spg/c_geo_opt_kpsym_spglib.inp index 21ebf8aa04..de67fe0898 100644 --- a/tests/QS/regtest-kp-1/c_geo_opt_kpsym_spglib.inp +++ b/tests/QS/regtest-kp-1-spg/c_geo_opt_kpsym_spglib.inp @@ -35,6 +35,7 @@ METHOD GPW &END QS &SCF + CHOLESKY OFF EPS_SCF 1.0E-6 IGNORE_CONVERGENCE_FAILURE MAX_SCF 6 diff --git a/tests/QS/regtest-kp-1/c_spglib_backend_gamma_real_wfn.inp b/tests/QS/regtest-kp-1-spg/c_spglib_backend_gamma_real_wfn.inp similarity index 100% rename from tests/QS/regtest-kp-1/c_spglib_backend_gamma_real_wfn.inp rename to tests/QS/regtest-kp-1-spg/c_spglib_backend_gamma_real_wfn.inp diff --git a/tests/QS/regtest-kp-1/h_hex_c3_gamma_macdonald_spglib.inp b/tests/QS/regtest-kp-1-spg/h_hex_c3_gamma_macdonald_spglib.inp similarity index 100% rename from tests/QS/regtest-kp-1/h_hex_c3_gamma_macdonald_spglib.inp rename to tests/QS/regtest-kp-1-spg/h_hex_c3_gamma_macdonald_spglib.inp diff --git a/tests/QS/regtest-kp-1/h_hex_c3_gamma_spglib.inp b/tests/QS/regtest-kp-1-spg/h_hex_c3_gamma_spglib.inp similarity index 100% rename from tests/QS/regtest-kp-1/h_hex_c3_gamma_spglib.inp rename to tests/QS/regtest-kp-1-spg/h_hex_c3_gamma_spglib.inp diff --git a/tests/QS/regtest-kp-1/h_hex_c3_sym_red.inp b/tests/QS/regtest-kp-1-spg/h_hex_c3_sym_red.inp similarity index 100% rename from tests/QS/regtest-kp-1/h_hex_c3_sym_red.inp rename to tests/QS/regtest-kp-1-spg/h_hex_c3_sym_red.inp diff --git a/tests/QS/regtest-kp-1/h_spglib_sym_red.inp b/tests/QS/regtest-kp-1-spg/h_spglib_sym_red.inp similarity index 100% rename from tests/QS/regtest-kp-1/h_spglib_sym_red.inp rename to tests/QS/regtest-kp-1-spg/h_spglib_sym_red.inp diff --git a/tests/QS/regtest-kp-1/h_spglib_sym_red_restart.inp b/tests/QS/regtest-kp-1-spg/h_spglib_sym_red_restart.inp similarity index 100% rename from tests/QS/regtest-kp-1/h_spglib_sym_red_restart.inp rename to tests/QS/regtest-kp-1-spg/h_spglib_sym_red_restart.inp diff --git a/tests/QS/regtest-kp-1/TEST_FILES.toml b/tests/QS/regtest-kp-1/TEST_FILES.toml index 69b1d99d50..a2efa96434 100644 --- a/tests/QS/regtest-kp-1/TEST_FILES.toml +++ b/tests/QS/regtest-kp-1/TEST_FILES.toml @@ -11,36 +11,16 @@ "c_6.inp" = [{matcher="E_total", tol=3e-14, ref=-46.02680478900022}] "c_gapw.inp" = [{matcher="E_total", tol=2e-13, ref=-302.06260708591526}] "c_gapwxc.inp" = [{matcher="E_total", tol=1e-12, ref=-45.66746891467081}] -"c_cell_opt_kpsym_guard.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=1}] -"c_debug_kpsym_default.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=4}] -"c_debug_kpsym_full.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=3}] -"c_geo_opt_kpsym_spglib.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=1}] + "cn_1.inp" = [{matcher="E_total", tol=5e-12, ref=-49.26750298571628}] "c_dos.inp" = [{matcher="E_total", tol=2e-14, ref=-45.65703654036614}] "h_sym_red.inp" = [{matcher="E_total", tol=1e-13, ref=-4.34916646889997}] "h_sym_red_restart.inp" = [{matcher="E_total", tol=1e-8, ref=-4.34916647312477}] -"c_spglib_backend_gamma_real_wfn.inp" = [{matcher="E_total", tol=1e-13, ref=-45.10384660417728}, - {matcher="N_special_kpoints", tol=0.0, ref=1}] -"h_spglib_sym_red.inp" = [{matcher="E_total", tol=1e-13, ref=-4.34916646889997}] -"h_spglib_sym_red_restart.inp" = [{matcher="E_total", tol=1e-8, ref=-4.34916647312477}] + "h_inv_red.inp" = [{matcher="E_total", tol=1e-13, ref=-4.34916646889997}] "h_ortho_sym_red.inp" = [{matcher="E_total", tol=1e-8, ref=-2.73592238316042}] "h_mono_sym_red.inp" = [{matcher="E_total", tol=1e-10, ref=-3.15139711262736}] -"h_hex_c3_sym_red.inp" = [{matcher="E_total", tol=1e-8, ref=-9.17691856252346}, - {matcher="N_special_kpoints", tol=0.0, ref=9}] "h_hex_c3_gamma_k290.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41333967352938}, {matcher="N_special_kpoints", tol=0.0, ref=8}] -"h_hex_c3_gamma_spglib.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41333967352940}, - {matcher="N_special_kpoints", tol=0.0, ref=8}] -"h_hex_c3_gamma_macdonald_k290.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41375200649569}, - {matcher="N_special_kpoints", tol=0.0, ref=12}] -"h_hex_c3_gamma_macdonald_spglib.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41375200649571}, - {matcher="N_special_kpoints", tol=0.0, ref=12}] -"h_fcc_general_k290.inp" = [{matcher="E_total", tol=1e-13, ref=-4.34524388359535}, - {matcher="N_special_kpoints", tol=0.0, ref=1}] -"h_fcc_general_wannier90_k290.inp" = [{matcher="E_total", tol=1e-13, ref=-4.34524388359536}, - {matcher="N_special_kpoints", tol=0.0, ref=1}] -"h_fcc_wannier90_scf_mp.inp" = [{matcher="E_total", tol=1e-13, ref=-4.34524388359536}, - {matcher="N_special_kpoints", tol=0.0, ref=1}] "h_tetra_c4_sym_red.inp" = [{matcher="E_total", tol=1e-8, ref=-3.95113501866984}] #EOF diff --git a/tests/TEST_DIRS b/tests/TEST_DIRS index 2fddba2e1d..1442854b28 100644 --- a/tests/TEST_DIRS +++ b/tests/TEST_DIRS @@ -155,6 +155,7 @@ Fist/regtest-3 MC/regtest QS/regtest-gw libint !ifx QS/regtest-kp-1 libint !ifx +QS/regtest-kp-1-spg libint spglib !ifx QS/regtest-kp-1-spglib libint spglib !ifx QS/regtest-nmr-1 QS/regtest-nmr-4