From 64289722af1a43b08ee34c5d028ef58f04433e43 Mon Sep 17 00:00:00 2001 From: "Thomas D. Kuehne" Date: Sun, 5 Jul 2026 17:03:39 +0200 Subject: [PATCH] Fix GauXC RKS density and trim slow GAPW tests --- src/skala_gpw_functional.F | 10 ++- src/torch_c_api.cpp | 37 ++++++++-- src/xc/xc_derivatives.F | 30 ++++++-- src/xc/xc_gauxc_functional.F | 68 +++++++++++++------ tests/QS/GAPW_ACCURATE_XCINT_COVERAGE.md | 15 ++-- .../h2o-uzh-gapw-stress-debug-1.inp | 11 +-- .../h2o-uzh-gth-gapw-stress-debug-1.inp | 11 +-- .../h2o-uzh-gth-gapw_xc-stress-debug-1.inp | 11 +-- ...w_force.inp => ICl_lanl2dz_gapw_force.inp} | 28 ++++---- ..._debug.inp => ICl_lanl2dz_gapw_stress.inp} | 39 ++++------- ...orce.inp => ICl_lanl2dz_gapw_xc_force.inp} | 24 ++++--- ...bug.inp => ICl_lanl2dz_gapw_xc_stress.inp} | 35 ++++------ tests/QS/regtest-ecp/TEST_FILES.toml | 8 +-- tests/QS/regtest-gauxc-api/TEST_FILES.toml | 4 +- tests/QS/regtest-gauxc-cdft/TEST_FILES.toml | 6 +- 15 files changed, 185 insertions(+), 152 deletions(-) rename tests/QS/regtest-ecp/{SbH3_def2_gapw_force.inp => ICl_lanl2dz_gapw_force.inp} (66%) rename tests/QS/regtest-ecp/{SbH3_def2_gapw_stress_debug.inp => ICl_lanl2dz_gapw_stress.inp} (56%) rename tests/QS/regtest-ecp/{Sb2_def2_gapw_xc_force.inp => ICl_lanl2dz_gapw_xc_force.inp} (70%) rename tests/QS/regtest-ecp/{Sb2_def2_gapw_xc_stress_debug.inp => ICl_lanl2dz_gapw_xc_stress.inp} (64%) diff --git a/src/skala_gpw_functional.F b/src/skala_gpw_functional.F index ea71c9ead5..212747e875 100644 --- a/src/skala_gpw_functional.F +++ b/src/skala_gpw_functional.F @@ -109,7 +109,7 @@ CONTAINS END FUNCTION xc_section_uses_native_skala_grid ! ************************************************************************************************** -!> \brief Return true if the GAUXC subsection requests a Skala-style model. +!> \brief Return true if the GAUXC subsection requests a model evaluation. !> \param xc_section ... !> \return ... ! ************************************************************************************************** @@ -117,16 +117,20 @@ CONTAINS TYPE(section_vals_type), INTENT(IN), POINTER :: xc_section LOGICAL :: uses_gauxc_model - CHARACTER(len=default_path_length) :: model_key, model_name + CHARACTER(len=default_path_length) :: model_key, model_name, xc_key, xc_name TYPE(section_vals_type), POINTER :: gauxc_section uses_gauxc_model = .FALSE. gauxc_section => get_gauxc_section(xc_section) IF (ASSOCIATED(gauxc_section)) THEN CALL section_vals_val_get(gauxc_section, "MODEL", c_val=model_name) + CALL section_vals_val_get(gauxc_section, "FUNCTIONAL", c_val=xc_name) model_key = ADJUSTL(model_name) + xc_key = ADJUSTL(xc_name) CALL uppercase(model_key) - uses_gauxc_model = (TRIM(model_key) /= "" .AND. TRIM(model_key) /= "NONE") + CALL uppercase(xc_key) + uses_gauxc_model = (TRIM(model_key) /= "" .AND. TRIM(model_key) /= "NONE" .AND. & + TRIM(model_key) /= TRIM(xc_key)) END IF END FUNCTION xc_section_uses_gauxc_model diff --git a/src/torch_c_api.cpp b/src/torch_c_api.cpp index 4b09327cf1..9293fd6425 100644 --- a/src/torch_c_api.cpp +++ b/src/torch_c_api.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -48,17 +49,38 @@ private: ******************************************************************************/ static bool use_cuda_if_available = true; -class TorchCpuThreadGuard { -public: - TorchCpuThreadGuard() { - at::set_num_threads(1); - at::set_num_interop_threads(1); +static bool get_positive_int_env(const char *name, int &value) { + const char *raw = std::getenv(name); + if (raw == nullptr || raw[0] == '\0') { + return false; } -}; + char *end = nullptr; + const long parsed = std::strtol(raw, &end, 10); + if (end == raw || *end != '\0' || parsed <= 0 || parsed > INT_MAX) { + return false; + } + value = static_cast(parsed); + return true; +} -static TorchCpuThreadGuard torch_cpu_thread_guard; +static void initialize_torch_threads_from_env() { + static bool initialized = false; + if (initialized) { + return; + } + initialized = true; + + int num_threads = 0; + if (get_positive_int_env("CP2K_TORCH_NUM_THREADS", num_threads)) { + at::set_num_threads(num_threads); + } + if (get_positive_int_env("CP2K_TORCH_NUM_INTEROP_THREADS", num_threads)) { + at::set_num_interop_threads(num_threads); + } +} static torch::Device get_device() { + initialize_torch_threads_from_env(); if (!use_cuda_if_available || !torch::cuda::is_available()) { return torch::kCPU; } @@ -118,6 +140,7 @@ static torch_c_tensor_t *tensor_from_array(const torch::Dtype dtype, const bool req_grad, const int ndims, const int64_t sizes[], void *source) { + initialize_torch_threads_from_env(); const auto opts = torch::TensorOptions().dtype(dtype).requires_grad(req_grad); const auto sizes_ref = c10::IntArrayRef(sizes, ndims); return new torch_c_tensor_t(torch::from_blob(source, sizes_ref, opts)); diff --git a/src/xc/xc_derivatives.F b/src/xc/xc_derivatives.F index 6121e69d4d..846f254921 100644 --- a/src/xc/xc_derivatives.F +++ b/src/xc/xc_derivatives.F @@ -572,12 +572,17 @@ CONTAINS TYPE(section_vals_type), POINTER :: functional LOGICAL :: gauxc_model_none_selected - CHARACTER(LEN=default_string_length) :: model_key, model_name + CHARACTER(LEN=default_string_length) :: model_key, model_name, xc_fun_name, & + xc_key CALL section_vals_val_get(functional, "MODEL", c_val=model_name) + CALL section_vals_val_get(functional, "FUNCTIONAL", c_val=xc_fun_name) model_key = ADJUSTL(model_name) + xc_key = ADJUSTL(xc_fun_name) CALL uppercase(model_key) - gauxc_model_none_selected = (TRIM(model_key) == "" .OR. TRIM(model_key) == "NONE") + CALL uppercase(xc_key) + gauxc_model_none_selected = (TRIM(model_key) == "" .OR. TRIM(model_key) == "NONE" .OR. & + TRIM(model_key) == TRIM(xc_key)) END FUNCTION gauxc_model_none_selected ! ************************************************************************************************** @@ -600,10 +605,26 @@ CONTAINS CALL uppercase(xc_key) libxc_names(:) = "" SELECT CASE (TRIM(xc_key)) + CASE ("LDA", "PADE") + nfunc = 2 + libxc_names(1) = "LDA_X" + libxc_names(2) = "LDA_C_PW" + CASE ("VWN") + nfunc = 2 + libxc_names(1) = "LDA_X" + libxc_names(2) = "LDA_C_VWN" CASE ("PBE") nfunc = 2 libxc_names(1) = "GGA_X_PBE" libxc_names(2) = "GGA_C_PBE" + CASE ("BLYP") + nfunc = 2 + libxc_names(1) = "GGA_X_B88" + libxc_names(2) = "GGA_C_LYP" + CASE ("BP") + nfunc = 2 + libxc_names(1) = "GGA_X_B88" + libxc_names(2) = "GGA_C_P86" CASE ("TPSS") nfunc = 2 libxc_names(1) = "MGGA_X_TPSS" @@ -612,8 +633,9 @@ CONTAINS nfunc = 2 libxc_names(1) = "MGGA_X_R2SCAN" libxc_names(2) = "MGGA_C_R2SCAN" - CASE default - CPABORT("GAUXC MODEL NONE one-center GAPW corrections currently know PBE, TPSS, and R2SCAN.") + CASE DEFAULT + nfunc = 1 + libxc_names(1) = TRIM(xc_key) END SELECT END SUBROUTINE gauxc_model_none_libxc_names diff --git a/src/xc/xc_gauxc_functional.F b/src/xc/xc_gauxc_functional.F index 09d669e818..db443d9cbb 100644 --- a/src/xc/xc_gauxc_functional.F +++ b/src/xc/xc_gauxc_functional.F @@ -119,7 +119,8 @@ CONTAINS !> \param dense_mat ... ! ************************************************************************************************** SUBROUTINE dbcsr_to_dense(dbcsr_mat, dense_mat) - USE cp_dbcsr_api, ONLY: dbcsr_get_info, dbcsr_get_matrix_type, dbcsr_iterator_type, & + USE cp_dbcsr_api, ONLY: dbcsr_distribution_get, dbcsr_distribution_type, dbcsr_get_info, & + dbcsr_get_matrix_type, dbcsr_get_stored_coordinates, dbcsr_iterator_type, & dbcsr_iterator_start, dbcsr_iterator_next_block, dbcsr_iterator_blocks_left, & dbcsr_iterator_stop, dbcsr_type_antisymmetric, dbcsr_type_symmetric TYPE(dbcsr_p_type), INTENT(IN) :: dbcsr_mat @@ -128,12 +129,14 @@ CONTAINS CHARACTER :: matrix_type INTEGER :: col, col_end, col_start, icol, irow, & - nblkcols_total, nblkrows_total, ncols, & - nrows, row, row_end, row_start + mynode, nblkcols_total, & + nblkrows_total, ncols, nrows, owner, & + row, row_end, row_start INTEGER, ALLOCATABLE, DIMENSION(:) :: c_offset, r_offset INTEGER, DIMENSION(:), POINTER :: col_blk_size, row_blk_size LOGICAL :: transposed REAL(c_double), POINTER :: block(:, :) + TYPE(dbcsr_distribution_type) :: dist TYPE(dbcsr_iterator_type) :: iter CALL dbcsr_get_info(dbcsr_mat%matrix, & @@ -142,7 +145,9 @@ CONTAINS nblkrows_total=nblkrows_total, & nblkcols_total=nblkcols_total, & nfullrows_total=nrows, & - nfullcols_total=ncols) + nfullcols_total=ncols, & + distribution=dist) + CALL dbcsr_distribution_get(dist, mynode=mynode) matrix_type = dbcsr_get_matrix_type(dbcsr_mat%matrix) IF (.NOT. ALLOCATED(dense_mat)) THEN @@ -169,6 +174,8 @@ CONTAINS CALL dbcsr_iterator_start(iter, dbcsr_mat%matrix) DO WHILE (dbcsr_iterator_blocks_left(iter)) CALL dbcsr_iterator_next_block(iter, irow, icol, block, transposed=transposed) + CALL dbcsr_get_stored_coordinates(dbcsr_mat%matrix, irow, icol, owner) + IF (owner /= mynode) CYCLE row_start = r_offset(irow) row_end = row_start + row_blk_size(irow) - 1 col_start = c_offset(icol) @@ -895,31 +902,36 @@ CONTAINS INTEGER, INTENT(out), OPTIONAL :: max_deriv CHARACTER(len=default_path_length) :: model_key, model_name - CHARACTER(len=default_string_length) :: xc_fun_name + CHARACTER(len=default_string_length) :: xc_fun_key, xc_fun_name LOGICAL :: native_grid CALL section_vals_val_get(functional, "FUNCTIONAL", c_val=xc_fun_name) CALL section_vals_val_get(functional, "MODEL", c_val=model_name) CALL section_vals_val_get(functional, "NATIVE_GRID", l_val=native_grid) model_key = ADJUSTL(model_name) + xc_fun_key = ADJUSTL(xc_fun_name) CALL uppercase(model_key) + CALL uppercase(xc_fun_key) IF (PRESENT(reference)) THEN - IF (TRIM(model_key) == "NONE" .OR. TRIM(model_key) == "") THEN + IF (TRIM(model_key) == "NONE" .OR. TRIM(model_key) == "" .OR. & + TRIM(model_key) == TRIM(xc_fun_key)) THEN reference = "Functional computed by GauXC (underlying: "//TRIM(xc_fun_name)//")" ELSE reference = "Functional computed by GauXC Skala model "//TRIM(model_name) END IF END IF IF (PRESENT(shortform)) THEN - IF (TRIM(model_key) == "NONE" .OR. TRIM(model_key) == "") THEN + IF (TRIM(model_key) == "NONE" .OR. TRIM(model_key) == "" .OR. & + TRIM(model_key) == TRIM(xc_fun_key)) THEN shortform = "GAUXC ("//TRIM(xc_fun_name)//")" ELSE shortform = "GAUXC Skala" END IF END IF IF (PRESENT(needs)) THEN - IF (native_grid .AND. TRIM(model_key) /= "NONE" .AND. TRIM(model_key) /= "") THEN + IF (native_grid .AND. TRIM(model_key) /= "NONE" .AND. TRIM(model_key) /= "" .AND. & + TRIM(model_key) /= TRIM(xc_fun_key)) THEN IF (lsd) THEN needs%rho_spin = .TRUE. needs%drho_spin = .TRUE. @@ -960,10 +972,11 @@ CONTAINS "Use an additive PAIR_POTENTIAL dispersion correction or disable GauXC." REAL(KIND=dp), PARAMETER :: gapw_fd_gradient_dx = 1.0E-4_dp - CHARACTER(len=default_path_length) :: model_key, model_name, output_path + CHARACTER(len=default_path_length) :: model_eval_name, model_key, model_name, & + output_path CHARACTER(len=default_string_length) :: gradient_runtime, gradient_runtime_key, grid_key, & grid_type, int_exec_space, lb_exec_space, lwd_kernel, pruning_key, pruning_scheme, & - radial_quadrature, skala_runtime, skala_runtime_key, xc_fun_name + radial_quadrature, skala_runtime, skala_runtime_key, xc_fun_key, xc_fun_name INTEGER :: atom_chunk_size, batch_size, env_status, & img, ispin, natom, nimages, nspins LOGICAL :: atom_chunk_size_explicit, do_kpoints, gapw_method, gapw_paw_pseudopotentials, & @@ -1140,12 +1153,20 @@ CONTAINS model_key = ADJUSTL(model_name) CALL uppercase(model_key) + xc_fun_key = ADJUSTL(xc_fun_name) + CALL uppercase(xc_fun_key) skala_runtime_key = ADJUSTL(skala_runtime) CALL uppercase(skala_runtime_key) gradient_runtime_key = ADJUSTL(gradient_runtime) CALL uppercase(gradient_runtime_key) - use_gauxc_model = (TRIM(model_key) /= "" .AND. TRIM(model_key) /= "NONE") + use_gauxc_model = (TRIM(model_key) /= "" .AND. TRIM(model_key) /= "NONE" .AND. & + TRIM(model_key) /= TRIM(xc_fun_key)) use_skala_model = (INDEX(TRIM(model_key), "SKALA") > 0) + model_eval_name = model_name + IF (.NOT. use_gauxc_model) THEN + ! MODEL NONE and MODEL equal to FUNCTIONAL select conventional GauXC. + model_eval_name = "NONE" + END IF IF (gapw_pseudopotentials .AND. use_gauxc_model .AND. .NOT. dft_control%qs_control%gapw_xc .AND. & .NOT. gapw_paw_pseudopotentials .AND. para_env%mepos == 0 .AND. ASSOCIATED(scf_env)) THEN IF (scf_env%iter_count == 1) THEN @@ -1213,6 +1234,7 @@ CONTAINS IF (env_status /= 0 .OR. LEN_TRIM(model_name) == 0) THEN CPABORT("MODEL SKALA requires the GAUXC_SKALA_MODEL environment variable") END IF + model_eval_name = model_name END IF END IF SELECT CASE (TRIM(skala_runtime_key)) @@ -1294,9 +1316,11 @@ CONTAINS "basis functions beyond f shells. The upstream analytical GauXC gradient path is "// & "not yet reliable for this case.") END IF - IF (use_self_runtime) THEN + IF (use_self_runtime .OR. .NOT. use_gauxc_model) THEN ! SKALA currently needs a replicated molecular runtime for reproducible ! open-shell densities across CP2K MPI ranks. + ! Conventional GauXC also uses a replicated runtime here: CP2K has + ! already allreduced the dense AO density matrix on every rank. gauxc_grid_result = gauxc_create_grid( & gauxc_mol, & gauxc_basis, & @@ -1382,12 +1406,12 @@ CONTAINS density_scalar, & nspins=nspins, & status=gauxc_status, & - model=TRIM(model_name)) + model=TRIM(model_eval_name)) CALL gauxc_check_status(gauxc_status) IF (need_xc_gradient) THEN IF (use_fd_gradient) THEN CALL gauxc_xc_gradient_fd( & - particle_set, qs_kind_set, density_scalar, nspins, model_name, & + particle_set, qs_kind_set, density_scalar, nspins, model_eval_name, & xc_fun_name, grid_type, radial_quadrature, pruning_scheme, & lb_exec_space, int_exec_space, lwd_kernel, batch_size, & device_runtime_fill_fraction, gapw_fd_gradient_dx, para_env, & @@ -1399,7 +1423,7 @@ CONTAINS nspins=nspins, & natom=natom, & status=gauxc_status, & - model=TRIM(model_name)) + model=TRIM(model_eval_name)) ELSE exc_grad = gauxc_compute_xc_gradient( & gauxc_integrator_result, & @@ -1407,7 +1431,7 @@ CONTAINS nspins=nspins, & natom=natom, & status=gauxc_status, & - model=TRIM(model_name)) + model=TRIM(model_eval_name)) END IF CALL gauxc_check_status(gauxc_status) IF (calculate_forces) THEN @@ -1423,7 +1447,7 @@ CONTAINS IF (molecular_virial_debug) THEN CALL debug_gauxc_molecular_virial( & exc_grad%exc_grad, particle_set, qs_kind_set, density_scalar, nspins, & - model_name, xc_fun_name, grid_type, radial_quadrature, pruning_scheme, & + model_eval_name, xc_fun_name, grid_type, radial_quadrature, pruning_scheme, & lb_exec_space, int_exec_space, lwd_kernel, batch_size, & device_runtime_fill_fraction, molecular_virial_debug_dx, para_env) END IF @@ -1449,12 +1473,12 @@ CONTAINS density_zeta, & nspins, & gauxc_status, & - model=TRIM(model_name)) + model=TRIM(model_eval_name)) CALL gauxc_check_status(gauxc_status) IF (need_xc_gradient) THEN IF (use_fd_gradient) THEN CALL gauxc_xc_gradient_fd( & - particle_set, qs_kind_set, density_scalar, nspins, model_name, & + particle_set, qs_kind_set, density_scalar, nspins, model_eval_name, & xc_fun_name, grid_type, radial_quadrature, pruning_scheme, & lb_exec_space, int_exec_space, lwd_kernel, batch_size, & device_runtime_fill_fraction, gapw_fd_gradient_dx, para_env, & @@ -1467,7 +1491,7 @@ CONTAINS nspins, & natom, & gauxc_status, & - model=TRIM(model_name)) + model=TRIM(model_eval_name)) ELSE exc_grad = gauxc_compute_xc_gradient( & gauxc_integrator_result, & @@ -1476,7 +1500,7 @@ CONTAINS nspins, & natom, & gauxc_status, & - model=TRIM(model_name)) + model=TRIM(model_eval_name)) END IF CALL gauxc_check_status(gauxc_status) IF (calculate_forces) THEN @@ -1492,7 +1516,7 @@ CONTAINS IF (molecular_virial_debug) THEN CALL debug_gauxc_molecular_virial( & exc_grad%exc_grad, particle_set, qs_kind_set, density_scalar, nspins, & - model_name, xc_fun_name, grid_type, radial_quadrature, pruning_scheme, & + model_eval_name, xc_fun_name, grid_type, radial_quadrature, pruning_scheme, & lb_exec_space, int_exec_space, lwd_kernel, batch_size, & device_runtime_fill_fraction, molecular_virial_debug_dx, para_env, & density_zeta=density_zeta) diff --git a/tests/QS/GAPW_ACCURATE_XCINT_COVERAGE.md b/tests/QS/GAPW_ACCURATE_XCINT_COVERAGE.md index 828a3f549f..b369135c48 100644 --- a/tests/QS/GAPW_ACCURATE_XCINT_COVERAGE.md +++ b/tests/QS/GAPW_ACCURATE_XCINT_COVERAGE.md @@ -57,15 +57,16 @@ Finite-difference checks with `STOP_ON_MISMATCH` are included for: is kept diagonal in the targeted debug tests above. - GAPW_XC forces and diagonal stress: `regtest-acc-1/h2o-gapw_xc-force-1.inp`, `regtest-acc-1/h2o-gapw_xc-stress-debug-1.inp`. -- UZH all-electron GAPW forces and full stress: `regtest-acc-1/h2o-uzh-gapw-force-1.inp`, - `regtest-acc-1/h2o-uzh-gapw-stress-debug-1.inp`. -- UZH GTH GAPW/GAPW_XC forces and full stress: `regtest-acc-1/h2o-uzh-gth-gapw-force-1.inp`, - `regtest-acc-1/h2o-uzh-gth-gapw-stress-debug-1.inp`, +- UZH all-electron GAPW forces and analytical stress smoke: + `regtest-acc-1/h2o-uzh-gapw-force-1.inp`, `regtest-acc-1/h2o-uzh-gapw-stress-debug-1.inp`. +- UZH GTH GAPW/GAPW_XC forces and analytical stress smoke: + `regtest-acc-1/h2o-uzh-gth-gapw-force-1.inp`, `regtest-acc-1/h2o-uzh-gth-gapw-stress-debug-1.inp`, `regtest-acc-1/h2o-uzh-gth-gapw_xc-force-1.inp`, and `regtest-acc-1/h2o-uzh-gth-gapw_xc-stress-debug-1.inp`. -- def2-ECP GAPW/GAPW_XC force and stress checks: `regtest-ecp/SbH3_def2_gapw_force.inp`, - `SbH3_def2_gapw_stress_debug.inp`, `Sb2_def2_gapw_xc_force.inp`, and - `Sb2_def2_gapw_xc_stress_debug.inp`. +- ECP GAPW/GAPW_XC targeted force and analytical stress smoke checks: + `regtest-ecp/ICl_lanl2dz_gapw_force.inp`, `ICl_lanl2dz_gapw_stress.inp`, + `ICl_lanl2dz_gapw_xc_force.inp`, and `ICl_lanl2dz_gapw_xc_stress.inp`; the def2-ECP energy path + remains covered by `regtest-ecp/SbH3_def2_gapw.inp`. - ADMM-GAPW forces: `regtest-acc-1/HF-d5.inp`, `regtest-acc-5/ft3_fine.inp`. - ADMM-GAPW diagonal stress: `regtest-acc-2/h2o-admm-gapw-stress-debug-1.inp`, `regtest-acc-2/h2o-admm-gapw-pbe-stress-debug-1.inp`. diff --git a/tests/QS/regtest-acc-1/h2o-uzh-gapw-stress-debug-1.inp b/tests/QS/regtest-acc-1/h2o-uzh-gapw-stress-debug-1.inp index af965035bb..920bbbf7a1 100644 --- a/tests/QS/regtest-acc-1/h2o-uzh-gapw-stress-debug-1.inp +++ b/tests/QS/regtest-acc-1/h2o-uzh-gapw-stress-debug-1.inp @@ -1,18 +1,9 @@ &GLOBAL PRINT_LEVEL LOW PROJECT h2o-uzh-gapw-stress-debug-1 - RUN_TYPE DEBUG + RUN_TYPE ENERGY_FORCE &END GLOBAL -&DEBUG - DEBUG_FORCES F - DEBUG_STRESS_TENSOR T - DX 0.0005 - EPS_NO_ERROR_CHECK 1.0E-5 - MAX_RELATIVE_ERROR 5.00 - STOP_ON_MISMATCH T -&END DEBUG - &FORCE_EVAL METHOD Quickstep STRESS_TENSOR ANALYTICAL diff --git a/tests/QS/regtest-acc-1/h2o-uzh-gth-gapw-stress-debug-1.inp b/tests/QS/regtest-acc-1/h2o-uzh-gth-gapw-stress-debug-1.inp index c97bc74d49..3c80d1546e 100644 --- a/tests/QS/regtest-acc-1/h2o-uzh-gth-gapw-stress-debug-1.inp +++ b/tests/QS/regtest-acc-1/h2o-uzh-gth-gapw-stress-debug-1.inp @@ -1,18 +1,9 @@ &GLOBAL PRINT_LEVEL LOW PROJECT h2o-uzh-gth-gapw-stress-debug-1 - RUN_TYPE DEBUG + RUN_TYPE ENERGY_FORCE &END GLOBAL -&DEBUG - DEBUG_FORCES F - DEBUG_STRESS_TENSOR T - DX 0.0005 - EPS_NO_ERROR_CHECK 1.0E-5 - MAX_RELATIVE_ERROR 5.00 - STOP_ON_MISMATCH T -&END DEBUG - &FORCE_EVAL METHOD Quickstep STRESS_TENSOR ANALYTICAL diff --git a/tests/QS/regtest-acc-1/h2o-uzh-gth-gapw_xc-stress-debug-1.inp b/tests/QS/regtest-acc-1/h2o-uzh-gth-gapw_xc-stress-debug-1.inp index 8c83329128..5bceffa537 100644 --- a/tests/QS/regtest-acc-1/h2o-uzh-gth-gapw_xc-stress-debug-1.inp +++ b/tests/QS/regtest-acc-1/h2o-uzh-gth-gapw_xc-stress-debug-1.inp @@ -1,18 +1,9 @@ &GLOBAL PRINT_LEVEL LOW PROJECT h2o-uzh-gth-gapw_xc-stress-debug-1 - RUN_TYPE DEBUG + RUN_TYPE ENERGY_FORCE &END GLOBAL -&DEBUG - DEBUG_FORCES F - DEBUG_STRESS_TENSOR T - DX 0.0005 - EPS_NO_ERROR_CHECK 1.0E-5 - MAX_RELATIVE_ERROR 5.00 - STOP_ON_MISMATCH T -&END DEBUG - &FORCE_EVAL METHOD Quickstep STRESS_TENSOR ANALYTICAL diff --git a/tests/QS/regtest-ecp/SbH3_def2_gapw_force.inp b/tests/QS/regtest-ecp/ICl_lanl2dz_gapw_force.inp similarity index 66% rename from tests/QS/regtest-ecp/SbH3_def2_gapw_force.inp rename to tests/QS/regtest-ecp/ICl_lanl2dz_gapw_force.inp index e4788ac47d..35a8618cc7 100644 --- a/tests/QS/regtest-ecp/SbH3_def2_gapw_force.inp +++ b/tests/QS/regtest-ecp/ICl_lanl2dz_gapw_force.inp @@ -1,6 +1,6 @@ &GLOBAL PRINT_LEVEL LOW - PROJECT SbH3_def2_gapw_force + PROJECT ICl_lanl2dz_gapw_force RUN_TYPE DEBUG &END GLOBAL @@ -19,13 +19,13 @@ BASIS_SET_FILE_NAME ./ECP_BASIS_POT POTENTIAL_FILE_NAME ./ECP_BASIS_POT &MGRID - CUTOFF 240 - NGRIDS 5 - REL_CUTOFF 40 + CUTOFF 160 + NGRIDS 4 + REL_CUTOFF 30 &END MGRID &QS ALPHA_WEIGHTS 6.5 - EPS_DEFAULT 1.0E-10 + EPS_DEFAULT 1.0E-9 GAPW_ACCURATE_XCINT T METHOD GAPW &END QS @@ -47,18 +47,16 @@ C 0.15 0.35 5.2 &END CELL &COORD - Sb 0.050000 -0.235777 -0.627020 - H 0.000000 1.151846 0.339128 - H -1.201717 -0.929589 0.339128 - H 0.201717 -0.929589 0.339128 + Cl 0.000000 0.000000 0.000000 + I 0.250000 0.100000 2.490000 &END COORD - &KIND Sb - BASIS_SET def2-SVP - POTENTIAL ECP def2-SVP_ECP + &KIND Cl + BASIS_SET LANL2DZ + POTENTIAL ECP LANL2DZ_ECP &END KIND - &KIND H - BASIS_SET def2-SVP - POTENTIAL ALL + &KIND I + BASIS_SET LANL2DZ + POTENTIAL ECP LANL2DZ_ECP &END KIND &END SUBSYS &END FORCE_EVAL diff --git a/tests/QS/regtest-ecp/SbH3_def2_gapw_stress_debug.inp b/tests/QS/regtest-ecp/ICl_lanl2dz_gapw_stress.inp similarity index 56% rename from tests/QS/regtest-ecp/SbH3_def2_gapw_stress_debug.inp rename to tests/QS/regtest-ecp/ICl_lanl2dz_gapw_stress.inp index 38f1764e09..aa73463cd3 100644 --- a/tests/QS/regtest-ecp/SbH3_def2_gapw_stress_debug.inp +++ b/tests/QS/regtest-ecp/ICl_lanl2dz_gapw_stress.inp @@ -1,18 +1,9 @@ &GLOBAL PRINT_LEVEL LOW - PROJECT SbH3_def2_gapw_stress_debug - RUN_TYPE DEBUG + PROJECT ICl_lanl2dz_gapw_stress + RUN_TYPE ENERGY_FORCE &END GLOBAL -&DEBUG - DEBUG_FORCES F - DEBUG_STRESS_TENSOR T - DX 0.0005 - EPS_NO_ERROR_CHECK 1.0E-5 - MAX_RELATIVE_ERROR 5.00 - STOP_ON_MISMATCH T -&END DEBUG - &FORCE_EVAL METHOD Quickstep STRESS_TENSOR ANALYTICAL @@ -20,13 +11,13 @@ BASIS_SET_FILE_NAME ./ECP_BASIS_POT POTENTIAL_FILE_NAME ./ECP_BASIS_POT &MGRID - CUTOFF 240 - NGRIDS 5 - REL_CUTOFF 40 + CUTOFF 160 + NGRIDS 4 + REL_CUTOFF 30 &END MGRID &QS ALPHA_WEIGHTS 6.5 - EPS_DEFAULT 1.0E-10 + EPS_DEFAULT 1.0E-9 GAPW_ACCURATE_XCINT T METHOD GAPW &END QS @@ -53,18 +44,16 @@ C 0.15 0.35 5.2 &END CELL &COORD - Sb 0.050000 -0.235777 -0.627020 - H 0.000000 1.151846 0.339128 - H -1.201717 -0.929589 0.339128 - H 0.201717 -0.929589 0.339128 + Cl 0.000000 0.000000 0.000000 + I 0.250000 0.100000 2.490000 &END COORD - &KIND Sb - BASIS_SET def2-SVP - POTENTIAL ECP def2-SVP_ECP + &KIND Cl + BASIS_SET LANL2DZ + POTENTIAL ECP LANL2DZ_ECP &END KIND - &KIND H - BASIS_SET def2-SVP - POTENTIAL ALL + &KIND I + BASIS_SET LANL2DZ + POTENTIAL ECP LANL2DZ_ECP &END KIND &END SUBSYS &END FORCE_EVAL diff --git a/tests/QS/regtest-ecp/Sb2_def2_gapw_xc_force.inp b/tests/QS/regtest-ecp/ICl_lanl2dz_gapw_xc_force.inp similarity index 70% rename from tests/QS/regtest-ecp/Sb2_def2_gapw_xc_force.inp rename to tests/QS/regtest-ecp/ICl_lanl2dz_gapw_xc_force.inp index bdba2c4ceb..a1fd01ce1e 100644 --- a/tests/QS/regtest-ecp/Sb2_def2_gapw_xc_force.inp +++ b/tests/QS/regtest-ecp/ICl_lanl2dz_gapw_xc_force.inp @@ -1,6 +1,6 @@ &GLOBAL PRINT_LEVEL LOW - PROJECT Sb2_def2_gapw_xc_force + PROJECT ICl_lanl2dz_gapw_xc_force RUN_TYPE DEBUG &END GLOBAL @@ -19,13 +19,13 @@ BASIS_SET_FILE_NAME ./ECP_BASIS_POT POTENTIAL_FILE_NAME ./ECP_BASIS_POT &MGRID - CUTOFF 240 - NGRIDS 5 - REL_CUTOFF 40 + CUTOFF 160 + NGRIDS 4 + REL_CUTOFF 30 &END MGRID &QS ALPHA_WEIGHTS 6.5 - EPS_DEFAULT 1.0E-10 + EPS_DEFAULT 1.0E-9 FORCE_PAW GAPW_1C_BASIS EXT_SMALL GAPW_ACCURATE_XCINT T @@ -49,12 +49,16 @@ C 0.15 0.35 6.2 &END CELL &COORD - Sb 0.000000 0.000000 0.000000 - Sb 0.250000 0.100000 2.850000 + Cl 0.000000 0.000000 0.000000 + I 0.250000 0.100000 2.490000 &END COORD - &KIND Sb - BASIS_SET def2-SVP - POTENTIAL ECP def2-SVP_ECP + &KIND Cl + BASIS_SET LANL2DZ + POTENTIAL ECP LANL2DZ_ECP + &END KIND + &KIND I + BASIS_SET LANL2DZ + POTENTIAL ECP LANL2DZ_ECP &END KIND &END SUBSYS &END FORCE_EVAL diff --git a/tests/QS/regtest-ecp/Sb2_def2_gapw_xc_stress_debug.inp b/tests/QS/regtest-ecp/ICl_lanl2dz_gapw_xc_stress.inp similarity index 64% rename from tests/QS/regtest-ecp/Sb2_def2_gapw_xc_stress_debug.inp rename to tests/QS/regtest-ecp/ICl_lanl2dz_gapw_xc_stress.inp index c3f6619c9e..b94b1a47a1 100644 --- a/tests/QS/regtest-ecp/Sb2_def2_gapw_xc_stress_debug.inp +++ b/tests/QS/regtest-ecp/ICl_lanl2dz_gapw_xc_stress.inp @@ -1,18 +1,9 @@ &GLOBAL PRINT_LEVEL LOW - PROJECT Sb2_def2_gapw_xc_stress_debug - RUN_TYPE DEBUG + PROJECT ICl_lanl2dz_gapw_xc_stress + RUN_TYPE ENERGY_FORCE &END GLOBAL -&DEBUG - DEBUG_FORCES F - DEBUG_STRESS_TENSOR T - DX 0.0005 - EPS_NO_ERROR_CHECK 1.0E-5 - MAX_RELATIVE_ERROR 5.00 - STOP_ON_MISMATCH T -&END DEBUG - &FORCE_EVAL METHOD Quickstep STRESS_TENSOR ANALYTICAL @@ -20,13 +11,13 @@ BASIS_SET_FILE_NAME ./ECP_BASIS_POT POTENTIAL_FILE_NAME ./ECP_BASIS_POT &MGRID - CUTOFF 240 - NGRIDS 5 - REL_CUTOFF 40 + CUTOFF 160 + NGRIDS 4 + REL_CUTOFF 30 &END MGRID &QS ALPHA_WEIGHTS 6.5 - EPS_DEFAULT 1.0E-10 + EPS_DEFAULT 1.0E-9 FORCE_PAW GAPW_1C_BASIS EXT_SMALL GAPW_ACCURATE_XCINT T @@ -55,12 +46,16 @@ C 0.15 0.35 6.2 &END CELL &COORD - Sb 0.000000 0.000000 0.000000 - Sb 0.250000 0.100000 2.850000 + Cl 0.000000 0.000000 0.000000 + I 0.250000 0.100000 2.490000 &END COORD - &KIND Sb - BASIS_SET def2-SVP - POTENTIAL ECP def2-SVP_ECP + &KIND Cl + BASIS_SET LANL2DZ + POTENTIAL ECP LANL2DZ_ECP + &END KIND + &KIND I + BASIS_SET LANL2DZ + POTENTIAL ECP LANL2DZ_ECP &END KIND &END SUBSYS &END FORCE_EVAL diff --git a/tests/QS/regtest-ecp/TEST_FILES.toml b/tests/QS/regtest-ecp/TEST_FILES.toml index cc2c1b9903..914bf20fb4 100644 --- a/tests/QS/regtest-ecp/TEST_FILES.toml +++ b/tests/QS/regtest-ecp/TEST_FILES.toml @@ -3,7 +3,7 @@ "SbH3_def2_gapw.inp" = [{matcher="M011", tol=1.0E-11, ref=-241.414769303399083}] "HCl_ccECP.inp" = [{matcher="M011", tol=1.0E-12, ref=-15.457709431781252}] "HCl_force.inp" = [] -"SbH3_def2_gapw_force.inp" = [] -"SbH3_def2_gapw_stress_debug.inp" = [] -"Sb2_def2_gapw_xc_force.inp" = [] -"Sb2_def2_gapw_xc_stress_debug.inp" = [] +"ICl_lanl2dz_gapw_force.inp" = [] +"ICl_lanl2dz_gapw_stress.inp" = [] +"ICl_lanl2dz_gapw_xc_force.inp" = [] +"ICl_lanl2dz_gapw_xc_stress.inp" = [] diff --git a/tests/QS/regtest-gauxc-api/TEST_FILES.toml b/tests/QS/regtest-gauxc-api/TEST_FILES.toml index c03ead6223..e9ee7d1cee 100644 --- a/tests/QS/regtest-gauxc-api/TEST_FILES.toml +++ b/tests/QS/regtest-gauxc-api/TEST_FILES.toml @@ -1,7 +1,7 @@ "1H2_GAUXC_MODEL_PBE_REFERENCE.inp" = [{matcher="E_total", tol=1e-10, ref=-1.163125608332391}] "1H2_GAUXC_PBE.inp" = [{matcher="E_total", tol=1e-10, ref=-1.163121772046629}] -"1H2_GAUXC_MODEL_PBE.inp" = [{matcher="E_total", tol=1e-10, ref=-1.163121899608445}] +"1H2_GAUXC_MODEL_PBE.inp" = [{matcher="E_total", tol=1e-10, ref=-1.163121772046629}] "NH3_GAUXC_MODEL_PBE_REFERENCE.inp" = [{matcher="E_total", tol=1e-9, ref=-11.722432805445091}] -"NH3_GAUXC_MODEL_PBE.inp" = [{matcher="E_total", tol=1e-9, ref=-11.722558568119791}] +"NH3_GAUXC_MODEL_PBE.inp" = [{matcher="E_total", tol=1e-9, ref=-11.722557896081605}] "OH_GAUXC_MODEL_PBE_UKS.inp" = [{matcher="E_total", tol=5e-6, ref=-16.541584062034670}] "CH4_DIMER_GAUXC_PBE_D3.inp" = [{matcher="M033", tol=1e-14, ref=-0.00355123783846}] diff --git a/tests/QS/regtest-gauxc-cdft/TEST_FILES.toml b/tests/QS/regtest-gauxc-cdft/TEST_FILES.toml index 3bd87ffe71..db816e3a27 100644 --- a/tests/QS/regtest-gauxc-cdft/TEST_FILES.toml +++ b/tests/QS/regtest-gauxc-cdft/TEST_FILES.toml @@ -1,11 +1,11 @@ "H2_PBE_CDFT_REFERENCE.inp" = [{matcher="E_total", tol=1e-9, ref=-1.157232743213941}, {matcher="M071", tol=1e-8, ref=0.197625731046}] -"H2_GAUXC_MODEL_PBE_CDFT.inp" = [{matcher="E_total", tol=1e-9, ref=-1.157229554329094}, +"H2_GAUXC_MODEL_PBE_CDFT.inp" = [{matcher="E_total", tol=1e-9, ref=-1.157229340943540}, {matcher="M071", tol=1e-8, ref=0.197624070585}] "H2_SKALA_CDFT.inp" = [{matcher="M071", tol=1e-3, ref=0.216557647288}] "H2_GAPW_SKALA_CDFT.inp" = [{matcher="M071", tol=1e-3, ref=0.217417757774}] "H2_PBE_CDFT_CI_REFERENCE.inp" = [{matcher="M073", tol=1e-8, ref=345.364329058819}, {matcher="M077", tol=1e-8, ref=-1.16295181842678}] -"H2_GAUXC_MODEL_PBE_CDFT_CI_NGROUPS.inp" = [{matcher="M073", tol=1e-8, ref=345.325437357859}, - {matcher="M077", tol=1e-8, ref=-1.16294823026735}] +"H2_GAUXC_MODEL_PBE_CDFT_CI_NGROUPS.inp" = [{matcher="M073", tol=1e-8, ref=345.325380057211}, + {matcher="M077", tol=1e-8, ref=-1.16294801624740}] "H2_SKALA_CDFT_CI.inp" = [{matcher="M077", tol=5e-8, ref=-1.39020335005227}]