mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-21 06:25:15 -04:00
Fix TB gradients, virials, and k-point symmetry
# Fix TB gradients, virials, tblite reference checks, and k-point symmetry
## Summary
This PR continues the CP2K/tblite interface work originally started by Johann Pototschnig
(`jpoto`) and relies in part on Sebastian Ehlert's `tblite` library. It makes the CP2K tight
binding paths substantially more consistent for nuclear gradients, virials/stress tensors, and
k-point symmetry, especially for DFTB, CP2K-native GFN0/GFN1, and `&XTB &TBLITE` GFN1/GFN2/IPEA1.
Main changes:
- fix several CP2K/tblite force and virial terms for periodic systems,
- add a native `tblite` CLI reference path under `&XTB &TBLITE &REFERENCE_CLI`,
- enable and test k-point symmetry reduction for CP2K-native TB and CP2K/tblite TB paths,
- improve DFTB SCC/Ewald virials and update affected DFTB references,
- add/extend regtests for molecular and truly periodic systems, including force/stress DEBUG checks,
- update the CP2K toolchain patches for `tblite`/embedded DFTD4 and standalone DFTD4.
## User-visible input changes
- `&DFT &XTB` can now select the library implementation via
`GFN_TYPE TBLITE`; in that case an `&XTB &TBLITE` section is required.
- `&XTB &TBLITE` supports `METHOD GFN1`, `METHOD GFN2`, and `METHOD IPEA1`.
- `&XTB &TBLITE` has an optional `REFERENCE_CLI` keyword and a lone
`&REFERENCE_CLI` subsection. If present/enabled, CP2K writes a `.gen` geometry, runs native
`tblite run --grad`, and compares energy, gradient, and virial.
- `SCC_MIXER TBLITE` is documented as a modified Broyden mixer; the associated controls are named
`TBLITE_MIXER_DAMPING` and `TBLITE_MIXER_MAX_SCF`.
- `DO_EWALD` remains available as a deprecated/debug override; the manual now documents the required
periodic `POISSON` setup for CP2K-native DFTB/xTB and the `TBLITE` exception.
- CP2K warns if `CELL%PERIODIC` and `POISSON%PERIODIC` differ, but still runs.
## What was fixed
### CP2K/tblite GFN1/GFN2/IPEA1
- Periodic image-cell matrix construction now fills all image cells instead of only image cell 1.
- H0, overlap/potential, GFN2 multipole, CN-chain-rule, and D4-related virial paths were checked
term by term against finite differences.
- Periodic self-image virial signs/factors were corrected in the CP2K/tblite interface.
- The previously bad strongly distorted Si8/GFN2 Gamma stress case was traced to a hard D4 two-body
cutoff discontinuity and fixed by adding a smooth switching region in the D4 path.
- `RUN_TYPE DEBUG` force/stress checks now behave consistently for molecular and periodic
CP2K/tblite GFN1/GFN2 cases; isolated stress is allowed for tblite with a warning because it is a
diagnostic virial, not a physical isolated-system stress.
### Native tblite CLI reference
The `REFERENCE_CLI` path initially showed good molecular agreement but poor periodic virials for
Ar-fcc:
- GFN1 periodic virial diff was about `1.15e-2`,
- GFN2 periodic virial diff was about `2.95e-2`.
The parser, units, row order, and sign convention were checked and were correct. The remaining error
was in native `tblite`: periodic H0 self-image pairs (`iat == jat`, non-zero translation) used the
normal pair sigma factor `0.5`. The correct symmetrized cell-derivative factor for these self-image
pairs is `0.25`.
Updated `REFERENCE_CLI` comparison after the native tblite H0 sigma fix:
| Case | SCF | Energy diff | Gradient diff sum/max | Virial diff sum/max |
| --- | ---: | ---: | ---: | ---: |
| CH2O/GFN1, molecular | 12 | `6.775398020409e-10` | `3.296429618975e-08` / `1.577689361792e-08` | `2.884140131919e-08` / `2.625531908551e-08` |
| CH2O/GFN2, molecular | 15 | `6.651852402229e-10` | `1.437665769393e-07` / `6.050656990025e-08` | `1.240845506761e-07` / `8.358997352631e-08` |
| Ar-fcc/GFN1, periodic | 7 | `3.595097552989e-09` | `1.125627343711e-09` / `3.688615600028e-10` | `5.441065574157e-09` / `1.653417298474e-09` |
| Ar-fcc/GFN2, periodic | 20 | `8.975906240494e-09` | `2.140900031075e-08` / `4.424293700931e-09` | `3.094086449720e-07` / `8.057020835922e-08` |
`REFERENCE_CLI` is intentionally skipped/guarded for CP2K multi-k-point runs: native `tblite` CLI is
a useful Gamma reference, but it is not a CP2K-equivalent k-point/symmetry implementation.
### DFTB and CP2K-native xTB/GFN0/GFN1
- DFTB SCC/Ewald background handling was fixed so the homogeneous background contributes to energy
and atomic properties without entering the SCC overlap virial as a constant potential shift.
- The TB real-space Ewald self-image virial prefactor was fixed.
- CP2K-native DFTB/GFN0/GFN1 k-point symmetry support was extended and tested with the CP2K atomic
backend and SPGLIB backend.
- Full atomic k-point symmetry is used for high-symmetry production geometries; for displaced DEBUG
geometries the reduced symmetry is recomputed instead of reusing an invalid high-symmetry map.
- DFTB3 forces, Gamma stress, k-point forces, and k-point stress were tested and covered by new
regtests.
## What was tried
The debugging was deliberately systematic rather than a single-code-path patch:
- molecular and truly periodic crystals were checked separately; large vacuum cells were not used as
periodic substitutes,
- GFN1 and GFN2 were tested with tight `EPS_DEFAULT`/`EPS_SCF`, DX scans, and high `MAX_SCF`,
- CP2K/tblite results were compared to native `tblite` CLI for energy, gradient, and virial,
- H0, overlap/potential, Coulomb/multipole, CN-chain-rule, D4, D3/s-D3, DFTD4 and SCC/Ewald pieces
were isolated where practical and checked against finite differences,
- CP2K-native DFTB, DFTB3, GFN0, GFN1, CP2K/tblite GFN1/GFN2/IPEA1, and native `tblite` CLI were
tested separately,
- k-point full grids, CP2K atomic symmetry, SPGLIB symmetry, displaced atoms, skew cells, and
MPI-rank reproducibility were checked,
- 1D/2D periodicity, charged systems, and open-shell/spin behavior were probed.
What helped:
- restoring periodic H0/CN self-image contributions,
- fixing self-image virial signs/factors,
- fixing the native tblite H0 self-image sigma factor,
- fixing the DFTB SCC/Ewald background gauge contribution,
- recomputing k-point symmetry for lowered-symmetry DEBUG geometries,
- smoothing the hard D4 two-body cutoff in the stress-sensitive GFN2/Si8 case,
- updating the external library toolchain patches and DFTB reference values.
What did not help or was not the root cause:
- simply tightening `EPS_SCF`, `EPS_DEFAULT`, `DX`, or `MAX_SCF`,
- changing only SCC damping/mixer parameters for the hard GFN2 stress cases,
- treating the native `tblite` CLI periodic virial as authoritative before fixing its own H0 sigma
self-image term,
- using large vacuum boxes as stand-ins for true periodic crystals,
- assuming all heteronuclear crystals are good regtests: several are dominated by overlap
conditioning/SCF-state sensitivity rather than a clean force/stress bug.
## What works now
- CP2K/tblite GFN1/GFN2 molecular force DEBUG checks are at `~1e-8`.
- CP2K/tblite GFN2 isolated diagnostic stress is `~4e-9`.
- CP2K/tblite GFN1/GFN2 Ar-fcc k-point force/stress DEBUG runs with `64 -> 4` k-point reduction.
- CP2K/tblite GFN2 `PERIODIC XZ` Ar-layer k-point stress DEBUG is reduced from the reproduced `5.83e-4` remainder to `2.66e-5`; forces are `2.29e-6`.
- CP2K/tblite GFN1/GFN2 skew/asym Si8 Gamma stress is now in the `~1e-6` range rather than
`~1e-3`.
- CP2K/tblite IPEA1 runs with k-point reduction and force/stress DEBUG coverage.
- CP2K-native DFTB non-SCC/SCC and GFN0/GFN1 k-point symmetry paths pass the new tests.
- DFTB3 force, Gamma stress, k-point force, and k-point stress tests pass.
- DFTD4/DFTD3/D3(BJ) CP2K tests pass with the updated build; external DFTD4/tblite patches are ready
for the toolchain.
Representative final regtest values:
| Path | Representative result |
| --- | ---: |
| CP2K/tblite GFN2 CH2O force DEBUG | `M042 = 1e-8` |
| CP2K/tblite GFN2 CH2O isolated stress DEBUG | `M042 = 4.067e-9` |
| CP2K/tblite GFN2 Si8 Gamma stress DEBUG | `M042 = 4.76966e-7` |
| CP2K/tblite GFN2 Ar-fcc k-point stress DEBUG | `M042 = 3.33e-7`, `N_special_kpoints = 4` |
| CP2K/tblite GFN2 Ar-layer XZ k-point stress DEBUG | `M042 = 2.66e-5`, `N_special_kpoints = 2` |
| CP2K/tblite GFN1 Ar-fcc k-point stress DEBUG | `M042 = 1.6417e-8`, `N_special_kpoints = 4` |
| CP2K/tblite IPEA1 Ar-fcc k-point stress DEBUG | `M042 = 2.4656e-8`, `N_special_kpoints = 4` |
| CP2K-native GFN0 Si k-point symmetry | `N_special_kpoints = 4`; displaced geometry `12` |
| DFTB non-SCC Si k-point stress | `M042 = 3.807e-9`, `N_special_kpoints = 4` |
| DFTB SCC C k-point stress | `M042 = 5.409e-9` |
| DFTB SCC ZnS k-point stress | `M042 = 2.18113e-7`, `N_special_kpoints = 4` |
| DFTB3 H2O k-point stress | `M042 = 6.89e-10`, `N_special_kpoints = 4` |
## Remaining limitations
- The reproduced `PERIODIC XZ` CP2K/tblite GFN2 Ar-layer k-point virial remainder is now much smaller (`2.66e-5` instead of `5.83e-4`), but not yet in the `1e-6` range; forces are good.
- `PERIODIC X` full stress DEBUG is limited by the general CP2K cell/Poisson/stress machinery, not by
a TB-specific quick fix.
- CP2K/tblite open-shell/LSD still aborts intentionally:
`LSD option not compatible with tblite library`.
- Native `tblite` CLI remains a serial external Gamma-reference path; it is not a k-point/symmetry
reference implementation.
- Some heteronuclear CP2K/tblite crystals with k-points are sensitive to overlap conditioning and
SCF state; Ar/Si remain the robust PR regtest choices.
## Verification
- formatting:
- `tools/precommit/format_fortran.py` on changed Fortran files,
- `tools/precommit/format_input_file.py` on changed/new CP2K inputs,
- `tools/precommit/precommit.py -m` on non-Fortran/non-input files.
- patch checks:
- `tblite-0.5.0-gradient-fixes.patch`: `patch -p1 --dry-run` against fresh `tblite-0.5.0`,
- `dftd4-4.1.0-gradient-fixes.patch`: `patch -p1 --dry-run` against fresh `dftd4-4.1.0`.
- build:
- `cmake --build build-tblite-mpi-check --target cp2k-bin -- -j 8`
- regtests with `mpiranks=2`, `ompthreads=1`:
- `xTB/regtest-tblite-gfn2`, `xTB/regtest-tblite-gfn1-grad`,
`xTB/regtest-tblite-ipea1`, `DFTB/regtest-scc-2`: `49 / 49` correct,
- `DFTB/regtest-scc`, `DFTB/regtest-nonscc`: after updating affected references,
`89 / 89` correct,
- additionally checked in the same PR-ready run: `xTB/regtest-1`, `xTB/regtest-3`,
`xTB/regtest-gfn0`, `QS/regtest-dft-vdw-corr-4`; those were green, with only the old DFTB
references requiring the follow-up update above.
This commit is contained in:
parent
c7270bbdb5
commit
cccd2f3934
135 changed files with 8606 additions and 503 deletions
|
|
@ -1792,6 +1792,7 @@ target_compile_definitions(
|
|||
$<$<BOOL:${CP2K_USE_SPGLIB}>:__SPGLIB>
|
||||
$<$<BOOL:${CP2K_USE_LIBSMEAGOL}>:__SMEAGOL>
|
||||
$<$<BOOL:${CP2K_USE_TBLITE}>:__TBLITE>
|
||||
# Developer-only manual flag: __TBLITE_DEBUG_DIAGNOSTICS
|
||||
$<$<BOOL:${CP2K_USE_TBLITE}>:__DFTD4>
|
||||
$<$<BOOL:${CP2K_USE_DFTD4}>:__DFTD4>
|
||||
$<$<BOOL:${CP2K_USE_DFTD4_V3}>:__DFTD4_V3>
|
||||
|
|
|
|||
|
|
@ -170,6 +170,12 @@ CONTAINS
|
|||
iw = cp_print_key_unit_nr(logger, root_section, "DEBUG%PROGRAM_RUN_INFO", &
|
||||
extension=".log")
|
||||
IF (debug_stress_tensor) THEN
|
||||
IF (SUM(cell%perd) == 0) THEN
|
||||
CALL cp_warn(__LOCATION__, &
|
||||
"DEBUG_STRESS_TENSOR requested for PERIODIC NONE. "// &
|
||||
"The isolated-system virial is useful for finite-difference diagnostics, "// &
|
||||
"but it is not a physically meaningful bulk stress.")
|
||||
END IF
|
||||
! To debug stress tensor the stress tensor calculation must be
|
||||
! first enabled..
|
||||
CALL section_vals_val_get(force_env%force_env_section, "STRESS_TENSOR", &
|
||||
|
|
|
|||
|
|
@ -200,6 +200,9 @@ CONTAINS
|
|||
flags = TRIM(flags)//" mctc-lib"
|
||||
flags = TRIM(flags)//" tblite"
|
||||
#endif
|
||||
#if defined(__TBLITE_DEBUG_DIAGNOSTICS)
|
||||
flags = TRIM(flags)//" tblite_debug_diagnostics"
|
||||
#endif
|
||||
#if defined(__SIRIUS)
|
||||
flags = TRIM(flags)//" sirius"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ MODULE cp_control_types
|
|||
USE input_constants, ONLY: do_full_density,&
|
||||
rtp_bse_ham_G0W0,&
|
||||
rtp_method_tddft,&
|
||||
tblite_scc_mixer_auto,&
|
||||
use_mom_ref_coac
|
||||
USE kinds, ONLY: default_path_length,&
|
||||
default_string_length,&
|
||||
|
|
@ -149,10 +150,12 @@ MODULE cp_control_types
|
|||
LOGICAL :: self_consistent = .FALSE.
|
||||
LOGICAL :: orthogonal_basis = .FALSE.
|
||||
LOGICAL :: dispersion = .FALSE.
|
||||
INTEGER :: tblite_scc_mixer = tblite_scc_mixer_auto
|
||||
INTEGER :: dispersion_type = 0
|
||||
LOGICAL :: dftb3_diagonal = .FALSE.
|
||||
LOGICAL :: hb_sr_damp = .FALSE.
|
||||
REAL(KIND=dp) :: hb_sr_para = 0.0_dp
|
||||
REAL(KIND=dp) :: tblite_mixer_damping = 0.4_dp
|
||||
REAL(KIND=dp) :: eps_disp = 0.0_dp
|
||||
REAL(KIND=dp) :: epscn = 0.0_dp
|
||||
REAL(KIND=dp) :: exp_pre = 0.0_dp
|
||||
|
|
@ -172,6 +175,21 @@ MODULE cp_control_types
|
|||
! **************************************************************************************************
|
||||
! \brief Control parameters for xTB calculations
|
||||
! **************************************************************************************************
|
||||
TYPE xtb_reference_cli_type
|
||||
LOGICAL :: enabled = .FALSE.
|
||||
LOGICAL :: check_energy = .TRUE.
|
||||
LOGICAL :: check_forces = .TRUE.
|
||||
LOGICAL :: check_virial = .FALSE.
|
||||
LOGICAL :: keep_files = .FALSE.
|
||||
LOGICAL :: stop_on_error = .FALSE.
|
||||
INTEGER :: iterations = 250
|
||||
REAL(KIND=dp) :: accuracy = 1.0_dp
|
||||
REAL(KIND=dp) :: error_limit = 1.0E-8_dp
|
||||
CHARACTER(LEN=default_path_length) :: program_name = "tblite"
|
||||
CHARACTER(LEN=default_path_length) :: work_directory = "."
|
||||
CHARACTER(LEN=default_path_length) :: prefix = "tblite-reference"
|
||||
END TYPE xtb_reference_cli_type
|
||||
|
||||
TYPE xtb_control_type
|
||||
!
|
||||
INTEGER :: gfn_type = 1
|
||||
|
|
@ -182,6 +200,8 @@ MODULE cp_control_types
|
|||
INTEGER :: sto_ng = 0
|
||||
INTEGER :: h_sto_ng = 0
|
||||
INTEGER :: tblite_method = 0
|
||||
INTEGER :: tblite_scc_mixer = tblite_scc_mixer_auto
|
||||
REAL(KIND=dp) :: tblite_mixer_damping = 0.4_dp
|
||||
!
|
||||
INTEGER :: vdw_type = -1
|
||||
CHARACTER(LEN=default_path_length) :: parameter_file_path = ""
|
||||
|
|
@ -232,6 +252,7 @@ MODULE cp_control_types
|
|||
! EN shift in EEQ (molecular=1 or crystaline=2)
|
||||
INTEGER :: enshift_type = 1
|
||||
TYPE(eeq_solver_type) :: eeq_sparam ! parameters for EEQ solver
|
||||
TYPE(xtb_reference_cli_type) :: reference_cli
|
||||
END TYPE xtb_control_type
|
||||
|
||||
! **************************************************************************************************
|
||||
|
|
@ -714,6 +735,7 @@ MODULE cp_control_types
|
|||
ddapc_restraint_type, &
|
||||
dftb_control_type, &
|
||||
xtb_control_type, &
|
||||
xtb_reference_cli_type, &
|
||||
semi_empirical_control_type, &
|
||||
s2_restraint_type, &
|
||||
admm_control_type, &
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ MODULE cp_control_utils
|
|||
admm_control_create, admm_control_type, ddapc_control_create, ddapc_restraint_type, &
|
||||
dft_control_create, dft_control_type, efield_type, expot_control_create, &
|
||||
maxwell_control_create, qs_control_type, rixs_control_type, tddfpt2_control_type, &
|
||||
xtb_control_type
|
||||
xtb_control_type, xtb_reference_cli_type
|
||||
USE cp_files, ONLY: close_file,&
|
||||
open_file
|
||||
USE cp_log_handling, ONLY: cp_get_default_logger,&
|
||||
|
|
@ -53,12 +53,13 @@ MODULE cp_control_utils
|
|||
do_pwgrid_spherical, do_s2_constraint, do_s2_restraint, do_se_is_kdso, do_se_is_kdso_d, &
|
||||
do_se_is_slater, do_se_lr_ewald, do_se_lr_ewald_gks, do_se_lr_ewald_r3, do_se_lr_none, &
|
||||
gapw_1c_large, gapw_1c_medium, gapw_1c_orb, gapw_1c_small, gapw_1c_very_large, &
|
||||
gaussian_env, kg_tnadd_embed, kg_tnadd_embed_ri, no_admm_type, numerical, ramp_env, &
|
||||
real_time_propagation, rtp_method_bse, sccs_andreussi, sccs_derivative_cd3, &
|
||||
sccs_derivative_cd5, sccs_derivative_cd7, sccs_derivative_fft, sccs_fattebert_gygi, &
|
||||
sic_ad, sic_eo, sic_list_all, sic_list_unpaired, sic_mauri_spz, sic_mauri_us, sic_none, &
|
||||
slater, tddfpt_dipole_length, tddfpt_kernel_stda, use_mom_ref_user, xtb_vdw_type_d3, &
|
||||
xtb_vdw_type_d4, xtb_vdw_type_none
|
||||
gaussian_env, gfn1xtb, gfn_tblite, kg_tnadd_embed, kg_tnadd_embed_ri, no_admm_type, &
|
||||
numerical, ramp_env, real_time_propagation, rtp_method_bse, sccs_andreussi, &
|
||||
sccs_derivative_cd3, sccs_derivative_cd5, sccs_derivative_cd7, sccs_derivative_fft, &
|
||||
sccs_fattebert_gygi, sic_ad, sic_eo, sic_list_all, sic_list_unpaired, sic_mauri_spz, &
|
||||
sic_mauri_us, sic_none, slater, tblite_scc_mixer_auto, tblite_scc_mixer_cp2k, &
|
||||
tblite_scc_mixer_none, tblite_scc_mixer_tblite, tddfpt_dipole_length, tddfpt_kernel_stda, &
|
||||
use_mom_ref_user, xtb_vdw_type_d3, xtb_vdw_type_d4, xtb_vdw_type_none
|
||||
USE input_cp2k_check, ONLY: xc_functionals_expand
|
||||
USE input_cp2k_dft, ONLY: create_dft_section
|
||||
USE input_enumeration_types, ONLY: enum_i2c,&
|
||||
|
|
@ -870,20 +871,22 @@ CONTAINS
|
|||
INTEGER :: handle, itmp, j, jj, k, n_rep, n_var, &
|
||||
ngauss, ngp, nrep
|
||||
INTEGER, DIMENSION(:), POINTER :: tmplist
|
||||
LOGICAL :: explicit, was_present
|
||||
LOGICAL :: explicit, tblite_reference_cli, &
|
||||
tblite_reference_cli_section, &
|
||||
tblite_section_active, was_present
|
||||
REAL(dp) :: tmp, tmpsqrt, value
|
||||
REAL(dp), POINTER :: scal(:)
|
||||
TYPE(section_vals_type), POINTER :: cdft_control_section, ddapc_restraint_section, &
|
||||
dftb_parameter, dftb_section, eeq_section, genpot_section, lri_optbas_section, &
|
||||
mull_section, nonbonded_section, s2_restraint_section, se_section, xtb_parameter, &
|
||||
xtb_section, xtb_tblite
|
||||
xtb_section, xtb_tblite, xtb_tblite_ref_cli
|
||||
|
||||
CALL timeset(routineN, handle)
|
||||
|
||||
was_present = .FALSE.
|
||||
NULLIFY (mull_section, ddapc_restraint_section, s2_restraint_section, &
|
||||
se_section, dftb_section, xtb_section, dftb_parameter, xtb_parameter, lri_optbas_section, &
|
||||
cdft_control_section, genpot_section, eeq_section)
|
||||
cdft_control_section, genpot_section, eeq_section, xtb_tblite_ref_cli)
|
||||
|
||||
mull_section => section_vals_get_subs_vals(qs_section, "MULLIKEN_RESTRAINT")
|
||||
ddapc_restraint_section => section_vals_get_subs_vals(qs_section, "DDAPC_RESTRAINT")
|
||||
|
|
@ -899,6 +902,7 @@ CONTAINS
|
|||
nonbonded_section => section_vals_get_subs_vals(xtb_section, "NONBONDED")
|
||||
genpot_section => section_vals_get_subs_vals(nonbonded_section, "GENPOT")
|
||||
xtb_tblite => section_vals_get_subs_vals(xtb_section, "TBLITE")
|
||||
xtb_tblite_ref_cli => section_vals_get_subs_vals(xtb_tblite, "REFERENCE_CLI")
|
||||
|
||||
! Setup all defaults values and overwrite input parameters
|
||||
! EPS_DEFAULT should set the target accuracy in the total energy (~per electron) or a closely related value
|
||||
|
|
@ -1290,6 +1294,10 @@ CONTAINS
|
|||
l_val=qs_control%dftb_control%dftb3_diagonal)
|
||||
CALL section_vals_val_get(dftb_section, "HB_SR_GAMMA", &
|
||||
l_val=qs_control%dftb_control%hb_sr_damp)
|
||||
CALL section_vals_val_get(dftb_section, "SCC_MIXER", &
|
||||
i_val=qs_control%dftb_control%tblite_scc_mixer)
|
||||
CALL section_vals_val_get(dftb_section, "TBLITE_MIXER_DAMPING", &
|
||||
r_val=qs_control%dftb_control%tblite_mixer_damping)
|
||||
CALL section_vals_val_get(dftb_section, "EPS_DISP", &
|
||||
r_val=qs_control%dftb_control%eps_disp)
|
||||
CALL section_vals_val_get(dftb_section, "DO_EWALD", explicit=explicit)
|
||||
|
|
@ -1346,6 +1354,20 @@ CONTAINS
|
|||
! xTB code
|
||||
IF (qs_control%xtb) THEN
|
||||
CALL section_vals_val_get(xtb_section, "GFN_TYPE", i_val=qs_control%xtb_control%gfn_type)
|
||||
CALL section_vals_val_get(xtb_tblite, "_SECTION_PARAMETERS_", l_val=tblite_section_active)
|
||||
qs_control%xtb_control%do_tblite = (qs_control%xtb_control%gfn_type == gfn_tblite)
|
||||
IF (qs_control%xtb_control%do_tblite) THEN
|
||||
IF (.NOT. tblite_section_active) &
|
||||
CPABORT("XTB/GFN_TYPE TBLITE requires an XTB/TBLITE section")
|
||||
! The CP2K-internal GFN1 defaults are still used to initialize shared xTB fields.
|
||||
qs_control%xtb_control%gfn_type = gfn1xtb
|
||||
ELSE IF (tblite_section_active) THEN
|
||||
CPABORT("The XTB/TBLITE section requires XTB/GFN_TYPE TBLITE")
|
||||
END IF
|
||||
CALL section_vals_val_get(xtb_section, "SCC_MIXER", &
|
||||
i_val=qs_control%xtb_control%tblite_scc_mixer)
|
||||
CALL section_vals_val_get(xtb_section, "TBLITE_MIXER_DAMPING", &
|
||||
r_val=qs_control%xtb_control%tblite_mixer_damping)
|
||||
CALL section_vals_val_get(xtb_section, "DO_EWALD", explicit=explicit)
|
||||
IF (explicit) THEN
|
||||
CALL section_vals_val_get(xtb_section, "DO_EWALD", &
|
||||
|
|
@ -1652,30 +1674,64 @@ CONTAINS
|
|||
|
||||
! EEQ solver params
|
||||
CALL read_eeq_param(eeq_section, qs_control%xtb_control%eeq_sparam)
|
||||
|
||||
END IF
|
||||
|
||||
! Optimize LRI basis set
|
||||
CALL section_vals_get(lri_optbas_section, explicit=qs_control%lri_optbas)
|
||||
|
||||
! Use instead the tblite
|
||||
CALL section_vals_val_get(xtb_tblite, "_SECTION_PARAMETERS_", &
|
||||
l_val=qs_control%xtb_control%do_tblite)
|
||||
CALL section_vals_val_get(xtb_tblite, "METHOD", &
|
||||
i_val=qs_control%xtb_control%tblite_method)
|
||||
! Use tblite if selected through XTB/GFN_TYPE TBLITE.
|
||||
IF (qs_control%xtb_control%do_tblite) THEN
|
||||
CALL section_vals_val_get(xtb_tblite, "METHOD", &
|
||||
i_val=qs_control%xtb_control%tblite_method)
|
||||
CALL section_vals_val_get(xtb_tblite, "SCC_MIXER", &
|
||||
i_val=qs_control%xtb_control%tblite_scc_mixer)
|
||||
CALL section_vals_val_get(xtb_tblite, "TBLITE_MIXER_DAMPING", &
|
||||
r_val=qs_control%xtb_control%tblite_mixer_damping)
|
||||
CALL section_vals_val_get(xtb_tblite, "REFERENCE_CLI", l_val=tblite_reference_cli)
|
||||
CALL section_vals_get(xtb_tblite_ref_cli, explicit=tblite_reference_cli_section)
|
||||
IF (tblite_reference_cli .AND. (.NOT. tblite_reference_cli_section)) &
|
||||
CPABORT("XTB/TBLITE/REFERENCE_CLI keyword requires an XTB/TBLITE/REFERENCE_CLI section")
|
||||
IF (tblite_reference_cli .OR. tblite_reference_cli_section) THEN
|
||||
CALL read_xtb_reference_cli_section(xtb_tblite_ref_cli, qs_control%xtb_control%reference_cli)
|
||||
qs_control%xtb_control%reference_cli%enabled = .TRUE.
|
||||
END IF
|
||||
CALL cite_reference(Caldeweyher2017)
|
||||
CALL cite_reference(Caldeweyher2020)
|
||||
CALL cite_reference(Asgeirsson2017)
|
||||
CALL cite_reference(Grimme2017)
|
||||
CALL cite_reference(Bannwarth2019)
|
||||
!Ewald sum included in tblite
|
||||
qs_control%xtb_control%do_ewald = .FALSE.
|
||||
! tblite handles periodic long-range terms internally from the CP2K cell periodicity.
|
||||
! Keep xtb_control%do_ewald as read above from XTB/DO_EWALD or SUBSYS/CELL/PERIODIC,
|
||||
! matching the DFTB and CP2K-internal xTB setup.
|
||||
END IF
|
||||
|
||||
CALL timestop(handle)
|
||||
END SUBROUTINE read_qs_section
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Read native tblite CLI reference options.
|
||||
!> \param ref_cli_section input section
|
||||
!> \param ref_cli reference CLI control data
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE read_xtb_reference_cli_section(ref_cli_section, ref_cli)
|
||||
TYPE(section_vals_type), POINTER :: ref_cli_section
|
||||
TYPE(xtb_reference_cli_type), INTENT(INOUT) :: ref_cli
|
||||
|
||||
CALL section_vals_val_get(ref_cli_section, "_SECTION_PARAMETERS_", l_val=ref_cli%enabled)
|
||||
CALL section_vals_val_get(ref_cli_section, "PROGRAM_NAME", c_val=ref_cli%program_name)
|
||||
CALL section_vals_val_get(ref_cli_section, "WORK_DIRECTORY", c_val=ref_cli%work_directory)
|
||||
CALL section_vals_val_get(ref_cli_section, "PREFIX", c_val=ref_cli%prefix)
|
||||
CALL section_vals_val_get(ref_cli_section, "KEEP_FILES", l_val=ref_cli%keep_files)
|
||||
CALL section_vals_val_get(ref_cli_section, "ERROR_LIMIT", r_val=ref_cli%error_limit)
|
||||
CALL section_vals_val_get(ref_cli_section, "STOP_ON_ERROR", l_val=ref_cli%stop_on_error)
|
||||
CALL section_vals_val_get(ref_cli_section, "CHECK_ENERGY", l_val=ref_cli%check_energy)
|
||||
CALL section_vals_val_get(ref_cli_section, "CHECK_FORCES", l_val=ref_cli%check_forces)
|
||||
CALL section_vals_val_get(ref_cli_section, "CHECK_VIRIAL", l_val=ref_cli%check_virial)
|
||||
CALL section_vals_val_get(ref_cli_section, "ACCURACY", r_val=ref_cli%accuracy)
|
||||
CALL section_vals_val_get(ref_cli_section, "ITERATIONS", i_val=ref_cli%iterations)
|
||||
|
||||
END SUBROUTINE read_xtb_reference_cli_section
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Read TDDFPT-related input parameters.
|
||||
!> \param t_control TDDFPT control parameters
|
||||
|
|
@ -2302,6 +2358,7 @@ CONTAINS
|
|||
|
||||
CHARACTER(len=*), PARAMETER :: routineN = 'write_xtb_control'
|
||||
|
||||
CHARACTER(LEN=16) :: scc_mixer_name
|
||||
INTEGER :: handle, output_unit
|
||||
TYPE(cp_logger_type), POINTER :: logger
|
||||
|
||||
|
|
@ -2359,6 +2416,22 @@ CONTAINS
|
|||
"xTB| Electronegativity scaling", xtb_control%ken
|
||||
WRITE (UNIT=output_unit, FMT="(T2,A,T61,2F10.3)") &
|
||||
"xTB| Halogen potential scaling kxr kx2", xtb_control%kxr, xtb_control%kx2
|
||||
SELECT CASE (xtb_control%tblite_scc_mixer)
|
||||
CASE (tblite_scc_mixer_auto)
|
||||
scc_mixer_name = "AUTO"
|
||||
CASE (tblite_scc_mixer_tblite)
|
||||
scc_mixer_name = "TBLITE"
|
||||
CASE (tblite_scc_mixer_cp2k)
|
||||
scc_mixer_name = "CP2K"
|
||||
CASE (tblite_scc_mixer_none)
|
||||
scc_mixer_name = "NONE"
|
||||
CASE DEFAULT
|
||||
CPABORT("Unknown tblite SCC mixer")
|
||||
END SELECT
|
||||
WRITE (UNIT=output_unit, FMT="(T2,A,T72,A)") &
|
||||
"xTB| SCC mixer:", TRIM(scc_mixer_name)
|
||||
WRITE (UNIT=output_unit, FMT="(T2,A,T71,F10.3)") &
|
||||
"xTB| tblite SCC mixer damping:", xtb_control%tblite_mixer_damping
|
||||
WRITE (UNIT=output_unit, FMT="(/)")
|
||||
|
||||
END IF
|
||||
|
|
|
|||
|
|
@ -973,14 +973,16 @@ CONTAINS
|
|||
valid = .FALSE.
|
||||
|
||||
DO iop = 1, csym%nrtot
|
||||
kr = csym%ibrot(iop)
|
||||
IF (kr < 1 .OR. kr > SIZE(csym%rt, 3)) CYCLE
|
||||
IF (iop > SIZE(csym%rt, 3)) CYCLE
|
||||
IF (csym%ibrot(iop) == 0) CYCLE
|
||||
DO ibsign = 1, 2
|
||||
wcart(1:3) = alat*(xref(1)*b1(1:3) + xref(2)*b2(1:3) + xref(3)*b3(1:3))
|
||||
wcart(1:3) = kp_apply_operation(wcart(1:3), csym%rt(1:3, 1:3, kr))
|
||||
wcart(1:3) = kp_apply_operation(wcart(1:3), csym%rt(1:3, 1:3, iop))
|
||||
IF (ibsign == 2) THEN
|
||||
wcart(1:3) = -wcart(1:3)
|
||||
kr = -kr
|
||||
kr = -csym%ibrot(iop)
|
||||
ELSE
|
||||
kr = csym%ibrot(iop)
|
||||
END IF
|
||||
rr(1) = DOT_PRODUCT(a1(1:3), wcart(1:3))/alat
|
||||
rr(2) = DOT_PRODUCT(a2(1:3), wcart(1:3))/alat
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ CONTAINS
|
|||
print_section => section_vals_get_subs_vals(qs_env%input, "PRINT%GRID_INFORMATION")
|
||||
CALL get_qs_env(qs_env, cell_ref=cell_ref)
|
||||
CALL read_ewald_section_tb(ewald_env, ewald_section, cell_ref%hmat, &
|
||||
silent=.TRUE., pset="EEQ")
|
||||
silent=.TRUE., pset="EEQ", cell_periodic=cell%perd)
|
||||
ALLOCATE (ewald_pw)
|
||||
CALL ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section=print_section)
|
||||
!
|
||||
|
|
@ -511,7 +511,7 @@ CONTAINS
|
|||
print_section => section_vals_get_subs_vals(qs_env%input, "PRINT%GRID_INFORMATION")
|
||||
CALL get_qs_env(qs_env, cell_ref=cell_ref)
|
||||
CALL read_ewald_section_tb(ewald_env, ewald_section, cell_ref%hmat, &
|
||||
silent=.TRUE., pset="EEQ")
|
||||
silent=.TRUE., pset="EEQ", cell_periodic=cell%perd)
|
||||
ALLOCATE (ewald_pw)
|
||||
CALL ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section=print_section)
|
||||
!
|
||||
|
|
|
|||
|
|
@ -12,6 +12,14 @@
|
|||
!> \author CJM NOV-30-2003
|
||||
! **************************************************************************************************
|
||||
MODULE ewald_environment_types
|
||||
USE cell_types, ONLY: use_perd_none,&
|
||||
use_perd_x,&
|
||||
use_perd_xy,&
|
||||
use_perd_xyz,&
|
||||
use_perd_xz,&
|
||||
use_perd_y,&
|
||||
use_perd_yz,&
|
||||
use_perd_z
|
||||
USE cp_log_handling, ONLY: cp_get_default_logger,&
|
||||
cp_logger_type
|
||||
USE cp_output_handling, ONLY: cp_print_key_finished_output,&
|
||||
|
|
@ -383,21 +391,25 @@ CONTAINS
|
|||
!> \param hmat ...
|
||||
!> \param silent ...
|
||||
!> \param pset ...
|
||||
!> \param cell_periodic ...
|
||||
!> \author JGH
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE read_ewald_section_tb(ewald_env, ewald_section, hmat, silent, pset)
|
||||
SUBROUTINE read_ewald_section_tb(ewald_env, ewald_section, hmat, silent, pset, cell_periodic)
|
||||
TYPE(ewald_environment_type), INTENT(INOUT) :: ewald_env
|
||||
TYPE(section_vals_type), POINTER :: ewald_section
|
||||
REAL(KIND=dp), DIMENSION(3, 3), INTENT(IN) :: hmat
|
||||
LOGICAL, INTENT(IN), OPTIONAL :: silent
|
||||
CHARACTER(LEN=*), OPTIONAL :: pset
|
||||
INTEGER, DIMENSION(3), INTENT(IN), OPTIONAL :: cell_periodic
|
||||
|
||||
CHARACTER(LEN=5) :: param
|
||||
INTEGER :: i, iw, n(3)
|
||||
INTEGER :: i, iw, n(3), poisson_key
|
||||
INTEGER, DIMENSION(3) :: poisson_periodic
|
||||
INTEGER, DIMENSION(:), POINTER :: gmax_read
|
||||
LOGICAL :: do_print, explicit
|
||||
REAL(KIND=dp) :: alat, cutoff, dummy, omega
|
||||
TYPE(cp_logger_type), POINTER :: logger
|
||||
TYPE(section_vals_type), POINTER :: poisson_section
|
||||
|
||||
logger => cp_get_default_logger()
|
||||
do_print = .TRUE.
|
||||
|
|
@ -405,6 +417,21 @@ CONTAINS
|
|||
param = "none"
|
||||
IF (PRESENT(pset)) param = pset
|
||||
|
||||
IF (PRESENT(cell_periodic)) THEN
|
||||
poisson_section => ewald_env%poisson_section
|
||||
IF (ASSOCIATED(poisson_section)) THEN
|
||||
CALL section_vals_val_get(poisson_section, "PERIODIC", i_val=poisson_key)
|
||||
CALL tb_decode_periodicity(poisson_key, poisson_periodic)
|
||||
IF (ANY(cell_periodic /= poisson_periodic)) THEN
|
||||
CALL cp_warn(__LOCATION__, &
|
||||
"The selected periodicities in SUBSYS/CELL and DFT/POISSON do not match. "// &
|
||||
"The TB Ewald electrostatics will use DFT/POISSON/PERIODIC="// &
|
||||
TRIM(tb_periodicity_label(poisson_periodic))// &
|
||||
" while SUBSYS/CELL/PERIODIC="//TRIM(tb_periodicity_label(cell_periodic))//".")
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
|
||||
ewald_env%do_multipoles = .FALSE.
|
||||
ewald_env%do_ipol = 0
|
||||
ewald_env%eps_pol = 1.e-12_dp
|
||||
|
|
@ -429,7 +456,7 @@ CONTAINS
|
|||
ELSE
|
||||
SELECT CASE (param)
|
||||
CASE DEFAULT
|
||||
ewald_env%alpha = 1.0_dp
|
||||
CALL section_vals_val_get(ewald_section, "ALPHA", r_val=ewald_env%alpha)
|
||||
CASE ("EEQ")
|
||||
omega = ABS(det_3x3(hmat))
|
||||
ewald_env%alpha = SQRT(twopi)/omega**(1./3.)
|
||||
|
|
@ -511,6 +538,58 @@ CONTAINS
|
|||
|
||||
END SUBROUTINE read_ewald_section_tb
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Decode CP2K PERIODIC enum into the 3-component periodicity mask.
|
||||
!> \param periodic_key input enum value
|
||||
!> \param periodic periodicity mask
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE tb_decode_periodicity(periodic_key, periodic)
|
||||
INTEGER, INTENT(IN) :: periodic_key
|
||||
INTEGER, DIMENSION(3), INTENT(OUT) :: periodic
|
||||
|
||||
SELECT CASE (periodic_key)
|
||||
CASE (use_perd_x)
|
||||
periodic = [1, 0, 0]
|
||||
CASE (use_perd_y)
|
||||
periodic = [0, 1, 0]
|
||||
CASE (use_perd_z)
|
||||
periodic = [0, 0, 1]
|
||||
CASE (use_perd_xy)
|
||||
periodic = [1, 1, 0]
|
||||
CASE (use_perd_xz)
|
||||
periodic = [1, 0, 1]
|
||||
CASE (use_perd_yz)
|
||||
periodic = [0, 1, 1]
|
||||
CASE (use_perd_xyz)
|
||||
periodic = [1, 1, 1]
|
||||
CASE (use_perd_none)
|
||||
periodic = [0, 0, 0]
|
||||
CASE DEFAULT
|
||||
CPABORT("Invalid PERIODIC setting for TB Ewald")
|
||||
END SELECT
|
||||
|
||||
END SUBROUTINE tb_decode_periodicity
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Return a compact label for a 3-component periodicity mask.
|
||||
!> \param periodic periodicity mask
|
||||
!> \return label
|
||||
! **************************************************************************************************
|
||||
FUNCTION tb_periodicity_label(periodic) RESULT(label)
|
||||
INTEGER, DIMENSION(3), INTENT(IN) :: periodic
|
||||
CHARACTER(LEN=4) :: label
|
||||
|
||||
label = ""
|
||||
IF (ALL(periodic == 0)) THEN
|
||||
label = "NONE"
|
||||
ELSE
|
||||
IF (periodic(1) == 1) label = TRIM(label)//"X"
|
||||
IF (periodic(2) == 1) label = TRIM(label)//"Y"
|
||||
IF (periodic(3) == 1) label = TRIM(label)//"Z"
|
||||
END IF
|
||||
|
||||
END FUNCTION tb_periodicity_label
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief triggers (by bisection) the optimal value for EWALD parameter x
|
||||
!> EXP(-x^2)/x^2 = EWALD_ACCURACY
|
||||
|
|
@ -551,4 +630,3 @@ CONTAINS
|
|||
END FUNCTION find_ewald_optimal_value
|
||||
|
||||
END MODULE ewald_environment_types
|
||||
|
||||
|
|
|
|||
|
|
@ -326,11 +326,10 @@ CONTAINS
|
|||
END DO
|
||||
END IF
|
||||
IF (use_virial) THEN
|
||||
IF (iatom == jatom) THEN
|
||||
pfr = -0.5_dp*dfr*mcharge(iatom)*mcharge(jatom)
|
||||
ELSE
|
||||
pfr = -dfr*mcharge(iatom)*mcharge(jatom)
|
||||
END IF
|
||||
! The potential update above adds both sides of the pair before the
|
||||
! final 0.5 energy prefactor is applied. Self-image pairs therefore
|
||||
! need the same virial prefactor as interatomic pairs.
|
||||
pfr = -dfr*mcharge(iatom)*mcharge(jatom)
|
||||
CALL virial_pair_force(virial%pv_virial, -pfr, rij, rij)
|
||||
END IF
|
||||
END IF
|
||||
|
|
@ -513,4 +512,3 @@ CONTAINS
|
|||
END SUBROUTINE tb_spme_zforce
|
||||
|
||||
END MODULE ewald_methods_tb
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ MODULE force_env_methods
|
|||
scaled_to_real
|
||||
USE constraint_fxd, ONLY: fix_atom_control
|
||||
USE constraint_vsite, ONLY: vsite_force_control
|
||||
USE cp_blacs_env, ONLY: cp_blacs_env_type
|
||||
USE cp_control_types, ONLY: dft_control_type
|
||||
USE cp_fm_basic_linalg, ONLY: cp_fm_scale_and_add
|
||||
USE cp_fm_types, ONLY: cp_fm_copy_general
|
||||
|
|
@ -101,6 +102,13 @@ MODULE force_env_methods
|
|||
USE kinds, ONLY: default_path_length,&
|
||||
default_string_length,&
|
||||
dp
|
||||
USE kpoint_methods, ONLY: kpoint_env_initialize,&
|
||||
kpoint_initialize,&
|
||||
kpoint_initialize_mos
|
||||
USE kpoint_types, ONLY: get_kpoint_info,&
|
||||
kpoint_reset_initialization,&
|
||||
kpoint_type,&
|
||||
set_kpoint_info
|
||||
USE machine, ONLY: m_memory
|
||||
USE mathlib, ONLY: abnormal_value
|
||||
USE message_passing, ONLY: mp_para_env_type
|
||||
|
|
@ -132,6 +140,7 @@ MODULE force_env_methods
|
|||
understand_spin_states
|
||||
USE particle_list_types, ONLY: particle_list_p_type,&
|
||||
particle_list_type
|
||||
USE particle_types, ONLY: particle_type
|
||||
USE physcon, ONLY: debye
|
||||
USE pw_env_types, ONLY: pw_env_get,&
|
||||
pw_env_type
|
||||
|
|
@ -149,13 +158,17 @@ MODULE force_env_methods
|
|||
USE qmmmx_force, ONLY: qmmmx_calc_energy_force
|
||||
USE qmmmx_types, ONLY: qmmmx_env_type
|
||||
USE qs_apt_fdiff_methods, ONLY: apt_fdiff
|
||||
USE qs_basis_rotation_methods, ONLY: qs_basis_rotation
|
||||
USE qs_energy_types, ONLY: qs_energy_type
|
||||
USE qs_environment_types, ONLY: get_qs_env,&
|
||||
qs_environment_type,&
|
||||
set_qs_env
|
||||
USE qs_force, ONLY: qs_calc_energy_force
|
||||
USE qs_mo_types, ONLY: mo_set_type
|
||||
USE qs_rho_types, ONLY: qs_rho_get,&
|
||||
qs_rho_type
|
||||
USE qs_wf_history_types, ONLY: qs_wf_history_type,&
|
||||
wfi_clear
|
||||
USE restraint, ONLY: restraint_control
|
||||
USE scine_utils, ONLY: write_scine
|
||||
USE string_utilities, ONLY: compress
|
||||
|
|
@ -264,6 +277,7 @@ CONTAINS
|
|||
CASE (use_fist_force)
|
||||
CALL fist_calc_energy_force(force_env%fist_env)
|
||||
CASE (use_qs_force)
|
||||
CALL force_env_refresh_debug_kpoints(force_env, fd_energy=.NOT. calculate_forces)
|
||||
CALL qs_calc_energy_force(force_env%qs_env, calculate_forces, energy_consistency, linres_run)
|
||||
CASE (use_pwdft_force)
|
||||
IF (virial%pv_availability .AND. calculate_stress_tensor) THEN
|
||||
|
|
@ -515,6 +529,87 @@ CONTAINS
|
|||
|
||||
END SUBROUTINE force_env_calc_energy_force
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Rebuild k-point data for DEBUG finite-difference geometries.
|
||||
!> Atomic k-point symmetry may change when a single atom or cell element is displaced.
|
||||
!> \param force_env ...
|
||||
!> \param fd_energy ...
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE force_env_refresh_debug_kpoints(force_env, fd_energy)
|
||||
|
||||
TYPE(force_env_type), POINTER :: force_env
|
||||
LOGICAL, INTENT(IN) :: fd_energy
|
||||
|
||||
CHARACTER(LEN=default_string_length) :: kp_scheme
|
||||
LOGICAL :: debug_inversion_only, do_kpoints, full_grid, input_full_grid, &
|
||||
input_inversion_symmetry_only, inversion_symmetry_only, kpoint_symmetry, use_full_grid, &
|
||||
use_inversion_symmetry_only
|
||||
TYPE(cell_type), POINTER :: cell
|
||||
TYPE(cp_blacs_env_type), POINTER :: blacs_env
|
||||
TYPE(dft_control_type), POINTER :: dft_control
|
||||
TYPE(global_environment_type), POINTER :: globenv
|
||||
TYPE(kpoint_type), POINTER :: kpoints
|
||||
TYPE(mo_set_type), DIMENSION(:), POINTER :: mos
|
||||
TYPE(mp_para_env_type), POINTER :: para_env
|
||||
TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
|
||||
TYPE(qs_wf_history_type), POINTER :: wf_history
|
||||
TYPE(section_vals_type), POINTER :: input, kpoint_section
|
||||
|
||||
IF (.NOT. ASSOCIATED(force_env)) RETURN
|
||||
IF (force_env%in_use /= use_qs_force) RETURN
|
||||
|
||||
NULLIFY (globenv)
|
||||
CALL force_env_get(force_env, globenv=globenv)
|
||||
IF (.NOT. ASSOCIATED(globenv)) RETURN
|
||||
IF (globenv%run_type_id /= debug_run) RETURN
|
||||
|
||||
NULLIFY (blacs_env, cell, dft_control, input, kpoint_section, kpoints, mos, para_env, &
|
||||
particle_set, wf_history)
|
||||
CALL get_qs_env(qs_env=force_env%qs_env, &
|
||||
blacs_env=blacs_env, &
|
||||
cell=cell, &
|
||||
dft_control=dft_control, &
|
||||
do_kpoints=do_kpoints, &
|
||||
input=input, &
|
||||
kpoints=kpoints, &
|
||||
mos=mos, &
|
||||
para_env=para_env, &
|
||||
particle_set=particle_set, &
|
||||
wf_history=wf_history)
|
||||
IF (.NOT. do_kpoints) RETURN
|
||||
|
||||
CALL get_kpoint_info(kpoints, kp_scheme=kp_scheme, symmetry=kpoint_symmetry, full_grid=full_grid, &
|
||||
inversion_symmetry_only=inversion_symmetry_only)
|
||||
IF (.NOT. kpoint_symmetry) RETURN
|
||||
IF (TRIM(kp_scheme) /= "MONKHORST-PACK" .AND. TRIM(kp_scheme) /= "MACDONALD") RETURN
|
||||
|
||||
input_full_grid = full_grid
|
||||
input_inversion_symmetry_only = inversion_symmetry_only
|
||||
IF (ASSOCIATED(input)) THEN
|
||||
kpoint_section => section_vals_get_subs_vals(input, "DFT%KPOINTS")
|
||||
CALL section_vals_val_get(kpoint_section, "FULL_GRID", l_val=input_full_grid)
|
||||
CALL section_vals_val_get(kpoint_section, "INVERSION_SYMMETRY_ONLY", &
|
||||
l_val=input_inversion_symmetry_only)
|
||||
END IF
|
||||
! DEBUG finite differences must not reuse atomic symmetry from another geometry.
|
||||
! Keep only k-space inversion/time-reversal for numerical points and TB DEBUG.
|
||||
debug_inversion_only = fd_energy .OR. dft_control%qs_control%dftb .OR. &
|
||||
dft_control%qs_control%xtb
|
||||
use_full_grid = input_full_grid
|
||||
use_inversion_symmetry_only = (input_inversion_symmetry_only .OR. debug_inversion_only) .AND. &
|
||||
(.NOT. use_full_grid)
|
||||
CALL set_kpoint_info(kpoints, full_grid=use_full_grid, &
|
||||
inversion_symmetry_only=use_inversion_symmetry_only)
|
||||
|
||||
CALL kpoint_reset_initialization(kpoints)
|
||||
CALL kpoint_initialize(kpoints, particle_set, cell)
|
||||
CALL kpoint_env_initialize(kpoints, para_env, blacs_env, with_aux_fit=dft_control%do_admm)
|
||||
CALL kpoint_initialize_mos(kpoints, mos)
|
||||
CALL wfi_clear(wf_history)
|
||||
CALL qs_basis_rotation(force_env%qs_env, kpoints)
|
||||
|
||||
END SUBROUTINE force_env_refresh_debug_kpoints
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Evaluates the stress tensor and pressure numerically
|
||||
!> \param force_env ...
|
||||
|
|
|
|||
|
|
@ -1351,7 +1351,14 @@ MODULE input_constants
|
|||
! tblite method selection
|
||||
INTEGER, PARAMETER, PUBLIC :: gfn1xtb = 1, &
|
||||
gfn2xtb = 2, &
|
||||
ipea1xtb = 3
|
||||
ipea1xtb = 3, &
|
||||
gfn_tblite = 4
|
||||
|
||||
! tblite SCC mixer selection
|
||||
INTEGER, PARAMETER, PUBLIC :: tblite_scc_mixer_auto = 0, &
|
||||
tblite_scc_mixer_tblite = 1, &
|
||||
tblite_scc_mixer_cp2k = 2, &
|
||||
tblite_scc_mixer_none = 3
|
||||
|
||||
! SMEAGOL interface
|
||||
INTEGER, PARAMETER, PUBLIC :: smeagol_bulklead_leftright = 1, &
|
||||
|
|
|
|||
|
|
@ -337,7 +337,6 @@ CONTAINS
|
|||
CALL keyword_create(keyword, __LOCATION__, name="alpha", &
|
||||
description="alpha parameter associated with Ewald (EWALD|PME|SPME). "// &
|
||||
"Recommended for small systems is alpha = 3.5 / r_cut. "// &
|
||||
"For Tight-binding application a recommended value is alpha = 1.0. "// &
|
||||
"Tuning alpha, r_cut and gmax is needed to obtain O(N**1.5) scaling for ewald.", &
|
||||
usage="alpha .30", &
|
||||
default_r_val=cp_unit_to_cp2k(value=0.35_dp, unit_str="angstrom^-1"), &
|
||||
|
|
|
|||
|
|
@ -16,14 +16,10 @@ MODULE input_cp2k_tb
|
|||
Asgeirsson2017, Bannwarth2019, Caldeweyher2017, Caldeweyher2020, Elstner1998, Grimme2017, &
|
||||
Hu2007, Porezag1995, Seifert1996, Zhechkov2005
|
||||
USE eeq_input, ONLY: create_eeq_control_section
|
||||
USE input_constants, ONLY: dispersion_d2,&
|
||||
dispersion_d3,&
|
||||
dispersion_d3bj,&
|
||||
dispersion_uff,&
|
||||
gfn1xtb,&
|
||||
gfn2xtb,&
|
||||
ipea1xtb,&
|
||||
slater
|
||||
USE input_constants, ONLY: &
|
||||
dispersion_d2, dispersion_d3, dispersion_d3bj, dispersion_uff, gfn1xtb, gfn2xtb, &
|
||||
gfn_tblite, ipea1xtb, slater, tblite_scc_mixer_auto, tblite_scc_mixer_cp2k, &
|
||||
tblite_scc_mixer_none, tblite_scc_mixer_tblite
|
||||
USE input_cp2k_mm, ONLY: create_GENPOT_section
|
||||
USE input_keyword_types, ONLY: keyword_create,&
|
||||
keyword_release,&
|
||||
|
|
@ -83,8 +79,12 @@ CONTAINS
|
|||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="do_ewald", &
|
||||
description="Use Ewald type method instead of direct sum for Coulomb interaction", &
|
||||
usage="DO_EWALD", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
|
||||
description="Deprecated debug override for the DFTB Ewald treatment. "// &
|
||||
"By default the setting is inferred from SUBSYS/CELL/PERIODIC. "// &
|
||||
"If set to TRUE, the DFT/POISSON section must use a periodic Poisson solver.", &
|
||||
usage="DO_EWALD", default_l_val=.FALSE., lone_keyword_l_val=.TRUE., &
|
||||
deprecation_notice="Use SUBSYS/CELL/PERIODIC to select periodicity. "// &
|
||||
"DO_EWALD is retained only as a debug override for the DFTB Ewald path.")
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
|
|
@ -116,6 +116,9 @@ CONTAINS
|
|||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL add_tb_scc_mixer_keywords(section, "CP2K-internal DFTB", &
|
||||
"AUTO keeps the existing CP2K density/SCF mixing path for DFTB.")
|
||||
|
||||
END SUBROUTINE create_dftb_control_section
|
||||
|
||||
! **************************************************************************************************
|
||||
|
|
@ -153,14 +156,31 @@ CONTAINS
|
|||
|
||||
NULLIFY (keyword)
|
||||
CALL keyword_create(keyword, __LOCATION__, name="GFN_TYPE", &
|
||||
description="Which GFN xTB method should be used.", &
|
||||
usage="GFN_TYPE 1", default_i_val=1)
|
||||
description="Selects the xTB backend. GFN_TYPE 1 uses the CP2K-internal GFN1-xTB "// &
|
||||
"implementation. GFN_TYPE TBLITE uses the tblite backend and requires an XTB/TBLITE "// &
|
||||
"section, where the actual tblite method is selected.", &
|
||||
usage="GFN_TYPE (0|1|TBLITE)", &
|
||||
enum_c_vals=s2a("0", "1", "TBLITE"), &
|
||||
enum_i_vals=[0, gfn1xtb, gfn_tblite], &
|
||||
enum_desc=s2a("Use the CP2K-internal GFN0-xTB implementation.", &
|
||||
"Use the CP2K-internal GFN1-xTB implementation.", &
|
||||
"Use the CP2K/tblite backend; requires XTB/TBLITE."), &
|
||||
default_i_val=gfn1xtb)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL add_tb_scc_mixer_keywords(section, "CP2K-internal xTB", &
|
||||
"AUTO keeps the CP2K charge mixer for CP2K-internal xTB.")
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="DO_EWALD", &
|
||||
description="Use Ewald type method instead of direct sum for Coulomb interaction", &
|
||||
usage="DO_EWALD", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
|
||||
description="Deprecated debug override for the xTB Ewald treatment. "// &
|
||||
"By default the setting is inferred from SUBSYS/CELL/PERIODIC. "// &
|
||||
"If set to TRUE for CP2K-internal xTB, the DFT/POISSON section must use a periodic "// &
|
||||
"Poisson solver. For CP2K/tblite, the periodic long-range treatment is performed "// &
|
||||
"inside tblite.", &
|
||||
usage="DO_EWALD", default_l_val=.FALSE., lone_keyword_l_val=.TRUE., &
|
||||
deprecation_notice="Use SUBSYS/CELL/PERIODIC to select periodicity. "// &
|
||||
"DO_EWALD is retained only as a debug override for the CP2K-internal xTB Ewald path.")
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
|
|
@ -552,16 +572,21 @@ CONTAINS
|
|||
TYPE(section_type), POINTER :: section
|
||||
|
||||
TYPE(keyword_type), POINTER :: keyword
|
||||
TYPE(section_type), POINTER :: subsection
|
||||
|
||||
CPASSERT(.NOT. ASSOCIATED(section))
|
||||
CALL section_create(section, __LOCATION__, name="TBLITE", &
|
||||
description="Section used to specify options for an xTB computation using tblite.", &
|
||||
n_keywords=1, n_subsections=0, repeats=.FALSE., citations=[Caldeweyher2017, Caldeweyher2020, &
|
||||
description="Section used to specify options for an xTB computation using tblite. "// &
|
||||
"This section is required when XTB/GFN_TYPE is set to TBLITE. "// &
|
||||
"Periodicity follows SUBSYS/CELL/PERIODIC; the deprecated XTB/DO_EWALD keyword "// &
|
||||
"is read consistently with CP2K-internal xTB for diagnostics/debugging.", &
|
||||
n_keywords=1, n_subsections=1, repeats=.FALSE., citations=[Caldeweyher2017, Caldeweyher2020, &
|
||||
Asgeirsson2017, Grimme2017, Bannwarth2019])
|
||||
|
||||
NULLIFY (keyword)
|
||||
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
|
||||
description="activates the execution via tblite", &
|
||||
description="Marks the tblite options section as present. The tblite backend is selected "// &
|
||||
"with XTB/GFN_TYPE TBLITE.", &
|
||||
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
|
@ -579,6 +604,156 @@ CONTAINS
|
|||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL add_tb_scc_mixer_keywords(section, "CP2K/tblite xTB", &
|
||||
"AUTO uses tblite's internal SCC mixer.")
|
||||
|
||||
NULLIFY (keyword)
|
||||
CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_CLI", &
|
||||
description="Enable the native tblite CLI reference check. If true, the "// &
|
||||
"XTB/TBLITE/REFERENCE_CLI section must be present. The reference check is also "// &
|
||||
"enabled whenever that section is present. This diagnostic path is skipped for "// &
|
||||
"CP2K multi-k-point calculations, because the native tblite CLI does not reproduce "// &
|
||||
"CP2K KPOINTS sampling.", &
|
||||
usage="REFERENCE_CLI", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
NULLIFY (subsection)
|
||||
CALL create_xtb_reference_cli_section(subsection)
|
||||
CALL section_add_subsection(section, subsection)
|
||||
CALL section_release(subsection)
|
||||
|
||||
END SUBROUTINE create_xtb_tblite_section
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Adds common SCC-mixer keywords for TB methods.
|
||||
!> \param section section receiving the keywords
|
||||
!> \param TARGET method/path description for the manual text
|
||||
!> \param auto_desc AUTO behavior for this section
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE add_tb_scc_mixer_keywords(section, TARGET, auto_desc)
|
||||
TYPE(section_type), POINTER :: section
|
||||
CHARACTER(LEN=*), INTENT(IN) :: target, auto_desc
|
||||
|
||||
TYPE(keyword_type), POINTER :: keyword
|
||||
|
||||
NULLIFY (keyword)
|
||||
CALL keyword_create(keyword, __LOCATION__, name="SCC_MIXER", &
|
||||
description="Selects the SCC variable mixer for "//TARGET//" calculations. "// &
|
||||
auto_desc//" TBLITE forces the tblite modified Broyden SCC mixer, CP2K forces CP2K "// &
|
||||
"charge mixing, and NONE updates SCC variables without mixing.", &
|
||||
usage="SCC_MIXER (AUTO|TBLITE|CP2K|NONE)", &
|
||||
enum_c_vals=s2a("AUTO", "TBLITE", "CP2K", "NONE"), &
|
||||
enum_i_vals=[tblite_scc_mixer_auto, tblite_scc_mixer_tblite, &
|
||||
tblite_scc_mixer_cp2k, tblite_scc_mixer_none], &
|
||||
enum_desc=s2a("Default method-dependent choice.", &
|
||||
"Use the tblite modified Broyden SCC mixer.", &
|
||||
"Use CP2K charge mixing for SCC variables.", &
|
||||
"Do not mix SCC variables; for debugging."), &
|
||||
default_i_val=tblite_scc_mixer_auto)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="TBLITE_MIXER_DAMPING", &
|
||||
description="Damping parameter for the tblite modified Broyden SCC mixer. "// &
|
||||
"Only active when the effective SCC mixer is TBLITE, either explicitly or via AUTO. "// &
|
||||
"The iteration limit is taken from DFT/SCF/MAX_SCF.", &
|
||||
usage="TBLITE_MIXER_DAMPING 0.4", default_r_val=0.4_dp)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
END SUBROUTINE add_tb_scc_mixer_keywords
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Creates the &REFERENCE_CLI section used to compare against native tblite.
|
||||
!> \param section the section to create
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE create_xtb_reference_cli_section(section)
|
||||
TYPE(section_type), POINTER :: section
|
||||
|
||||
TYPE(keyword_type), POINTER :: keyword
|
||||
|
||||
CPASSERT(.NOT. ASSOCIATED(section))
|
||||
CALL section_create(section, __LOCATION__, name="REFERENCE_CLI", &
|
||||
description="Run the native tblite command line interface as a reference "// &
|
||||
"for CP2K/tblite energies, nuclear gradients, and optionally virials. "// &
|
||||
"The section is a lone section: if it is present, the reference check is enabled.", &
|
||||
n_keywords=1, n_subsections=0, repeats=.FALSE.)
|
||||
|
||||
NULLIFY (keyword)
|
||||
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
|
||||
description="Activates the native tblite CLI reference check when the section is present.", &
|
||||
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="PROGRAM_NAME", &
|
||||
description="Executable name or path for the native tblite command line program.", &
|
||||
usage="PROGRAM_NAME tblite", n_var=1, type_of_var=char_t, default_c_val="tblite")
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="WORK_DIRECTORY", &
|
||||
description="Directory used for temporary native tblite CLI input and output files.", &
|
||||
usage="WORK_DIRECTORY .", n_var=1, type_of_var=char_t, default_c_val=".")
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="PREFIX", &
|
||||
description="Prefix for temporary native tblite CLI input and output files.", &
|
||||
usage="PREFIX tblite-reference", n_var=1, type_of_var=char_t, &
|
||||
default_c_val="tblite-reference")
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="KEEP_FILES", &
|
||||
description="Keep the temporary native tblite CLI input and output files.", &
|
||||
usage="KEEP_FILES T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="ERROR_LIMIT", &
|
||||
description="Tolerance for reporting reference CLI deviations.", &
|
||||
usage="ERROR_LIMIT 1.0E-8", default_r_val=1.0E-8_dp)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="STOP_ON_ERROR", &
|
||||
description="Abort if a checked reference CLI deviation exceeds ERROR_LIMIT.", &
|
||||
usage="STOP_ON_ERROR T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="CHECK_ENERGY", &
|
||||
description="Compare CP2K/tblite energy against the native tblite CLI energy.", &
|
||||
usage="CHECK_ENERGY T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="CHECK_FORCES", &
|
||||
description="Compare CP2K/tblite nuclear gradients against native tblite CLI gradients.", &
|
||||
usage="CHECK_FORCES T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="CHECK_VIRIAL", &
|
||||
description="Compare CP2K/tblite virial against the native tblite CLI virial.", &
|
||||
usage="CHECK_VIRIAL T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="ACCURACY", &
|
||||
description="Value passed to native tblite as --acc.", &
|
||||
usage="ACCURACY 1.0", default_r_val=1.0_dp)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="ITERATIONS", &
|
||||
description="Value passed to native tblite as --iterations.", &
|
||||
usage="ITERATIONS 250", default_i_val=250)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
END SUBROUTINE create_xtb_reference_cli_section
|
||||
|
||||
END MODULE input_cp2k_tb
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ MODULE kpoint_types
|
|||
CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'kpoint_types'
|
||||
|
||||
PUBLIC :: kpoint_type
|
||||
PUBLIC :: kpoint_create, kpoint_release, get_kpoint_info, set_kpoint_info
|
||||
PUBLIC :: kpoint_create, kpoint_release, kpoint_reset_initialization, get_kpoint_info, set_kpoint_info
|
||||
PUBLIC :: read_kpoint_section, write_kpoint_info
|
||||
PUBLIC :: kpoint_env_type, kpoint_env_p_type
|
||||
PUBLIC :: kpoint_env_create, get_kpoint_env
|
||||
|
|
@ -346,6 +346,116 @@ CONTAINS
|
|||
|
||||
END SUBROUTINE kpoint_release
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Reset all data derived from a concrete k-point initialization.
|
||||
!> Input options such as the scheme, grid, shifts and symmetry settings are kept.
|
||||
!> \param kpoint The kpoint environment
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE kpoint_reset_initialization(kpoint)
|
||||
TYPE(kpoint_type), INTENT(INOUT) :: kpoint
|
||||
|
||||
INTEGER :: i, ik, j
|
||||
|
||||
IF (ASSOCIATED(kpoint%xkp)) THEN
|
||||
DEALLOCATE (kpoint%xkp)
|
||||
NULLIFY (kpoint%xkp)
|
||||
END IF
|
||||
IF (ASSOCIATED(kpoint%wkp)) THEN
|
||||
DEALLOCATE (kpoint%wkp)
|
||||
NULLIFY (kpoint%wkp)
|
||||
END IF
|
||||
IF (ASSOCIATED(kpoint%kp_dist)) THEN
|
||||
DEALLOCATE (kpoint%kp_dist)
|
||||
NULLIFY (kpoint%kp_dist)
|
||||
END IF
|
||||
|
||||
CALL mpools_release(kpoint%mpools)
|
||||
CALL mpools_release(kpoint%mpools_aux_fit)
|
||||
|
||||
CALL cp_blacs_env_release(kpoint%blacs_env)
|
||||
CALL cp_blacs_env_release(kpoint%blacs_env_all)
|
||||
|
||||
CALL mp_para_env_release(kpoint%para_env)
|
||||
CALL mp_para_env_release(kpoint%para_env_kp)
|
||||
CALL mp_para_env_release(kpoint%para_env_inter_kp)
|
||||
|
||||
IF (ASSOCIATED(kpoint%cell_to_index)) THEN
|
||||
DEALLOCATE (kpoint%cell_to_index)
|
||||
NULLIFY (kpoint%cell_to_index)
|
||||
END IF
|
||||
IF (ASSOCIATED(kpoint%index_to_cell)) THEN
|
||||
DEALLOCATE (kpoint%index_to_cell)
|
||||
NULLIFY (kpoint%index_to_cell)
|
||||
END IF
|
||||
|
||||
IF (ASSOCIATED(kpoint%kp_env)) THEN
|
||||
DO ik = 1, SIZE(kpoint%kp_env)
|
||||
CALL kpoint_env_release(kpoint%kp_env(ik)%kpoint_env)
|
||||
END DO
|
||||
DEALLOCATE (kpoint%kp_env)
|
||||
NULLIFY (kpoint%kp_env)
|
||||
END IF
|
||||
|
||||
IF (ASSOCIATED(kpoint%kp_aux_env)) THEN
|
||||
DO ik = 1, SIZE(kpoint%kp_aux_env)
|
||||
CALL kpoint_env_release(kpoint%kp_aux_env(ik)%kpoint_env)
|
||||
END DO
|
||||
DEALLOCATE (kpoint%kp_aux_env)
|
||||
NULLIFY (kpoint%kp_aux_env)
|
||||
END IF
|
||||
|
||||
IF (ASSOCIATED(kpoint%kp_sym)) THEN
|
||||
DO ik = 1, SIZE(kpoint%kp_sym)
|
||||
CALL kpoint_sym_release(kpoint%kp_sym(ik)%kpoint_sym)
|
||||
END DO
|
||||
DEALLOCATE (kpoint%kp_sym)
|
||||
NULLIFY (kpoint%kp_sym)
|
||||
END IF
|
||||
|
||||
IF (ASSOCIATED(kpoint%atype)) THEN
|
||||
DEALLOCATE (kpoint%atype)
|
||||
NULLIFY (kpoint%atype)
|
||||
END IF
|
||||
IF (ASSOCIATED(kpoint%ibrot)) THEN
|
||||
DEALLOCATE (kpoint%ibrot)
|
||||
NULLIFY (kpoint%ibrot)
|
||||
END IF
|
||||
|
||||
IF (ASSOCIATED(kpoint%kind_rotmat)) THEN
|
||||
DO i = 1, SIZE(kpoint%kind_rotmat, 1)
|
||||
DO j = 1, SIZE(kpoint%kind_rotmat, 2)
|
||||
IF (ASSOCIATED(kpoint%kind_rotmat(i, j)%rmat)) THEN
|
||||
DEALLOCATE (kpoint%kind_rotmat(i, j)%rmat)
|
||||
NULLIFY (kpoint%kind_rotmat(i, j)%rmat)
|
||||
END IF
|
||||
END DO
|
||||
END DO
|
||||
DEALLOCATE (kpoint%kind_rotmat)
|
||||
NULLIFY (kpoint%kind_rotmat)
|
||||
END IF
|
||||
|
||||
IF (ASSOCIATED(kpoint%scf_diis_buffer)) THEN
|
||||
CALL qs_diis_b_release_kp(kpoint%scf_diis_buffer)
|
||||
DEALLOCATE (kpoint%scf_diis_buffer)
|
||||
NULLIFY (kpoint%scf_diis_buffer)
|
||||
END IF
|
||||
|
||||
NULLIFY (kpoint%sab_nl)
|
||||
NULLIFY (kpoint%sab_nl_nosym)
|
||||
|
||||
ALLOCATE (kpoint%cell_to_index(0:0, 0:0, 0:0))
|
||||
kpoint%cell_to_index(:, :, :) = 1
|
||||
|
||||
ALLOCATE (kpoint%index_to_cell(0:0, 0:0))
|
||||
kpoint%index_to_cell(:, :) = 0
|
||||
|
||||
kpoint%nkp = 0
|
||||
kpoint%nkp_groups = 0
|
||||
kpoint%kp_range = 0
|
||||
kpoint%iogrp = .FALSE.
|
||||
|
||||
END SUBROUTINE kpoint_reset_initialization
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Retrieve information from a kpoint environment
|
||||
!> \param kpoint The kpoint environment
|
||||
|
|
|
|||
|
|
@ -8,14 +8,22 @@
|
|||
! **************************************************************************************************
|
||||
MODULE qs_charge_mixing
|
||||
|
||||
USE kinds, ONLY: dp
|
||||
USE mathlib, ONLY: get_pseudo_inverse_svd
|
||||
USE message_passing, ONLY: mp_para_env_type
|
||||
USE qs_density_mixing_types, ONLY: broyden_mixing_nr,&
|
||||
gspace_mixing_nr,&
|
||||
mixing_storage_type,&
|
||||
multisecant_mixing_nr,&
|
||||
pulay_mixing_nr
|
||||
#if defined(__TBLITE)
|
||||
USE mctc_env, ONLY: error_type
|
||||
USE tblite_scf, ONLY: new_mixer
|
||||
#endif
|
||||
USE input_constants, ONLY: tblite_scc_mixer_auto, &
|
||||
tblite_scc_mixer_cp2k, &
|
||||
tblite_scc_mixer_none, &
|
||||
tblite_scc_mixer_tblite
|
||||
USE kinds, ONLY: dp
|
||||
USE mathlib, ONLY: get_pseudo_inverse_svd
|
||||
USE message_passing, ONLY: mp_para_env_type
|
||||
USE qs_density_mixing_types, ONLY: broyden_mixing_nr, &
|
||||
gspace_mixing_nr, &
|
||||
mixing_storage_type, &
|
||||
multisecant_mixing_nr, &
|
||||
pulay_mixing_nr
|
||||
#include "./base/base_uses.f90"
|
||||
|
||||
IMPLICIT NONE
|
||||
|
|
@ -24,40 +32,77 @@ MODULE qs_charge_mixing
|
|||
|
||||
CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_charge_mixing'
|
||||
|
||||
PUBLIC :: charge_mixing
|
||||
PUBLIC :: charge_mixing, charge_mixing_scc_error
|
||||
|
||||
REAL(KIND=dp), PARAMETER, PRIVATE :: tblite_scc_pconv = 2.0E-5_dp
|
||||
|
||||
CONTAINS
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Driver for the charge mixing, calls the proper routine given the requested method
|
||||
!> \brief Driver for TB SCC variable mixing, calls the requested method.
|
||||
!> \param mixing_method ...
|
||||
!> \param mixing_store ...
|
||||
!> \param charges ...
|
||||
!> \param para_env ...
|
||||
!> \param iter_count ...
|
||||
!> \param scc_mixer ...
|
||||
!> \param tblite_mixer_damping ...
|
||||
!> \param tblite_mixer_memory ...
|
||||
!> \par History
|
||||
!> \author JGH
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE charge_mixing(mixing_method, mixing_store, charges, para_env, iter_count)
|
||||
SUBROUTINE charge_mixing(mixing_method, mixing_store, charges, para_env, iter_count, &
|
||||
scc_mixer, tblite_mixer_damping, tblite_mixer_memory)
|
||||
INTEGER, INTENT(IN) :: mixing_method
|
||||
TYPE(mixing_storage_type), POINTER :: mixing_store
|
||||
REAL(KIND=dp), DIMENSION(:, :), INTENT(INOUT) :: charges
|
||||
TYPE(mp_para_env_type), POINTER :: para_env
|
||||
INTEGER, INTENT(IN) :: iter_count
|
||||
INTEGER, INTENT(IN), OPTIONAL :: scc_mixer
|
||||
REAL(KIND=dp), INTENT(IN), OPTIONAL :: tblite_mixer_damping
|
||||
INTEGER, INTENT(IN), OPTIONAL :: tblite_mixer_memory
|
||||
|
||||
CHARACTER(len=*), PARAMETER :: routineN = 'charge_mixing'
|
||||
|
||||
INTEGER :: handle, ia, ii, imin, inow, nbuffer, ns, &
|
||||
INTEGER :: effective_scc_mixer, handle, ia, ii, &
|
||||
imin, inow, mixer_memory, nbuffer, ns, &
|
||||
nvec
|
||||
REAL(dp) :: alpha
|
||||
REAL(dp) :: alpha, mixer_damping
|
||||
|
||||
CALL timeset(routineN, handle)
|
||||
|
||||
effective_scc_mixer = tblite_scc_mixer_cp2k
|
||||
IF (PRESENT(scc_mixer)) effective_scc_mixer = scc_mixer
|
||||
IF (ASSOCIATED(mixing_store)) mixing_store%tb_scc_mixer_error = 0.0_dp
|
||||
|
||||
SELECT CASE (effective_scc_mixer)
|
||||
CASE (tblite_scc_mixer_auto, tblite_scc_mixer_cp2k)
|
||||
! Use the regular CP2K SCC-variable mixing path below.
|
||||
CASE (tblite_scc_mixer_tblite)
|
||||
CPASSERT(ASSOCIATED(mixing_store))
|
||||
mixer_damping = 0.4_dp
|
||||
IF (PRESENT(tblite_mixer_damping)) mixer_damping = tblite_mixer_damping
|
||||
mixer_memory = MAX(1, mixing_store%nbuffer)
|
||||
IF (PRESENT(tblite_mixer_memory)) mixer_memory = MAX(1, tblite_mixer_memory)
|
||||
CALL tblite_charge_mixing(mixing_store, charges, para_env, iter_count, &
|
||||
mixer_damping, mixer_memory)
|
||||
CALL timestop(handle)
|
||||
RETURN
|
||||
CASE (tblite_scc_mixer_none)
|
||||
IF (ASSOCIATED(mixing_store)) mixing_store%iter_method = "NoMix"
|
||||
CALL timestop(handle)
|
||||
RETURN
|
||||
CASE DEFAULT
|
||||
CPABORT("Unknown SCC mixer for TB charge mixing")
|
||||
END SELECT
|
||||
|
||||
IF (mixing_method >= gspace_mixing_nr) THEN
|
||||
CPASSERT(ASSOCIATED(mixing_store))
|
||||
mixing_store%ncall = mixing_store%ncall + 1
|
||||
ns = SIZE(charges, 2)
|
||||
ns = MIN(ns, mixing_store%max_shell)
|
||||
IF (ns > mixing_store%max_shell) THEN
|
||||
CPABORT("Mixing storage too small for TB SCC variables")
|
||||
END IF
|
||||
alpha = mixing_store%alpha
|
||||
nbuffer = mixing_store%nbuffer
|
||||
inow = MOD(mixing_store%ncall - 1, nbuffer) + 1
|
||||
|
|
@ -104,6 +149,98 @@ CONTAINS
|
|||
|
||||
END SUBROUTINE charge_mixing
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Return the tblite SCC-mixer residual on the CP2K EPS_SCF scale.
|
||||
!> \param mixing_store ...
|
||||
!> \param eps_scf ...
|
||||
!> \return ...
|
||||
! **************************************************************************************************
|
||||
FUNCTION charge_mixing_scc_error(mixing_store, eps_scf) RESULT(mixer_error)
|
||||
TYPE(mixing_storage_type), POINTER :: mixing_store
|
||||
REAL(KIND=dp), INTENT(IN) :: eps_scf
|
||||
REAL(KIND=dp) :: mixer_error
|
||||
|
||||
mixer_error = 0.0_dp
|
||||
IF (.NOT. ASSOCIATED(mixing_store)) RETURN
|
||||
IF (mixing_store%tb_scc_mixer_step <= 1) RETURN
|
||||
|
||||
IF (eps_scf > 0.0_dp) THEN
|
||||
mixer_error = eps_scf*mixing_store%tb_scc_mixer_error/tblite_scc_pconv
|
||||
ELSE
|
||||
mixer_error = mixing_store%tb_scc_mixer_error
|
||||
END IF
|
||||
|
||||
END FUNCTION charge_mixing_scc_error
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief TBLite modified-Broyden mixing for a complete TB SCC-variable vector.
|
||||
!> \param mixing_store ...
|
||||
!> \param charges ...
|
||||
!> \param para_env ...
|
||||
!> \param iter_count ...
|
||||
!> \param damping ...
|
||||
!> \param memory ...
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE tblite_charge_mixing(mixing_store, charges, para_env, iter_count, damping, memory)
|
||||
TYPE(mixing_storage_type), POINTER :: mixing_store
|
||||
REAL(KIND=dp), DIMENSION(:, :), INTENT(INOUT) :: charges
|
||||
TYPE(mp_para_env_type), POINTER :: para_env
|
||||
INTEGER, INTENT(IN) :: iter_count, memory
|
||||
REAL(KIND=dp), INTENT(IN) :: damping
|
||||
|
||||
#if defined(__TBLITE)
|
||||
TYPE(error_type), ALLOCATABLE :: error
|
||||
#endif
|
||||
INTEGER :: natom, ndim, ns
|
||||
LOGICAL :: reset_mixer
|
||||
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: qvec
|
||||
|
||||
MARK_USED(para_env)
|
||||
|
||||
natom = SIZE(charges, 1)
|
||||
ns = SIZE(charges, 2)
|
||||
ndim = natom*ns
|
||||
ALLOCATE (qvec(ndim))
|
||||
qvec(:) = RESHAPE(charges, [ndim])
|
||||
reset_mixer = (iter_count == 1) .OR. (mixing_store%tb_scc_mixer_step == 0) .OR. &
|
||||
(mixing_store%tb_scc_mixer_natom /= natom) .OR. &
|
||||
(mixing_store%tb_scc_mixer_ns /= ns) .OR. &
|
||||
(mixing_store%tb_scc_mixer_memory /= memory)
|
||||
mixing_store%tb_scc_mixer_error = 0.0_dp
|
||||
|
||||
#if defined(__TBLITE)
|
||||
IF (reset_mixer) THEN
|
||||
IF (ALLOCATED(mixing_store%tb_scc_mixer)) DEALLOCATE (mixing_store%tb_scc_mixer)
|
||||
CALL new_mixer(mixing_store%tb_scc_mixer, memory, ndim, damping)
|
||||
CALL mixing_store%tb_scc_mixer%set(qvec)
|
||||
mixing_store%tb_scc_mixer_natom = natom
|
||||
mixing_store%tb_scc_mixer_ns = ns
|
||||
mixing_store%tb_scc_mixer_memory = memory
|
||||
mixing_store%tb_scc_mixer_step = 1
|
||||
mixing_store%iter_method = "NoMix"
|
||||
RETURN
|
||||
END IF
|
||||
|
||||
CPASSERT(ALLOCATED(mixing_store%tb_scc_mixer))
|
||||
CALL mixing_store%tb_scc_mixer%diff(qvec)
|
||||
mixing_store%tb_scc_mixer_error = REAL(mixing_store%tb_scc_mixer%get_error(), KIND=dp)
|
||||
CALL mixing_store%tb_scc_mixer%next(error)
|
||||
IF (ALLOCATED(error)) CPABORT("tblite SCC mixer failed")
|
||||
CALL mixing_store%tb_scc_mixer%get(qvec)
|
||||
charges = RESHAPE(qvec, SHAPE(charges))
|
||||
mixing_store%tb_scc_mixer_step = mixing_store%tb_scc_mixer_step + 1
|
||||
mixing_store%iter_method = "TBLITE"
|
||||
#else
|
||||
MARK_USED(mixing_store)
|
||||
MARK_USED(charges)
|
||||
MARK_USED(iter_count)
|
||||
MARK_USED(damping)
|
||||
MARK_USED(memory)
|
||||
CPABORT("SCC_MIXER TBLITE requires CP2K to be built with tblite")
|
||||
#endif
|
||||
|
||||
END SUBROUTINE tblite_charge_mixing
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Simple charge mixing
|
||||
!> \param mixing_store ...
|
||||
|
|
@ -190,7 +327,7 @@ CONTAINS
|
|||
maxw = 100000.0_dp
|
||||
wfac = 0.01_dp
|
||||
|
||||
mixing_store%wbroy(nv) = SUM(dq_now(:, :)**2)
|
||||
mixing_store%wbroy(nv) = SUM(dq_now(:, 1:ns)**2)
|
||||
CALL para_env%sum(mixing_store%wbroy(nv))
|
||||
mixing_store%wbroy(nv) = SQRT(mixing_store%wbroy(nv))
|
||||
IF (mixing_store%wbroy(nv) > (wfac/maxw)) THEN
|
||||
|
|
@ -201,15 +338,16 @@ CONTAINS
|
|||
IF (mixing_store%wbroy(nv) < minw) mixing_store%wbroy(nv) = minw
|
||||
|
||||
! dfbroy
|
||||
mixing_store%dfbroy(:, :, nv) = dq_now(:, :) - dq_last(:, :)
|
||||
wdf = SUM(mixing_store%dfbroy(:, :, nv)**2)
|
||||
mixing_store%dfbroy(:, :, nv) = 0.0_dp
|
||||
mixing_store%dfbroy(:, 1:ns, nv) = dq_now(:, 1:ns) - dq_last(:, 1:ns)
|
||||
wdf = SUM(mixing_store%dfbroy(:, 1:ns, nv)**2)
|
||||
CALL para_env%sum(wdf)
|
||||
wdf = 1.0_dp/SQRT(wdf)
|
||||
mixing_store%dfbroy(:, :, nv) = wdf*mixing_store%dfbroy(:, :, nv)
|
||||
mixing_store%dfbroy(:, 1:ns, nv) = wdf*mixing_store%dfbroy(:, 1:ns, nv)
|
||||
|
||||
! abroy matrix
|
||||
DO i = 1, nv
|
||||
wfac = SUM(mixing_store%dfbroy(:, :, i)*mixing_store%dfbroy(:, :, nv))
|
||||
wfac = SUM(mixing_store%dfbroy(:, 1:ns, i)*mixing_store%dfbroy(:, 1:ns, nv))
|
||||
CALL para_env%sum(wfac)
|
||||
mixing_store%abroy(i, nv) = wfac
|
||||
mixing_store%abroy(nv, i) = wfac
|
||||
|
|
@ -218,7 +356,7 @@ CONTAINS
|
|||
! broyden matrices
|
||||
ALLOCATE (amat(nv, nv), beta(nv, nv), cvec(nv), gammab(nv))
|
||||
DO i = 1, nv
|
||||
wfac = SUM(mixing_store%dfbroy(:, :, i)*dq_now(:, :))
|
||||
wfac = SUM(mixing_store%dfbroy(:, 1:ns, i)*dq_now(:, 1:ns))
|
||||
CALL para_env%sum(wfac)
|
||||
cvec(i) = mixing_store%wbroy(i)*wfac
|
||||
END DO
|
||||
|
|
@ -235,7 +373,9 @@ CONTAINS
|
|||
gammab(1:nv) = MATMUL(cvec(1:nv), amat(1:nv, 1:nv))
|
||||
|
||||
! build ubroy
|
||||
mixing_store%ubroy(:, :, nv) = alpha*mixing_store%dfbroy(:, :, nv) + wdf*(q_now(:, :) - q_last(:, :))
|
||||
mixing_store%ubroy(:, :, nv) = 0.0_dp
|
||||
mixing_store%ubroy(:, 1:ns, nv) = alpha*mixing_store%dfbroy(:, 1:ns, nv) + &
|
||||
wdf*(q_now(:, 1:ns) - q_last(:, 1:ns))
|
||||
|
||||
charges = 0.0_dp
|
||||
DO ia = 1, mixing_store%nat_local
|
||||
|
|
|
|||
|
|
@ -12,27 +12,30 @@
|
|||
!> \author fawzi
|
||||
! **************************************************************************************************
|
||||
MODULE qs_density_mixing_types
|
||||
USE ao_util, ONLY: exp_radius
|
||||
USE input_constants, ONLY: broy_mix,&
|
||||
direct_p_mix,&
|
||||
gaussian,&
|
||||
kerker_mix,&
|
||||
multisec_mix,&
|
||||
no_mix,&
|
||||
pulay_mix
|
||||
USE input_keyword_types, ONLY: keyword_create,&
|
||||
keyword_release,&
|
||||
keyword_type
|
||||
USE input_section_types, ONLY: section_add_keyword,&
|
||||
section_create,&
|
||||
section_type,&
|
||||
section_vals_type,&
|
||||
section_vals_val_get
|
||||
USE input_val_types, ONLY: real_t
|
||||
USE kinds, ONLY: default_string_length,&
|
||||
dp
|
||||
USE qs_rho_atom_types, ONLY: rho_atom_coeff
|
||||
USE string_utilities, ONLY: s2a
|
||||
#if defined(__TBLITE)
|
||||
USE tblite_scf, ONLY: mixer_type
|
||||
#endif
|
||||
USE ao_util, ONLY: exp_radius
|
||||
USE input_constants, ONLY: broy_mix, &
|
||||
direct_p_mix, &
|
||||
gaussian, &
|
||||
kerker_mix, &
|
||||
multisec_mix, &
|
||||
no_mix, &
|
||||
pulay_mix
|
||||
USE input_keyword_types, ONLY: keyword_create, &
|
||||
keyword_release, &
|
||||
keyword_type
|
||||
USE input_section_types, ONLY: section_add_keyword, &
|
||||
section_create, &
|
||||
section_type, &
|
||||
section_vals_type, &
|
||||
section_vals_val_get
|
||||
USE input_val_types, ONLY: real_t
|
||||
USE kinds, ONLY: default_string_length, &
|
||||
dp
|
||||
USE qs_rho_atom_types, ONLY: rho_atom_coeff
|
||||
USE string_utilities, ONLY: s2a
|
||||
#include "./base/base_uses.f90"
|
||||
|
||||
IMPLICIT NONE
|
||||
|
|
@ -74,6 +77,9 @@ MODULE qs_density_mixing_types
|
|||
REAL(KIND=dp), DIMENSION(:, :, :), POINTER :: fmat => NULL(), gmat => NULL(), pulay_matrix => NULL(), smat => NULL()
|
||||
!
|
||||
INTEGER :: nat_local = -1, max_shell = -1
|
||||
INTEGER :: tb_scc_mixer_memory = 0, tb_scc_mixer_natom = 0, &
|
||||
tb_scc_mixer_ns = 0, tb_scc_mixer_step = 0
|
||||
REAL(KIND=dp) :: tb_scc_mixer_error = 0.0_dp
|
||||
REAL(KIND=dp), DIMENSION(:, :, :), POINTER :: acharge => NULL()
|
||||
REAL(KIND=dp), DIMENSION(:, :, :), POINTER :: dacharge => NULL()
|
||||
REAL(KIND=dp), DIMENSION(:, :, :), POINTER :: dfbroy => NULL()
|
||||
|
|
@ -92,6 +98,9 @@ MODULE qs_density_mixing_types
|
|||
TYPE(rho_atom_coeff), DIMENSION(:, :, :), POINTER :: cpc_h_in_buffer => NULL(), cpc_s_in_buffer => NULL()
|
||||
TYPE(rho_atom_coeff), DIMENSION(:, :, :), POINTER :: cpc_h_res_buffer => NULL(), cpc_s_res_buffer => NULL()
|
||||
TYPE(rho_atom_coeff), DIMENSION(:, :, :), POINTER :: dcpc_h_in => NULL(), dcpc_s_in => NULL()
|
||||
#if defined(__TBLITE)
|
||||
CLASS(mixer_type), ALLOCATABLE :: tb_scc_mixer
|
||||
#endif
|
||||
END TYPE mixing_storage_type
|
||||
|
||||
CONTAINS
|
||||
|
|
@ -126,6 +135,11 @@ CONTAINS
|
|||
mixing_store%iter_method = "NoMix"
|
||||
mixing_store%max_g2 = 2._dp*ecut
|
||||
mixing_store%gmix_p = .FALSE.
|
||||
mixing_store%tb_scc_mixer_error = 0.0_dp
|
||||
mixing_store%tb_scc_mixer_memory = 0
|
||||
mixing_store%tb_scc_mixer_natom = 0
|
||||
mixing_store%tb_scc_mixer_ns = 0
|
||||
mixing_store%tb_scc_mixer_step = 0
|
||||
|
||||
NULLIFY (mixing_store%p_metric)
|
||||
NULLIFY (mixing_store%kerker_factor)
|
||||
|
|
@ -405,6 +419,11 @@ CONTAINS
|
|||
IF (ASSOCIATED(mixing_store%atlist)) THEN
|
||||
DEALLOCATE (mixing_store%atlist)
|
||||
END IF
|
||||
#if defined(__TBLITE)
|
||||
IF (ALLOCATED(mixing_store%tb_scc_mixer)) THEN
|
||||
DEALLOCATE (mixing_store%tb_scc_mixer)
|
||||
END IF
|
||||
#endif
|
||||
|
||||
IF (ASSOCIATED(mixing_store%delta_res)) THEN
|
||||
DO i = 1, SIZE(mixing_store%delta_res, 2)
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ MODULE qs_dftb_coulomb
|
|||
REAL(dp), PARAMETER :: tol_gamma = 1.e-4_dp
|
||||
! small real number
|
||||
REAL(dp), PARAMETER :: rtiny = 1.e-10_dp
|
||||
REAL(KIND=dp), PARAMETER, PRIVATE :: dftb_fd_deriv_step = 1.0e-3_dp
|
||||
|
||||
PUBLIC :: build_dftb_coulomb, gamma_rab_sr
|
||||
|
||||
|
|
@ -110,19 +111,23 @@ CONTAINS
|
|||
CHARACTER(len=*), PARAMETER :: routineN = 'build_dftb_coulomb'
|
||||
|
||||
INTEGER :: atom_i, atom_j, ewald_type, handle, i, ia, iac, iatom, ic, icol, ikind, img, &
|
||||
irow, is, jatom, jkind, natom, natorb_a, natorb_b, nimg, nkind, nmat
|
||||
irow, is, jatom, jkind, llm, lmaxi, lmaxj, n1, n2, natom, natorb_a, natorb_b, ngrd, &
|
||||
ngrdcut, nimg, nkind, nmat
|
||||
INTEGER, ALLOCATABLE, DIMENSION(:) :: atom_of_kind, kind_of
|
||||
INTEGER, DIMENSION(3) :: cellind, periodic
|
||||
INTEGER, DIMENSION(:, :, :), POINTER :: cell_to_index
|
||||
LOGICAL :: defined, do_ewald, do_gamma_stress, &
|
||||
found, hb_sr_damp, use_virial
|
||||
REAL(KIND=dp) :: alpha, ddr, deth, dgam, dr, drm, drp, &
|
||||
fi, ga, gb, gmat, gmij, hb_para, zeff
|
||||
LOGICAL :: defined, defined_a, defined_b, do_ewald, &
|
||||
do_gamma_stress, found, hb_sr_damp, &
|
||||
use_virial
|
||||
REAL(KIND=dp) :: alpha, background, ddr, deth, dgam, &
|
||||
dgrd, dr, drm, drp, fi, ga, gb, gmat, &
|
||||
gmij, gmij_virial, hb_para, zeff
|
||||
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: xgamma, zeffk
|
||||
REAL(KIND=dp), DIMENSION(0:3) :: eta_a, eta_b
|
||||
REAL(KIND=dp), DIMENSION(3) :: fij, rij
|
||||
REAL(KIND=dp), DIMENSION(:, :), POINTER :: dsblock, gmcharge, ksblock, pblock, &
|
||||
sblock
|
||||
REAL(KIND=dp), DIMENSION(3) :: drij, fij, rij
|
||||
REAL(KIND=dp), DIMENSION(:, :), POINTER :: dsblock, dsblock_vir, dsblockm_vir, &
|
||||
gmcharge, ksblock, pblock, sblock, &
|
||||
smatij, smatji
|
||||
REAL(KIND=dp), DIMENSION(:, :, :), POINTER :: dsint
|
||||
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
|
||||
TYPE(atprop_type), POINTER :: atprop
|
||||
|
|
@ -143,6 +148,7 @@ CONTAINS
|
|||
TYPE(qs_dftb_atom_type), POINTER :: dftb_kind, dftb_kind_a, dftb_kind_b
|
||||
TYPE(qs_dftb_pairpot_type), DIMENSION(:, :), &
|
||||
POINTER :: dftb_potential
|
||||
TYPE(qs_dftb_pairpot_type), POINTER :: dftb_param_ij, dftb_param_ji
|
||||
TYPE(qs_force_type), DIMENSION(:), POINTER :: force
|
||||
TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
|
||||
TYPE(sap_int_type), DIMENSION(:), POINTER :: sap_int
|
||||
|
|
@ -217,7 +223,7 @@ CONTAINS
|
|||
gmcharge(iatom, 1) = gmcharge(iatom, 1) + gmat*mcharge(jatom)
|
||||
END IF
|
||||
IF (calculate_forces .AND. (iatom /= jatom .OR. dr > 0.001_dp)) THEN
|
||||
ddr = 0.1_dp*dftb_potential(ikind, jkind)%dgrd
|
||||
ddr = dftb_fd_deriv_step*dftb_potential(ikind, jkind)%dgrd
|
||||
drp = dr + ddr
|
||||
drm = dr - ddr
|
||||
dgam = 0.5_dp*(gamma_rab_sr(drp, ga, gb, hb_para) - gamma_rab_sr(drm, ga, gb, hb_para))/ddr
|
||||
|
|
@ -294,15 +300,16 @@ CONTAINS
|
|||
|
||||
CALL para_env%sum(gmcharge(:, 1))
|
||||
|
||||
background = 0.0_dp
|
||||
IF (do_ewald) THEN
|
||||
! add self charge interaction and background charge contribution
|
||||
gmcharge(:, 1) = gmcharge(:, 1) - 2._dp*alpha*oorootpi*mcharge(:)
|
||||
IF (ANY(periodic(:) == 1)) THEN
|
||||
gmcharge(:, 1) = gmcharge(:, 1) - pi/alpha**2/deth
|
||||
background = pi/alpha**2/deth
|
||||
END IF
|
||||
END IF
|
||||
|
||||
energy%hartree = energy%hartree + 0.5_dp*SUM(mcharge(:)*gmcharge(:, 1))
|
||||
energy%hartree = energy%hartree + 0.5_dp*SUM(mcharge(:)*(gmcharge(:, 1) - background))
|
||||
IF (atprop%energy) THEN
|
||||
CALL get_qs_env(qs_env=qs_env, &
|
||||
local_particles=local_particles)
|
||||
|
|
@ -485,9 +492,55 @@ CONTAINS
|
|||
fij(i) = fi
|
||||
END DO
|
||||
IF (use_virial) THEN
|
||||
fi = 1.0_dp
|
||||
IF (iatom == jatom) fi = 0.5_dp
|
||||
CALL virial_pair_force(virial%pv_virial, fi, fij, rij)
|
||||
! The image-resolved overlap derivative blocks are matrix oriented. Rebuild the
|
||||
! atom-oriented derivative for the virial contraction, matching the Gamma path.
|
||||
fij = 0.0_dp
|
||||
CALL get_qs_kind(qs_kind_set(ikind), dftb_parameter=dftb_kind_a)
|
||||
CALL get_dftb_atom_param(dftb_kind_a, &
|
||||
defined=defined_a, lmax=lmaxi, natorb=natorb_a)
|
||||
CALL get_qs_kind(qs_kind_set(jkind), dftb_parameter=dftb_kind_b)
|
||||
CALL get_dftb_atom_param(dftb_kind_b, &
|
||||
defined=defined_b, lmax=lmaxj, natorb=natorb_b)
|
||||
IF (defined_a .AND. defined_b .AND. natorb_a > 0 .AND. natorb_b > 0) THEN
|
||||
dftb_param_ij => dftb_potential(ikind, jkind)
|
||||
dftb_param_ji => dftb_potential(jkind, ikind)
|
||||
ngrd = dftb_param_ij%ngrd
|
||||
ngrdcut = dftb_param_ij%ngrdcut
|
||||
dgrd = dftb_param_ij%dgrd
|
||||
ddr = dgrd*dftb_fd_deriv_step
|
||||
CPASSERT(dftb_param_ij%llm == dftb_param_ji%llm)
|
||||
llm = dftb_param_ij%llm
|
||||
smatij => dftb_param_ij%smat
|
||||
smatji => dftb_param_ji%smat
|
||||
dr = SQRT(SUM(rij(:)**2))
|
||||
IF (NINT(dr/dgrd) <= ngrdcut .AND. dr > 1.e-6_dp) THEN
|
||||
n1 = natorb_a
|
||||
n2 = natorb_b
|
||||
ALLOCATE (dsblock_vir(n1, n2), dsblockm_vir(n1, n2))
|
||||
gmij_virial = 0.5_dp*(gmcharge(iatom, 1) + gmcharge(jatom, 1))
|
||||
DO i = 1, 3
|
||||
dsblock_vir = 0._dp
|
||||
dsblockm_vir = 0._dp
|
||||
drij = rij
|
||||
drij(i) = rij(i) - ddr
|
||||
CALL compute_block_sk(dsblockm_vir, smatij, smatji, drij, ngrd, ngrdcut, dgrd, &
|
||||
llm, lmaxi, lmaxj, iatom, iatom)
|
||||
drij(i) = rij(i) + ddr
|
||||
CALL compute_block_sk(dsblock_vir, smatij, smatji, drij, ngrd, ngrdcut, dgrd, &
|
||||
llm, lmaxi, lmaxj, iatom, iatom)
|
||||
dsblock_vir = (dsblock_vir - dsblockm_vir)/(2.0_dp*ddr)
|
||||
IF (irow == iatom) THEN
|
||||
fij(i) = 2.0_dp*gmij_virial*SUM(pblock*dsblock_vir)
|
||||
ELSE
|
||||
fij(i) = 2.0_dp*gmij_virial*SUM(TRANSPOSE(pblock)*dsblock_vir)
|
||||
END IF
|
||||
END DO
|
||||
DEALLOCATE (dsblock_vir, dsblockm_vir)
|
||||
fi = 1.0_dp
|
||||
IF (iatom == jatom) fi = 0.5_dp
|
||||
CALL virial_pair_force(virial%pv_virial, fi, fij, rij)
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
END DO
|
||||
|
|
@ -694,7 +747,7 @@ CONTAINS
|
|||
ngrd = dftb_param_ij%ngrd
|
||||
ngrdcut = dftb_param_ij%ngrdcut
|
||||
dgrd = dftb_param_ij%dgrd
|
||||
ddr = dgrd*0.1_dp
|
||||
ddr = dgrd*dftb_fd_deriv_step
|
||||
CPASSERT(dftb_param_ij%llm == dftb_param_ji%llm)
|
||||
llm = dftb_param_ij%llm
|
||||
smatij => dftb_param_ij%smat
|
||||
|
|
@ -738,4 +791,3 @@ CONTAINS
|
|||
END SUBROUTINE dftb_dsint_list
|
||||
|
||||
END MODULE qs_dftb_coulomb
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ MODULE qs_dftb_matrices
|
|||
cp_print_key_should_output,&
|
||||
cp_print_key_unit_nr
|
||||
USE efield_tb_methods, ONLY: efield_tb_matrix
|
||||
USE input_constants, ONLY: tblite_scc_mixer_auto
|
||||
USE input_section_types, ONLY: section_vals_get_subs_vals,&
|
||||
section_vals_type,&
|
||||
section_vals_val_get
|
||||
|
|
@ -44,6 +45,7 @@ MODULE qs_dftb_matrices
|
|||
USE mulliken, ONLY: mulliken_charges
|
||||
USE particle_methods, ONLY: get_particle_set
|
||||
USE particle_types, ONLY: particle_type
|
||||
USE qs_charge_mixing, ONLY: charge_mixing
|
||||
USE qs_dftb_coulomb, ONLY: build_dftb_coulomb
|
||||
USE qs_dftb_types, ONLY: qs_dftb_atom_type,&
|
||||
qs_dftb_pairpot_type
|
||||
|
|
@ -71,6 +73,7 @@ MODULE qs_dftb_matrices
|
|||
neighbor_list_set_p_type
|
||||
USE qs_rho_types, ONLY: qs_rho_get,&
|
||||
qs_rho_type
|
||||
USE qs_scf_types, ONLY: qs_scf_env_type
|
||||
USE virial_methods, ONLY: virial_pair_force
|
||||
USE virial_types, ONLY: virial_type
|
||||
#include "./base/base_uses.f90"
|
||||
|
|
@ -83,6 +86,7 @@ MODULE qs_dftb_matrices
|
|||
PRIVATE
|
||||
|
||||
CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_dftb_matrices'
|
||||
REAL(KIND=dp), PARAMETER, PRIVATE :: dftb_fd_deriv_step = 1.0e-3_dp
|
||||
|
||||
PUBLIC :: build_dftb_matrices, build_dftb_ks_matrix, build_dftb_overlap
|
||||
|
||||
|
|
@ -250,7 +254,7 @@ CONTAINS
|
|||
ngrd = dftb_param_ij%ngrd
|
||||
ngrdcut = dftb_param_ij%ngrdcut
|
||||
dgrd = dftb_param_ij%dgrd
|
||||
ddr = dgrd*0.1_dp
|
||||
ddr = dgrd*dftb_fd_deriv_step
|
||||
CPASSERT(dftb_param_ij%llm == dftb_param_ji%llm)
|
||||
llm = dftb_param_ij%llm
|
||||
fmatij => dftb_param_ij%fmat
|
||||
|
|
@ -496,6 +500,7 @@ CONTAINS
|
|||
ispin, natom, nkind, nspins, &
|
||||
output_unit
|
||||
REAL(KIND=dp) :: pc_ener, qmmm_el, zeff
|
||||
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :) :: mix_charge
|
||||
REAL(KIND=dp), DIMENSION(:), POINTER :: mcharge, occupation_numbers
|
||||
REAL(KIND=dp), DIMENSION(:, :), POINTER :: charges
|
||||
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
|
||||
|
|
@ -511,11 +516,12 @@ CONTAINS
|
|||
TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
|
||||
TYPE(qs_ks_env_type), POINTER :: ks_env
|
||||
TYPE(qs_rho_type), POINTER :: rho
|
||||
TYPE(qs_scf_env_type), POINTER :: scf_env
|
||||
TYPE(section_vals_type), POINTER :: scf_section
|
||||
|
||||
CALL timeset(routineN, handle)
|
||||
NULLIFY (dft_control, logger, scf_section, matrix_p, particle_set, ks_env, &
|
||||
ks_matrix, rho, energy)
|
||||
ks_matrix, rho, energy, scf_env)
|
||||
logger => cp_get_default_logger()
|
||||
CPASSERT(ASSOCIATED(qs_env))
|
||||
|
||||
|
|
@ -569,6 +575,20 @@ CONTAINS
|
|||
END DO
|
||||
DEALLOCATE (charges)
|
||||
|
||||
IF ((.NOT. dft_control%qs_control%do_ls_scf) .AND. &
|
||||
(dft_control%qs_control%dftb_control%tblite_scc_mixer /= tblite_scc_mixer_auto)) THEN
|
||||
CALL get_qs_env(qs_env=qs_env, scf_env=scf_env)
|
||||
ALLOCATE (mix_charge(SIZE(mcharge), 1))
|
||||
mix_charge(:, 1) = mcharge(:)
|
||||
CALL charge_mixing(scf_env%mixing_method, scf_env%mixing_store, &
|
||||
mix_charge, para_env, scf_env%iter_count, &
|
||||
scc_mixer=dft_control%qs_control%dftb_control%tblite_scc_mixer, &
|
||||
tblite_mixer_damping=dft_control%qs_control%dftb_control%tblite_mixer_damping, &
|
||||
tblite_mixer_memory=qs_env%scf_control%max_scf)
|
||||
mcharge(:) = mix_charge(:, 1)
|
||||
DEALLOCATE (mix_charge)
|
||||
END IF
|
||||
|
||||
CALL build_dftb_coulomb(qs_env, ks_matrix, rho, mcharge, energy, &
|
||||
calculate_forces, just_energy)
|
||||
|
||||
|
|
@ -747,7 +767,7 @@ CONTAINS
|
|||
ngrd = dftb_param_ij%ngrd
|
||||
ngrdcut = dftb_param_ij%ngrdcut
|
||||
dgrd = dftb_param_ij%dgrd
|
||||
ddr = dgrd*0.1_dp
|
||||
ddr = dgrd*dftb_fd_deriv_step
|
||||
CPASSERT(dftb_param_ij%llm == dftb_param_ji%llm)
|
||||
llm = dftb_param_ij%llm
|
||||
smatij => dftb_param_ij%smat
|
||||
|
|
@ -1029,4 +1049,3 @@ CONTAINS
|
|||
END SUBROUTINE setup_matrices2
|
||||
|
||||
END MODULE qs_dftb_matrices
|
||||
|
||||
|
|
|
|||
|
|
@ -983,7 +983,7 @@ CONTAINS
|
|||
REAL(KIND=dp), INTENT(IN) :: rab, rcovab, k1
|
||||
REAL(KIND=dp), INTENT(OUT) :: cnab, dcnab
|
||||
|
||||
REAL(KIND=dp) :: dfz, ee, fz, rr
|
||||
REAL(KIND=dp) :: dfz, ee, ff, fz, rr
|
||||
|
||||
! covalent distance in Bohr
|
||||
rr = rcovab/rab
|
||||
|
|
@ -994,8 +994,9 @@ CONTAINS
|
|||
! force the function to zero using a second step function
|
||||
fz = 0.5_dp*(1.0_dp - TANH(rab - 2.0_dp*rcovab))
|
||||
dfz = 0.5_dp*((TANH(rab - 2.0_dp*rcovab))**2 - 1.0_dp)
|
||||
cnab = 1.0_dp/(1.0_dp + ee)*fz
|
||||
dcnab = -cnab*cnab*k1*rr/rab*ee + 1.0_dp/(1.0_dp + ee)*dfz
|
||||
ff = 1.0_dp/(1.0_dp + ee)
|
||||
cnab = ff*fz
|
||||
dcnab = -fz*ff*ff*k1*rr/rab*ee + ff*dfz
|
||||
|
||||
END SUBROUTINE cnparam_d3
|
||||
|
||||
|
|
|
|||
|
|
@ -90,11 +90,11 @@ MODULE qs_environment
|
|||
USE hfx_types, ONLY: compare_hfx_sections,&
|
||||
hfx_create
|
||||
USE input_constants, ONLY: &
|
||||
dispersion_d2, dispersion_d3, dispersion_d3bj, do_et_ddapc, do_method_am1, do_method_dftb, &
|
||||
do_method_gapw, do_method_gapw_xc, do_method_gpw, do_method_lrigpw, do_method_mndo, &
|
||||
do_method_mndod, do_method_ofgpw, do_method_pdg, do_method_pm3, do_method_pm6, &
|
||||
do_method_pm6fm, do_method_pnnl, do_method_rigpw, do_method_rm1, do_method_xtb, &
|
||||
do_qmmm_gauss, do_qmmm_swave, general_roks, hden_atomic, kg_tnadd_embed_ri, &
|
||||
debug_run, dispersion_d2, dispersion_d3, dispersion_d3bj, do_et_ddapc, do_method_am1, &
|
||||
do_method_dftb, do_method_gapw, do_method_gapw_xc, do_method_gpw, do_method_lrigpw, &
|
||||
do_method_mndo, do_method_mndod, do_method_ofgpw, do_method_pdg, do_method_pm3, &
|
||||
do_method_pm6, do_method_pm6fm, do_method_pnnl, do_method_rigpw, do_method_rm1, &
|
||||
do_method_xtb, do_qmmm_gauss, do_qmmm_swave, general_roks, hden_atomic, kg_tnadd_embed_ri, &
|
||||
linear_response_run, rel_none, rel_trans_atom, smear_fermi_dirac, vdw_pairpot_dftd2, &
|
||||
vdw_pairpot_dftd3, vdw_pairpot_dftd3bj, vdw_pairpot_dftd4, wfi_gext_proj_nr, &
|
||||
wfi_gext_proj_qtr_nr, wfi_linear_ps_method_nr, wfi_linear_wf_method_nr, &
|
||||
|
|
@ -268,8 +268,9 @@ CONTAINS
|
|||
CHARACTER(LEN=default_string_length) :: basis_type
|
||||
INTEGER :: ikind, method_id, nelectron_total, &
|
||||
nkind, nkp_grid(3)
|
||||
LOGICAL :: do_active_space, do_admm_rpa, do_bse, do_ec_hfx, do_et, do_exx, do_gw, do_hfx, &
|
||||
do_kpoints, do_linear_response, do_mp2, do_ri_mp2, do_ri_rpa, do_ri_sos_mp2, do_tddfpt, &
|
||||
LOGICAL :: do_active_space, do_admm_rpa, do_bse, do_debug_fdiff, do_debug_forces, &
|
||||
do_debug_stress_tensor, do_ec_hfx, do_et, do_exx, do_gw, do_hfx, do_kpoints, &
|
||||
do_linear_response, do_mp2, do_ri_mp2, do_ri_rpa, do_ri_sos_mp2, do_tddfpt, &
|
||||
do_wfc_low_scaling, do_wfc_low_scaling_kpoints, do_xtb_tblite, is_identical, is_semi, &
|
||||
mp2_present, my_qmmm, qmmm_decoupl, same_except_frac, use_ref_cell
|
||||
REAL(KIND=dp), DIMENSION(:, :), POINTER :: rtmat
|
||||
|
|
@ -411,6 +412,15 @@ CONTAINS
|
|||
END IF
|
||||
do_linear_response = .FALSE.
|
||||
IF (PRESENT(globenv)) do_linear_response = globenv%run_type_id == linear_response_run
|
||||
do_debug_fdiff = .FALSE.
|
||||
IF (PRESENT(globenv)) do_debug_fdiff = globenv%run_type_id == debug_run
|
||||
IF (do_debug_fdiff .AND. PRESENT(root_section)) THEN
|
||||
CALL section_vals_val_get(root_section, "DEBUG%DEBUG_FORCES", &
|
||||
l_val=do_debug_forces)
|
||||
CALL section_vals_val_get(root_section, "DEBUG%DEBUG_STRESS_TENSOR", &
|
||||
l_val=do_debug_stress_tensor)
|
||||
do_debug_fdiff = do_debug_forces .OR. do_debug_stress_tensor
|
||||
END IF
|
||||
do_mp2 = .FALSE.
|
||||
do_ri_mp2 = .FALSE.
|
||||
do_ri_sos_mp2 = .FALSE.
|
||||
|
|
@ -439,6 +449,7 @@ CONTAINS
|
|||
END IF
|
||||
CALL restrict_unsupported_atomic_kpoint_symmetry(kpoints, method_id, do_hfx, do_exx, do_gw, &
|
||||
do_tddfpt, do_active_space, do_linear_response, &
|
||||
do_debug_fdiff, &
|
||||
do_mp2 .OR. do_ri_mp2 .OR. do_ri_sos_mp2, &
|
||||
do_ri_rpa .AND. .NOT. do_gw, do_bse, &
|
||||
do_wfc_low_scaling, do_wfc_low_scaling_kpoints, &
|
||||
|
|
@ -659,6 +670,7 @@ CONTAINS
|
|||
!> \param do_tddfpt ...
|
||||
!> \param do_active_space ...
|
||||
!> \param do_linear_response ...
|
||||
!> \param do_debug_fdiff ...
|
||||
!> \param do_mp2 ...
|
||||
!> \param do_rpa ...
|
||||
!> \param do_bse ...
|
||||
|
|
@ -668,12 +680,13 @@ CONTAINS
|
|||
! **************************************************************************************************
|
||||
SUBROUTINE restrict_unsupported_atomic_kpoint_symmetry(kpoints, method_id, do_hfx, do_exx, do_gw, &
|
||||
do_tddfpt, do_active_space, do_linear_response, &
|
||||
do_debug_fdiff, &
|
||||
do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
|
||||
do_wfc_low_scaling_kpoints, do_xtb_tblite)
|
||||
TYPE(kpoint_type), POINTER :: kpoints
|
||||
INTEGER, INTENT(IN) :: method_id
|
||||
LOGICAL, INTENT(IN) :: do_hfx, do_exx, do_gw, do_tddfpt, do_active_space, &
|
||||
do_linear_response, do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
|
||||
do_linear_response, do_debug_fdiff, do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
|
||||
do_wfc_low_scaling_kpoints, do_xtb_tblite
|
||||
|
||||
CHARACTER(LEN=default_string_length) :: kp_scheme, reason
|
||||
|
|
@ -713,6 +726,7 @@ CONTAINS
|
|||
|
||||
reason = unsupported_atomic_kpoint_symmetry_reason(method_id, do_hfx, do_exx, do_gw, &
|
||||
do_tddfpt, do_active_space, do_linear_response, &
|
||||
do_debug_fdiff, &
|
||||
do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
|
||||
do_wfc_low_scaling_kpoints, do_xtb_tblite)
|
||||
IF (LEN_TRIM(reason) == 0) RETURN
|
||||
|
|
@ -745,6 +759,7 @@ CONTAINS
|
|||
reason = ""
|
||||
MARK_USED(do_gw)
|
||||
MARK_USED(do_mp2)
|
||||
MARK_USED(do_xtb_tblite)
|
||||
|
||||
IF (do_bse) THEN
|
||||
reason = "BSE"
|
||||
|
|
@ -758,11 +773,6 @@ CONTAINS
|
|||
reason = "LINEAR_RESPONSE/DFPT"
|
||||
RETURN
|
||||
END IF
|
||||
IF (do_xtb_tblite) THEN
|
||||
reason = "tblite xTB"
|
||||
RETURN
|
||||
END IF
|
||||
|
||||
SELECT CASE (method_id)
|
||||
CASE (do_method_rigpw)
|
||||
reason = "RIGPW"
|
||||
|
|
@ -786,6 +796,7 @@ CONTAINS
|
|||
!> \param do_tddfpt ...
|
||||
!> \param do_active_space ...
|
||||
!> \param do_linear_response ...
|
||||
!> \param do_debug_fdiff ...
|
||||
!> \param do_mp2 ...
|
||||
!> \param do_rpa ...
|
||||
!> \param do_bse ...
|
||||
|
|
@ -795,26 +806,24 @@ CONTAINS
|
|||
!> \return reason
|
||||
! **************************************************************************************************
|
||||
FUNCTION unsupported_atomic_kpoint_symmetry_reason(method_id, do_hfx, do_exx, do_gw, do_tddfpt, &
|
||||
do_active_space, do_linear_response, do_mp2, do_rpa, &
|
||||
do_bse, do_wfc_low_scaling, do_wfc_low_scaling_kpoints, &
|
||||
do_xtb_tblite) RESULT(reason)
|
||||
do_active_space, do_linear_response, do_debug_fdiff, &
|
||||
do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
|
||||
do_wfc_low_scaling_kpoints, do_xtb_tblite) RESULT(reason)
|
||||
INTEGER, INTENT(IN) :: method_id
|
||||
LOGICAL, INTENT(IN) :: do_hfx, do_exx, do_gw, do_tddfpt, do_active_space, &
|
||||
do_linear_response, do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
|
||||
do_linear_response, do_debug_fdiff, do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
|
||||
do_wfc_low_scaling_kpoints, do_xtb_tblite
|
||||
CHARACTER(LEN=default_string_length) :: reason
|
||||
|
||||
reason = ""
|
||||
MARK_USED(do_debug_fdiff)
|
||||
MARK_USED(do_xtb_tblite)
|
||||
|
||||
SELECT CASE (method_id)
|
||||
CASE (do_method_dftb)
|
||||
reason = "DFTB"
|
||||
CASE (do_method_lrigpw)
|
||||
reason = "LRIGPW"
|
||||
CASE (do_method_rigpw)
|
||||
reason = "RIGPW"
|
||||
CASE (do_method_xtb)
|
||||
reason = "xTB"
|
||||
CASE (do_method_mndo, do_method_mndod, do_method_am1, do_method_pm3, &
|
||||
do_method_pm6, do_method_pm6fm, do_method_pdg, do_method_rm1, do_method_pnnl)
|
||||
reason = "semiempirical methods"
|
||||
|
|
@ -829,8 +838,6 @@ CONTAINS
|
|||
reason = "GW"
|
||||
ELSE IF (do_hfx .OR. do_exx) THEN
|
||||
reason = "HFX/HF"
|
||||
ELSE IF (do_xtb_tblite) THEN
|
||||
reason = "tblite xTB"
|
||||
ELSE IF (do_tddfpt) THEN
|
||||
reason = "TDDFPT/TDDFT"
|
||||
ELSE IF (do_active_space) THEN
|
||||
|
|
@ -1062,7 +1069,8 @@ CONTAINS
|
|||
ewald_section => section_vals_get_subs_vals(poisson_section, "EWALD")
|
||||
print_section => section_vals_get_subs_vals(qs_env%input, "PRINT%GRID_INFORMATION")
|
||||
CALL get_qs_kind_set(qs_kind_set, basis_rcut=ewald_rcut)
|
||||
CALL read_ewald_section_tb(ewald_env, ewald_section, cell_ref%hmat)
|
||||
CALL read_ewald_section_tb(ewald_env, ewald_section, cell_ref%hmat, &
|
||||
cell_periodic=cell%perd)
|
||||
ALLOCATE (ewald_pw)
|
||||
CALL ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section=print_section)
|
||||
CALL set_qs_env(qs_env, ewald_env=ewald_env, ewald_pw=ewald_pw)
|
||||
|
|
@ -1156,10 +1164,10 @@ CONTAINS
|
|||
print_section => section_vals_get_subs_vals(qs_env%input, "PRINT%GRID_INFORMATION")
|
||||
IF (gfn_type == 0) THEN
|
||||
CALL read_ewald_section_tb(ewald_env, ewald_section, cell_ref%hmat, &
|
||||
silent=silent, pset="EEQ")
|
||||
silent=silent, pset="EEQ", cell_periodic=cell%perd)
|
||||
ELSE
|
||||
CALL read_ewald_section_tb(ewald_env, ewald_section, cell_ref%hmat, &
|
||||
silent=silent)
|
||||
silent=silent, cell_periodic=cell%perd)
|
||||
END IF
|
||||
ALLOCATE (ewald_pw)
|
||||
CALL ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section=print_section)
|
||||
|
|
|
|||
|
|
@ -261,7 +261,8 @@ CONTAINS
|
|||
CALL get_qs_env(qs_env=qs_env, ewald_env=ewald_env, ewald_pw=ewald_pw)
|
||||
CALL ewald_pw_grid_update(ewald_pw, ewald_env, cell%hmat)
|
||||
END IF
|
||||
ELSE IF (dft_control%qs_control%xtb) THEN
|
||||
ELSE IF (dft_control%qs_control%xtb .AND. &
|
||||
(.NOT. dft_control%qs_control%xtb_control%do_tblite)) THEN
|
||||
IF (dft_control%qs_control%xtb_control%do_ewald) THEN
|
||||
! rebuild Ewald environment
|
||||
CALL get_qs_env(qs_env=qs_env, ewald_env=ewald_env, ewald_pw=ewald_pw)
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ MODULE qs_force
|
|||
velocity_gauge_nl_force
|
||||
USE se_core_core, ONLY: se_core_core_interaction
|
||||
USE se_core_matrix, ONLY: build_se_core_matrix
|
||||
USE tblite_interface, ONLY: build_tblite_matrices
|
||||
USE tblite_interface, ONLY: build_tblite_matrices,&
|
||||
tb_reference_cli_compare
|
||||
USE virial_types, ONLY: symmetrize_virial,&
|
||||
virial_type
|
||||
USE xtb_matrices, ONLY: build_xtb_matrices
|
||||
|
|
@ -448,6 +449,10 @@ CONTAINS
|
|||
END IF
|
||||
END IF
|
||||
|
||||
IF (dft_control%qs_control%xtb .AND. dft_control%qs_control%xtb_control%do_tblite) THEN
|
||||
CALL tb_reference_cli_compare(qs_env)
|
||||
END IF
|
||||
|
||||
output_unit = cp_print_key_unit_nr(logger, qs_env%input, "DFT%PRINT%DERIVATIVES", &
|
||||
extension=".Log")
|
||||
print_section => section_vals_get_subs_vals(qs_env%input, "DFT%PRINT%DERIVATIVES")
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ MODULE qs_mixing_utils
|
|||
PRIVATE
|
||||
|
||||
CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_mixing_utils'
|
||||
INTEGER, PARAMETER, PRIVATE :: max_dftb_scc_vars = 1, &
|
||||
max_xtb_scc_vars = 14
|
||||
|
||||
PUBLIC :: mixing_allocate, mixing_init, charge_mixing_init, &
|
||||
self_consistency_check
|
||||
|
|
@ -177,13 +179,13 @@ CONTAINS
|
|||
END IF
|
||||
|
||||
IF (charge_mixing) THEN
|
||||
! *** allocate buffer for charge mixing ***
|
||||
! *** allocate buffer for TB SCC variable mixing ***
|
||||
IF (mixing_method >= gspace_mixing_nr) THEN
|
||||
CPASSERT(.NOT. mixing_store%gmix_p)
|
||||
IF (dft_control%qs_control%dftb) THEN
|
||||
max_shell = 1
|
||||
max_shell = max_dftb_scc_vars
|
||||
ELSEIF (dft_control%qs_control%xtb) THEN
|
||||
max_shell = 5
|
||||
max_shell = max_xtb_scc_vars
|
||||
ELSE
|
||||
CPABORT('UNKNOWN METHOD')
|
||||
END IF
|
||||
|
|
@ -652,7 +654,11 @@ CONTAINS
|
|||
ELEMENTAL SUBROUTINE charge_mixing_init(mixing_store)
|
||||
TYPE(mixing_storage_type), INTENT(INOUT) :: mixing_store
|
||||
|
||||
mixing_store%acharge = 0.0_dp
|
||||
mixing_store%ncall = 0
|
||||
mixing_store%tb_scc_mixer_error = 0.0_dp
|
||||
mixing_store%tb_scc_mixer_step = 0
|
||||
IF (ASSOCIATED(mixing_store%acharge)) mixing_store%acharge = 0.0_dp
|
||||
IF (ASSOCIATED(mixing_store%dacharge)) mixing_store%dacharge = 0.0_dp
|
||||
|
||||
END SUBROUTINE charge_mixing_init
|
||||
|
||||
|
|
|
|||
46
src/qs_scf.F
46
src/qs_scf.F
|
|
@ -83,7 +83,7 @@ MODULE qs_scf
|
|||
cdft2ot, history_guess, ot2cdft, ot_precond_full_all, ot_precond_full_single, &
|
||||
ot_precond_full_single_inverse, ot_precond_none, ot_precond_s_inverse, &
|
||||
outer_scf_becke_constraint, outer_scf_hirshfeld_constraint, outer_scf_optimizer_broyden, &
|
||||
outer_scf_optimizer_newton_ls
|
||||
outer_scf_optimizer_newton_ls, tblite_scc_mixer_tblite
|
||||
USE input_section_types, ONLY: section_vals_get_subs_vals,&
|
||||
section_vals_type
|
||||
USE kinds, ONLY: default_path_length,&
|
||||
|
|
@ -110,6 +110,7 @@ MODULE qs_scf
|
|||
print_inverse_jacobian,&
|
||||
restart_inverse_jacobian
|
||||
USE qs_cdft_types, ONLY: cdft_control_type
|
||||
USE qs_charge_mixing, ONLY: charge_mixing_scc_error
|
||||
USE qs_charges_types, ONLY: qs_charges_type
|
||||
USE qs_density_matrices, ONLY: calculate_density_matrix
|
||||
USE qs_density_mixing_types, ONLY: gspace_mixing_nr
|
||||
|
|
@ -174,6 +175,8 @@ MODULE qs_scf
|
|||
USE smeagol_interface, ONLY: run_smeagol_bulktrans,&
|
||||
run_smeagol_emtrans
|
||||
USE tblite_interface, ONLY: tb_get_energy,&
|
||||
tb_native_scc_mixer_active,&
|
||||
tb_scf_mixer_error,&
|
||||
tb_update_charges
|
||||
#include "./base/base_uses.f90"
|
||||
|
||||
|
|
@ -357,8 +360,9 @@ CONTAINS
|
|||
INTEGER :: ext_master_id, handle, handle2, i_tmp, &
|
||||
ic, ispin, iter_count, output_unit, &
|
||||
scf_energy_message_tag, total_steps
|
||||
LOGICAL :: diis_step, do_kpoints, energy_only, exit_inner_loop, exit_outer_loop, &
|
||||
inner_loop_converged, just_energy, outer_loop_converged
|
||||
LOGICAL :: density_full_step, diis_step, do_kpoints, energy_only, exit_inner_loop, &
|
||||
exit_outer_loop, inner_loop_converged, internal_tblite_density_full_step, &
|
||||
internal_tblite_mixer, just_energy, outer_loop_converged, tblite_native_mixer
|
||||
REAL(KIND=dp) :: t1, t2
|
||||
REAL(KIND=dp), DIMENSION(3) :: res_val_3
|
||||
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
|
||||
|
|
@ -410,6 +414,16 @@ CONTAINS
|
|||
results=results, &
|
||||
pw_env=pw_env, &
|
||||
para_env=para_env)
|
||||
tblite_native_mixer = dft_control%qs_control%xtb_control%do_tblite .AND. &
|
||||
tb_native_scc_mixer_active(dft_control)
|
||||
internal_tblite_mixer = (dft_control%qs_control%dftb .AND. &
|
||||
dft_control%qs_control%dftb_control%tblite_scc_mixer == tblite_scc_mixer_tblite) .OR. &
|
||||
(dft_control%qs_control%xtb .AND. &
|
||||
.NOT. dft_control%qs_control%xtb_control%do_tblite .AND. &
|
||||
dft_control%qs_control%xtb_control%tblite_scc_mixer == tblite_scc_mixer_tblite)
|
||||
internal_tblite_density_full_step = dft_control%qs_control%xtb .AND. &
|
||||
.NOT. dft_control%qs_control%xtb_control%do_tblite .AND. &
|
||||
dft_control%qs_control%xtb_control%tblite_scc_mixer == tblite_scc_mixer_tblite
|
||||
|
||||
CALL qs_rho_get(rho, rho_ao_kp=rho_ao_kp)
|
||||
|
||||
|
|
@ -530,7 +544,29 @@ CONTAINS
|
|||
CALL tb_get_energy(qs_env, qs_env%tb_tblite, energy)
|
||||
END IF
|
||||
|
||||
CALL qs_scf_density_mixing(scf_env, rho, para_env, diis_step)
|
||||
density_full_step = diis_step .OR. tblite_native_mixer .OR. internal_tblite_density_full_step
|
||||
CALL qs_scf_density_mixing(scf_env, rho, para_env, density_full_step)
|
||||
IF (dft_control%qs_control%xtb_control%do_tblite) THEN
|
||||
scf_env%iter_delta = MAX(scf_env%iter_delta, &
|
||||
tb_scf_mixer_error(dft_control, qs_env%tb_tblite, &
|
||||
scf_control%eps_scf))
|
||||
END IF
|
||||
IF (dft_control%qs_control%dftb .OR. &
|
||||
(dft_control%qs_control%xtb .AND. .NOT. dft_control%qs_control%xtb_control%do_tblite)) THEN
|
||||
scf_env%iter_delta = MAX(scf_env%iter_delta, &
|
||||
charge_mixing_scc_error(scf_env%mixing_store, scf_control%eps_scf))
|
||||
END IF
|
||||
IF (tblite_native_mixer) THEN
|
||||
scf_env%iter_param = dft_control%qs_control%xtb_control%tblite_mixer_damping
|
||||
scf_env%iter_method = "TBLite/Diag"
|
||||
ELSEIF (internal_tblite_mixer) THEN
|
||||
scf_env%iter_method = "TBLite/Diag"
|
||||
IF (dft_control%qs_control%dftb) THEN
|
||||
scf_env%iter_param = dft_control%qs_control%dftb_control%tblite_mixer_damping
|
||||
ELSE
|
||||
scf_env%iter_param = dft_control%qs_control%xtb_control%tblite_mixer_damping
|
||||
END IF
|
||||
END IF
|
||||
|
||||
t2 = m_walltime()
|
||||
|
||||
|
|
@ -550,7 +586,7 @@ CONTAINS
|
|||
! is really the last SCF step
|
||||
IF (exit_inner_loop) THEN
|
||||
|
||||
CALL qs_scf_inner_finalize(scf_env, qs_env, diis_step, output_unit)
|
||||
CALL qs_scf_inner_finalize(scf_env, qs_env, density_full_step, output_unit)
|
||||
|
||||
CALL qs_scf_check_outer_exit(qs_env, scf_env, scf_control, should_stop, &
|
||||
outer_loop_converged, exit_outer_loop)
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ MODULE qs_scf_loop_utils
|
|||
USE scf_control_types, ONLY: scf_control_type,&
|
||||
smear_type
|
||||
USE smeagol_interface, ONLY: run_smeagol_emtrans
|
||||
USE tblite_interface, ONLY: tb_native_scc_mixer_active
|
||||
#include "./base/base_uses.f90"
|
||||
|
||||
IMPLICIT NONE
|
||||
|
|
@ -130,7 +131,9 @@ CONTAINS
|
|||
CHARACTER(LEN=*), PARAMETER :: routineN = 'qs_scf_new_mos'
|
||||
|
||||
INTEGER :: handle, ispin
|
||||
LOGICAL :: has_unit_metric, skip_diag_sub
|
||||
LOGICAL :: disable_diis, has_unit_metric, &
|
||||
skip_diag_sub
|
||||
REAL(KIND=dp) :: saved_eps_diis
|
||||
TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: matrix_ks, matrix_s
|
||||
TYPE(dft_control_type), POINTER :: dft_control
|
||||
TYPE(mo_set_type), DIMENSION(:), POINTER :: mos
|
||||
|
|
@ -149,6 +152,12 @@ CONTAINS
|
|||
dft_control=dft_control, &
|
||||
has_unit_metric=has_unit_metric)
|
||||
scf_env%iter_param = 0.0_dp
|
||||
disable_diis = dft_control%qs_control%xtb_control%do_tblite .AND. &
|
||||
tb_native_scc_mixer_active(dft_control)
|
||||
IF (disable_diis) THEN
|
||||
saved_eps_diis = scf_control%eps_diis
|
||||
scf_control%eps_diis = 0.0_dp
|
||||
END IF
|
||||
|
||||
! transfer total_zeff_corr from qs_env to scf_env only if
|
||||
! correct_el_density_dip is switched on [SGh]
|
||||
|
|
@ -275,6 +284,7 @@ CONTAINS
|
|||
qs_env%mo_derivs, energy%total, &
|
||||
matrix_s, energy_only=energy_only, has_unit_metric=has_unit_metric)
|
||||
END SELECT
|
||||
IF (disable_diis) scf_control%eps_diis = saved_eps_diis
|
||||
|
||||
energy%kTS = 0.0_dp
|
||||
energy%efermi = 0.0_dp
|
||||
|
|
@ -309,8 +319,8 @@ CONTAINS
|
|||
CHARACTER(LEN=*), PARAMETER :: routineN = 'qs_scf_new_mos_kp'
|
||||
|
||||
INTEGER :: handle, ispin
|
||||
LOGICAL :: has_unit_metric
|
||||
REAL(dp) :: diis_error
|
||||
LOGICAL :: disable_diis, has_unit_metric
|
||||
REAL(dp) :: diis_error, saved_eps_diis
|
||||
TYPE(dbcsr_p_type), DIMENSION(:, :), POINTER :: matrix_ks, matrix_s
|
||||
TYPE(dft_control_type), POINTER :: dft_control
|
||||
TYPE(kpoint_type), POINTER :: kpoints
|
||||
|
|
@ -323,6 +333,12 @@ CONTAINS
|
|||
|
||||
CALL get_qs_env(qs_env=qs_env, dft_control=dft_control, kpoints=kpoints)
|
||||
scf_env%iter_param = 0.0_dp
|
||||
disable_diis = dft_control%qs_control%xtb_control%do_tblite .AND. &
|
||||
tb_native_scc_mixer_active(dft_control)
|
||||
IF (disable_diis) THEN
|
||||
saved_eps_diis = scf_control%eps_diis
|
||||
scf_control%eps_diis = 0.0_dp
|
||||
END IF
|
||||
|
||||
IF (dft_control%roks) &
|
||||
CPABORT("KP code: ROKS method not available: ")
|
||||
|
|
@ -385,6 +401,7 @@ CONTAINS
|
|||
END IF
|
||||
CALL run_smeagol_emtrans(qs_env, last=.FALSE., iter=scf_env%iter_count, rho_ao_kp=scf_env%p_mix_new)
|
||||
END SELECT
|
||||
IF (disable_diis) scf_control%eps_diis = saved_eps_diis
|
||||
|
||||
CALL get_qs_env(qs_env=qs_env, energy=energy)
|
||||
energy%kTS = 0.0_dp
|
||||
|
|
|
|||
|
|
@ -138,7 +138,8 @@ CONTAINS
|
|||
ewald_section => section_vals_get_subs_vals(poisson_section, "EWALD")
|
||||
print_section => section_vals_get_subs_vals(qs_env%input, "PRINT%GRID_INFORMATION")
|
||||
CALL get_qs_env(qs_env, cell=cell, cell_ref=cell_ref)
|
||||
CALL read_ewald_section_tb(ewald_env, ewald_section, cell_ref%hmat)
|
||||
CALL read_ewald_section_tb(ewald_env, ewald_section, cell_ref%hmat, &
|
||||
cell_periodic=cell%perd)
|
||||
ALLOCATE (ewald_pw)
|
||||
CALL ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section=print_section)
|
||||
work%ewald_env => ewald_env
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ MODULE qs_wf_history_types
|
|||
|
||||
PUBLIC :: qs_wf_snapshot_type, &
|
||||
qs_wf_history_type, qs_wf_history_p_type
|
||||
PUBLIC :: wfi_retain, wfi_release, wfi_get_snapshot
|
||||
PUBLIC :: wfi_retain, wfi_release, wfi_clear, wfi_get_snapshot
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief represent a past snapshot of the wavefunction.
|
||||
|
|
@ -215,6 +215,32 @@ CONTAINS
|
|||
NULLIFY (wf_history)
|
||||
END SUBROUTINE wfi_release
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Clear stored wavefunction snapshots while preserving history settings.
|
||||
!> \param wf_history the wf_history to clear
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE wfi_clear(wf_history)
|
||||
TYPE(qs_wf_history_type), POINTER :: wf_history
|
||||
|
||||
INTEGER :: i
|
||||
|
||||
IF (ASSOCIATED(wf_history)) THEN
|
||||
CPASSERT(wf_history%ref_count > 0)
|
||||
IF (ASSOCIATED(wf_history%past_states)) THEN
|
||||
DO i = 1, SIZE(wf_history%past_states)
|
||||
IF (ASSOCIATED(wf_history%past_states(i)%snapshot)) THEN
|
||||
CALL wfs_release(wf_history%past_states(i)%snapshot)
|
||||
DEALLOCATE (wf_history%past_states(i)%snapshot)
|
||||
NULLIFY (wf_history%past_states(i)%snapshot)
|
||||
END IF
|
||||
END DO
|
||||
END IF
|
||||
wf_history%snapshot_count = 0
|
||||
wf_history%last_state_index = 1
|
||||
END IF
|
||||
|
||||
END SUBROUTINE wfi_clear
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief returns a snapshot, the first being the latest snapshot
|
||||
!> \param wf_history the plage where to get the snapshot
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -17,6 +17,7 @@ MODULE tblite_types
|
|||
USE mctc_io, ONLY: structure_type, new
|
||||
USE tblite_xtb_calculator, ONLY: xtb_calculator
|
||||
USE tblite_container, ONLY: container_cache
|
||||
USE tblite_scf_mixer, ONLY: mixer_type
|
||||
USE tblite_wavefunction_type, ONLY: wavefunction_type
|
||||
USE tblite_scf_potential, ONLY: potential_type
|
||||
#endif
|
||||
|
|
@ -66,6 +67,7 @@ MODULE tblite_types
|
|||
TYPE(container_cache) :: dcache = container_cache()
|
||||
TYPE(wavefunction_type) :: wfn = wavefunction_type()
|
||||
TYPE(potential_type) :: pot = potential_type()
|
||||
CLASS(mixer_type), ALLOCATABLE :: mixer
|
||||
#endif
|
||||
|
||||
END TYPE tblite_type
|
||||
|
|
@ -118,6 +120,9 @@ CONTAINS
|
|||
CALL dbcsr_deallocate_matrix_set(tb_tblite%quadbra)
|
||||
IF (ASSOCIATED(tb_tblite%quadket)) &
|
||||
CALL dbcsr_deallocate_matrix_set(tb_tblite%quadket)
|
||||
#if defined(__TBLITE)
|
||||
IF (ALLOCATED(tb_tblite%mixer)) DEALLOCATE (tb_tblite%mixer)
|
||||
#endif
|
||||
|
||||
DEALLOCATE (tb_tblite)
|
||||
END IF
|
||||
|
|
|
|||
|
|
@ -355,7 +355,10 @@ CONTAINS
|
|||
ELSE
|
||||
CALL get_qs_env(qs_env=qs_env, scf_env=scf_env)
|
||||
CALL charge_mixing(scf_env%mixing_method, scf_env%mixing_store, &
|
||||
charges, para_env, scf_env%iter_count)
|
||||
charges, para_env, scf_env%iter_count, &
|
||||
scc_mixer=dft_control%qs_control%xtb_control%tblite_scc_mixer, &
|
||||
tblite_mixer_damping=dft_control%qs_control%xtb_control%tblite_mixer_damping, &
|
||||
tblite_mixer_memory=qs_env%scf_control%max_scf)
|
||||
END IF
|
||||
|
||||
DO iatom = 1, natom
|
||||
|
|
@ -472,4 +475,3 @@ CONTAINS
|
|||
END SUBROUTINE build_gfn1_xtb_ks_matrix
|
||||
|
||||
END MODULE xtb_ks_matrix
|
||||
|
||||
|
|
|
|||
|
|
@ -2,24 +2,25 @@
|
|||
# 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.82072731467941}]
|
||||
"ch2o-2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.82159061359821}]
|
||||
"ch2o-3.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.81373413468792}]
|
||||
"ch2o-r.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.81373413468792}]
|
||||
"ch2o-2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.8215906135489996}]
|
||||
"ch2o-3.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.8137341344748501}]
|
||||
"ch2o-r.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.8137341344748501}]
|
||||
"ch2o_force.inp" = [{matcher="M042", tol=1.0E-06, ref=0.0}]
|
||||
"h2-1.inp" = [{matcher="E_total", tol=1.0E-14, ref=-0.70875565358819}]
|
||||
"h2-2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-0.70875565358819}]
|
||||
"h2-3.inp" = [{matcher="E_total", tol=1.0E-14, ref=-0.70875565358819}]
|
||||
"h2-4.inp" = [{matcher="E_total", tol=3e-14, ref=-0.71042952969308004}]
|
||||
"h2o-32_1.inp" = [{matcher="E_total", tol=6e-13, ref=-131.08636939008761}]
|
||||
"h2o-32_2.inp" = [{matcher="E_total", tol=4e-13, ref=-131.07999691054360}]
|
||||
"h2o-32_3.inp" = [{matcher="E_total", tol=9e-14, ref=-131.07520911566399}]
|
||||
"h2o-32_4.inp" = [{matcher="E_total", tol=2e-13, ref=-131.07520911521166}]
|
||||
"h2-4.inp" = [{matcher="E_total", tol=3e-14, ref=-0.71042953396467}]
|
||||
"h2o-32_1.inp" = [{matcher="E_total", tol=6e-13, ref=-131.08636943050718}]
|
||||
"h2o-32_2.inp" = [{matcher="E_total", tol=4e-13, ref=-131.07999694042778}]
|
||||
"h2o-32_3.inp" = [{matcher="E_total", tol=9e-14, ref=-131.07520912214508}]
|
||||
"h2o-32_4.inp" = [{matcher="E_total", tol=2e-13, ref=-131.07520912214875}]
|
||||
"MoS.inp" = [{matcher="E_total", tol=1.0E-14, ref=-2.99616182900092}]
|
||||
"n2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-4.86560729574766}]
|
||||
"s2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-4.83731808711857}]
|
||||
"n2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-4.8656072957458099}]
|
||||
"s2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-4.8373181011770399}]
|
||||
# atomic properties
|
||||
"ch2o_atprop.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.81281420275335}]
|
||||
"MoS_atprop.inp" = [{matcher="E_total", tol=1.0E-14, ref=-2.99616182900092}]
|
||||
"h2o-32_atprop.inp" = [{matcher="E_total", tol=6e-13, ref=-131.08636939008761}]
|
||||
"h2o-32_atprop.inp" = [{matcher="E_total", tol=6e-13, ref=-131.08636943050718}]
|
||||
#
|
||||
"co2_1.inp" = [{matcher="E_total", tol=1.0E-14, ref=-8.55586246566686}]
|
||||
"co2_2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-8.55586246566686}]
|
||||
|
|
@ -27,8 +28,13 @@
|
|||
#
|
||||
"si_kp1.inp" = [{matcher="E_total", tol=1.0E-13, ref=-10.06358203475393}]
|
||||
"si_kp1_kpsym.inp" = [{matcher="E_total", tol=1.0E-13, ref=-10.06358203475393},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=32}]
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4}]
|
||||
"si_kp1_kpsym_atomdisp.inp" = [{matcher="E_total", tol=1.0E-13, ref=-10.06358201165233},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=12}]
|
||||
"si_kp1_spglib_backend.inp" = [{matcher="E_total", tol=1.0E-13, ref=-10.06358203475393},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=32}]
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4}]
|
||||
"si_kp_stress.inp" = [{matcher="E_total", tol=1.0E-12, ref=-10.05636443824252},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4},
|
||||
{matcher="M042", tol=1.0E-06, ref=0.0}]
|
||||
"si_kp2.inp" = []
|
||||
#EOF
|
||||
|
|
|
|||
55
tests/DFTB/regtest-nonscc/ch2o_force.inp
Normal file
55
tests/DFTB/regtest-nonscc/ch2o_force.inp
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT ch2o_nonscc_force
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES T
|
||||
DEBUG_STRESS_TENSOR F
|
||||
DX 0.0001
|
||||
EPS_NO_ERROR_CHECK 1.0e-6
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
|
||||
#CPQA INCLUDE DFTB/nonscc/ch.spl
|
||||
#CPQA INCLUDE DFTB/nonscc/hc.spl
|
||||
#CPQA INCLUDE DFTB/nonscc/co.spl
|
||||
#CPQA INCLUDE DFTB/nonscc/oc.spl
|
||||
#CPQA INCLUDE DFTB/nonscc/oh.spl
|
||||
#CPQA INCLUDE DFTB/nonscc/ho.spl
|
||||
#CPQA INCLUDE DFTB/nonscc/hh.spl
|
||||
#CPQA INCLUDE DFTB/nonscc/oo.spl
|
||||
#CPQA INCLUDE DFTB/nonscc/nonscc_parameter
|
||||
&FORCE_EVAL
|
||||
&DFT
|
||||
&QS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DISPERSION F
|
||||
ORTHOGONAL_BASIS F
|
||||
SELF_CONSISTENT F
|
||||
&PARAMETER
|
||||
PARAM_FILE_NAME nonscc_parameter
|
||||
PARAM_FILE_PATH DFTB/nonscc
|
||||
UFF_FORCE_FIELD ../uff_table
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
SCF_GUESS NONE
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 20.0 20.0 20.0
|
||||
PERIODIC NONE
|
||||
&END CELL
|
||||
&COORD
|
||||
O 0.051368 0.000000 0.000000
|
||||
C 1.278612 0.000000 0.000000
|
||||
H 1.870460 0.939607 0.000000
|
||||
H 1.870460 -0.939607 0.000000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
62
tests/DFTB/regtest-nonscc/si_kp1_kpsym_atomdisp.inp
Normal file
62
tests/DFTB/regtest-nonscc/si_kp1_kpsym_atomdisp.inp
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
PARALLEL_GROUP_SIZE -1
|
||||
SCHEME MONKHORST-PACK 4 4 4
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&QS
|
||||
EXTRAPOLATION USE_GUESS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DISPERSION T
|
||||
ORTHOGONAL_BASIS F
|
||||
SELF_CONSISTENT F
|
||||
&PARAMETER
|
||||
PARAM_FILE_NAME nonscc_parameter
|
||||
PARAM_FILE_PATH DFTB/nonscc
|
||||
SK_FILE Si Si sisi-d
|
||||
UFF_FORCE_FIELD ../uff_table
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
SCF_GUESS NONE
|
||||
&MIXING
|
||||
ALPHA 1.
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.431 5.431 5.431
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Si 0.000050 0.000000 0.000000
|
||||
Si 0.500000 0.500000 0.000000
|
||||
Si 0.500000 0.000000 0.500000
|
||||
Si 0.000000 0.500000 0.500000
|
||||
Si 0.250000 0.250000 0.250000
|
||||
Si 0.250000 0.750000 0.750000
|
||||
Si 0.750000 0.250000 0.750000
|
||||
Si 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL HIGH
|
||||
PROJECT Si_kpsym_atomdisp
|
||||
RUN_TYPE ENERGY
|
||||
&END GLOBAL
|
||||
71
tests/DFTB/regtest-nonscc/si_kp_stress.inp
Normal file
71
tests/DFTB/regtest-nonscc/si_kp_stress.inp
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
PARALLEL_GROUP_SIZE -1
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&QS
|
||||
EXTRAPOLATION USE_GUESS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DISPERSION T
|
||||
ORTHOGONAL_BASIS F
|
||||
SELF_CONSISTENT F
|
||||
&PARAMETER
|
||||
PARAM_FILE_NAME nonscc_parameter
|
||||
PARAM_FILE_PATH DFTB/nonscc
|
||||
SK_FILE Si Si sisi-d
|
||||
UFF_FORCE_FIELD ../uff_table
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
SCF_GUESS NONE
|
||||
&MIXING
|
||||
ALPHA 1.0
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.431 5.431 5.431
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Si 0.000000 0.000000 0.000000
|
||||
Si 0.500000 0.500000 0.000000
|
||||
Si 0.500000 0.000000 0.500000
|
||||
Si 0.000000 0.500000 0.500000
|
||||
Si 0.250000 0.250000 0.250000
|
||||
Si 0.250000 0.750000 0.750000
|
||||
Si 0.750000 0.250000 0.750000
|
||||
Si 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT Si_nonscc_kp_stress
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES F
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DX 0.0001
|
||||
EPS_NO_ERROR_CHECK 1.0e-6
|
||||
MAX_RELATIVE_ERROR 0.5
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
|
|
@ -4,6 +4,12 @@
|
|||
"base1.inp" = [{matcher="E_total", tol=5e-12, ref=-4.08612338013299}]
|
||||
"base2.inp" = [{matcher="E_total", tol=5e-12, ref=-4.08612338013299}]
|
||||
"base3.inp" = [{matcher="E_total", tol=5e-12, ref=-4.08520460432732}]
|
||||
"dftb3_h2o_force.inp" = [{matcher="M042", tol=1.0E-6, ref=0.0}]
|
||||
"dftb3_h2o_gamma_stress.inp" = [{matcher="M042", tol=1.0E-6, ref=0.0}]
|
||||
"dftb3_h2o_kp_force.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=4},
|
||||
{matcher="M042", tol=1.0E-6, ref=0.0}]
|
||||
"dftb3_h2o_kp_stress.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=4},
|
||||
{matcher="M042", tol=1.0E-6, ref=0.0}]
|
||||
"str1.inp" = [{matcher="E_total", tol=5e-12, ref=-4.08612900850098}]
|
||||
"str2.inp" = [{matcher="E_total", tol=5e-12, ref=-32.67545045484238}]
|
||||
"str3.inp" = [{matcher="E_total", tol=5e-12, ref=-4.08521609759106}]
|
||||
|
|
|
|||
68
tests/DFTB/regtest-scc-2/dftb3_h2o_force.inp
Normal file
68
tests/DFTB/regtest-scc-2/dftb3_h2o_force.inp
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT dftb3_h2o_force
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES T
|
||||
DEBUG_STRESS_TENSOR F
|
||||
DX 1.0e-4
|
||||
EPS_NO_ERROR_CHECK 1.0e-6
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
|
||||
#CPQA INCLUDE DFTB/scc/scc_parameter
|
||||
#CPQA INCLUDE DFTB/scc/oo.spl
|
||||
#CPQA INCLUDE DFTB/scc/oh.spl
|
||||
#CPQA INCLUDE DFTB/scc/ho.spl
|
||||
#CPQA INCLUDE DFTB/scc/hh.spl
|
||||
&FORCE_EVAL
|
||||
&DFT
|
||||
&QS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DIAGONAL_DFTB3 T
|
||||
DISPERSION F
|
||||
DO_EWALD F
|
||||
HB_SR_GAMMA T
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
HB_SR_PARAM 4.0
|
||||
PARAM_FILE_NAME scc_parameter
|
||||
PARAM_FILE_PATH DFTB/scc
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-10
|
||||
MAX_SCF 500
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 20.0 20.0 20.0
|
||||
PERIODIC NONE
|
||||
&END CELL
|
||||
&COORD
|
||||
O 0.000000 0.000000 0.000000
|
||||
H 0.758602 0.000000 0.504284
|
||||
H -0.758602 0.000000 0.504284
|
||||
&END COORD
|
||||
&KIND O
|
||||
DFTB3_PARAM -0.14
|
||||
&END KIND
|
||||
&KIND H
|
||||
DFTB3_PARAM -0.05
|
||||
&END KIND
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
79
tests/DFTB/regtest-scc-2/dftb3_h2o_gamma_stress.inp
Normal file
79
tests/DFTB/regtest-scc-2/dftb3_h2o_gamma_stress.inp
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT dftb3_h2o_gamma_stress
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES F
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DX 1.0e-4
|
||||
EPS_NO_ERROR_CHECK 1.0e-6
|
||||
MAX_RELATIVE_ERROR 0.5
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
|
||||
#CPQA INCLUDE DFTB/scc/scc_parameter
|
||||
#CPQA INCLUDE DFTB/scc/oo.spl
|
||||
#CPQA INCLUDE DFTB/scc/oh.spl
|
||||
#CPQA INCLUDE DFTB/scc/ho.spl
|
||||
#CPQA INCLUDE DFTB/scc/hh.spl
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 25
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DIAGONAL_DFTB3 T
|
||||
DISPERSION F
|
||||
DO_EWALD T
|
||||
HB_SR_GAMMA T
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
HB_SR_PARAM 4.0
|
||||
PARAM_FILE_NAME scc_parameter
|
||||
PARAM_FILE_PATH DFTB/scc
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-10
|
||||
MAX_SCF 500
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 4.0 4.0 4.0
|
||||
PERIODIC XYZ
|
||||
&END CELL
|
||||
&COORD
|
||||
O 0.000000 0.000000 0.000000
|
||||
H 0.758602 0.000000 0.504284
|
||||
H -0.758602 0.000000 0.504284
|
||||
&END COORD
|
||||
&KIND O
|
||||
DFTB3_PARAM -0.14
|
||||
&END KIND
|
||||
&KIND H
|
||||
DFTB3_PARAM -0.05
|
||||
&END KIND
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
83
tests/DFTB/regtest-scc-2/dftb3_h2o_kp_force.inp
Normal file
83
tests/DFTB/regtest-scc-2/dftb3_h2o_kp_force.inp
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT dftb3_h2o_kp_force
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES T
|
||||
DEBUG_STRESS_TENSOR F
|
||||
DX 1.0e-4
|
||||
EPS_NO_ERROR_CHECK 1.0e-6
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
|
||||
#CPQA INCLUDE DFTB/scc/scc_parameter
|
||||
#CPQA INCLUDE DFTB/scc/oo.spl
|
||||
#CPQA INCLUDE DFTB/scc/oh.spl
|
||||
#CPQA INCLUDE DFTB/scc/ho.spl
|
||||
#CPQA INCLUDE DFTB/scc/hh.spl
|
||||
&FORCE_EVAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
FULL_GRID OFF
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 25
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DIAGONAL_DFTB3 T
|
||||
DISPERSION F
|
||||
DO_EWALD T
|
||||
HB_SR_GAMMA T
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
HB_SR_PARAM 4.0
|
||||
PARAM_FILE_NAME scc_parameter
|
||||
PARAM_FILE_PATH DFTB/scc
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-10
|
||||
MAX_SCF 500
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 4.0 4.0 4.0
|
||||
PERIODIC XYZ
|
||||
&END CELL
|
||||
&COORD
|
||||
O 0.000000 0.000000 0.000000
|
||||
H 0.758602 0.000000 0.504284
|
||||
H -0.758602 0.000000 0.504284
|
||||
&END COORD
|
||||
&KIND O
|
||||
DFTB3_PARAM -0.14
|
||||
&END KIND
|
||||
&KIND H
|
||||
DFTB3_PARAM -0.05
|
||||
&END KIND
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
85
tests/DFTB/regtest-scc-2/dftb3_h2o_kp_stress.inp
Normal file
85
tests/DFTB/regtest-scc-2/dftb3_h2o_kp_stress.inp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT dftb3_h2o_kp_stress
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES F
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DX 1.0e-4
|
||||
EPS_NO_ERROR_CHECK 1.0e-6
|
||||
MAX_RELATIVE_ERROR 0.5
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
|
||||
#CPQA INCLUDE DFTB/scc/scc_parameter
|
||||
#CPQA INCLUDE DFTB/scc/oo.spl
|
||||
#CPQA INCLUDE DFTB/scc/oh.spl
|
||||
#CPQA INCLUDE DFTB/scc/ho.spl
|
||||
#CPQA INCLUDE DFTB/scc/hh.spl
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
FULL_GRID OFF
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 25
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DIAGONAL_DFTB3 T
|
||||
DISPERSION F
|
||||
DO_EWALD T
|
||||
HB_SR_GAMMA T
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
HB_SR_PARAM 4.0
|
||||
PARAM_FILE_NAME scc_parameter
|
||||
PARAM_FILE_PATH DFTB/scc
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-10
|
||||
MAX_SCF 500
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 4.0 4.0 4.0
|
||||
PERIODIC XYZ
|
||||
&END CELL
|
||||
&COORD
|
||||
O 0.000000 0.000000 0.000000
|
||||
H 0.758602 0.000000 0.504284
|
||||
H -0.758602 0.000000 0.504284
|
||||
&END COORD
|
||||
&KIND O
|
||||
DFTB3_PARAM -0.14
|
||||
&END KIND
|
||||
&KIND H
|
||||
DFTB3_PARAM -0.05
|
||||
&END KIND
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
|
@ -1,41 +1,43 @@
|
|||
# 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
|
||||
# see regtest/TEST_FILES
|
||||
"ch2o-1.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.76250962732554}]
|
||||
"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}]
|
||||
# not yet implemented
|
||||
# isolated system..
|
||||
"ch2o-2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75087368892706}]
|
||||
"ch2o-3.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75463060809440}]
|
||||
"ch2o-3.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.7546306080948604}]
|
||||
"H+.inp" = [{matcher="E_total", tol=1.0E-14, ref=0.23499952945092}]
|
||||
"ch2o-4.inp" = [{matcher="E_total", tol=3e-14, ref=-5.75087391612954}]
|
||||
"ch2o-5.inp" = [{matcher="E_total", tol=6e-14, ref=-5.75463073168421}]
|
||||
"ch2o-5.inp" = [{matcher="E_total", tol=6e-14, ref=-5.7546307316870697}]
|
||||
"ch2o.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75087391754637}]
|
||||
"ch2o-r.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75087391754637}]
|
||||
"ch2o-p.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75087391754637}]
|
||||
"ch2o_force.inp" = [{matcher="M042", tol=1.0E-06, ref=0.0}]
|
||||
"co.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.04980895105760}]
|
||||
"h2o-1.inp" = [{matcher="E_total", tol=4e-09, ref=-130.55701170331295}]
|
||||
"h2o-2.inp" = [{matcher="E_total", tol=3e-09, ref=-130.54671457542995}]
|
||||
"h2o-3.inp" = [{matcher="E_total", tol=1e-08, ref=-130.54250004205457}]
|
||||
"h2o-4.inp" = [{matcher="E_total", tol=3e-09, ref=-130.55701202522684}]
|
||||
"h2o-2.inp" = [{matcher="E_total", tol=3e-09, ref=-130.54671568595433}]
|
||||
"h2o-3.inp" = [{matcher="E_total", tol=1e-08, ref=-130.54245923459086}]
|
||||
"h2o-4.inp" = [{matcher="E_total", tol=3e-09, ref=-130.55701254220213}]
|
||||
"h2o.inp" = [{matcher="E_total", tol=4e-09, ref=-130.41378146312945}]
|
||||
"h2o_hb_corr.inp" = [{matcher="E_total", tol=1.0E-14, ref=-12.22019537999129}]
|
||||
"ch2o-ot1.inp" = [{matcher="E_total", tol=2e-14, ref=-5.7581776065727297}]
|
||||
"ch2o-ot2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75313936188209}]
|
||||
"ch2o-ot3.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.74238713882779}]
|
||||
"ch2o-ot4.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.71482283252281}]
|
||||
"ch2o-ot6.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75734496336594}]
|
||||
"ch2o-ot6.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.7573449633658802}]
|
||||
# bug fix for neighborlists
|
||||
"h2o-5.inp" = [{matcher="E_total", tol=4e-09, ref=-130.55701170331295}]
|
||||
# first check for LSD
|
||||
"test-lsd.inp" = [{matcher="E_total", tol=4e-14, ref=-5.75878702495205}]
|
||||
# atomic properties
|
||||
"fa_atprop.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75463073188988}]
|
||||
"fa_atprop.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.7546307318903498}]
|
||||
"fa2_atprop.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75087391754637}]
|
||||
"h2o_atprop.inp" = [{matcher="E_total", tol=5e-09, ref=-130.55609410509899}]
|
||||
"h2o_atprop.inp" = [{matcher="E_total", tol=5e-09, ref=-130.55609077057122}]
|
||||
# MD properties
|
||||
"h2o_md.inp" = [{matcher="E_total", tol=5e-09, ref=-130.43511524831297}]
|
||||
"h2o_md.inp" = [{matcher="E_total", tol=5e-09, ref=-130.43512095384048}]
|
||||
# Ehrenfest and RTP
|
||||
"h2o_emd.inp" = [{matcher="E_total", tol=1.0E-11, ref=-4.06522754240490}]
|
||||
"h2o_emd.inp" = [{matcher="E_total", tol=1.0E-11, ref=-4.0652275476139899}]
|
||||
"h2o_rtp.inp" = [{matcher="E_total", tol=1.0E-14, ref=-4.06552855730937}]
|
||||
"c2h2_emd_mix.inp" = [{matcher="E_total", tol=5e-11, ref=-3.91584441819893}]
|
||||
# HB correction parameter
|
||||
|
|
@ -44,17 +46,27 @@
|
|||
# Dispersion
|
||||
"h2o_disp1.inp" = [{matcher="E_total", tol=4e-09, ref=-130.41378146312945}]
|
||||
"h2o_disp2.inp" = [{matcher="E_total", tol=4e-09, ref=-130.75835628011220}]
|
||||
"h2o_disp3.inp" = [{matcher="E_total", tol=3e-09, ref=-130.76542980403056}]
|
||||
"h2o_disp3.inp" = [{matcher="E_total", tol=3e-09, ref=-130.76542890762238}]
|
||||
# DFTB3
|
||||
"h2o-6.inp" = [{matcher="E_total", tol=4e-09, ref=-131.25337238175840}]
|
||||
"h2o-7.inp" = [{matcher="E_total", tol=2e-08, ref=-131.26536755467674}]
|
||||
# Properties stress
|
||||
"h2o-atprop1.inp" = [{matcher="E_total", tol=4e-09, ref=-130.77763673429416}]
|
||||
"h2o-atprop1.inp" = [{matcher="E_total", tol=4e-09, ref=-130.77766397611819}]
|
||||
"h2o-atprop2.inp" = [{matcher="E_total", tol=2e-08, ref=-131.68099550861825}]
|
||||
"h2o-atprop3.inp" = [{matcher="E_total", tol=2e-08, ref=-131.33465894123017}]
|
||||
#
|
||||
"c_kp1.inp" = [{matcher="E_total", tol=1.0E-14, ref=-13.76936385283589}]
|
||||
"c_kp1_kpsym.inp" = [{matcher="E_total", tol=1.0E-14, ref=-13.76936385283589},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=32}]
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4}]
|
||||
"c_kp1_spglib_backend.inp" = [{matcher="E_total", tol=1.0E-14, ref=-13.76936385283589},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4}]
|
||||
"c_kp1_kpsym_debug_stress.inp" = [{matcher="E_total", tol=1.0E-12, ref=-13.76936385283589},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=32},
|
||||
{matcher="M042", tol=1.0E-5, ref=0.0}]
|
||||
"c_kp2.inp" = [{matcher="E_total", tol=7e-14, ref=-13.76786045921772}]
|
||||
"c_kp2_stress.inp" = [{matcher="E_total", tol=1.0E-12, ref=-13.76771748328116},
|
||||
{matcher="M042", tol=2.0E-06, ref=0.0000000}]
|
||||
"zns_kp2_stress.inp" = [{matcher="E_total", tol=1.0E-12, ref=-27.54559977921195},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4},
|
||||
{matcher="M042", tol=2.0E-06, ref=0.0000000}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
|
|
@ -22,7 +24,6 @@
|
|||
&DFTB
|
||||
DIAGONAL_DFTB3 F
|
||||
DISPERSION T
|
||||
DO_EWALD T
|
||||
HB_SR_GAMMA F
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
|
|
|
|||
76
tests/DFTB/regtest-scc/c_kp1_kpsym_debug_stress.inp
Normal file
76
tests/DFTB/regtest-scc/c_kp1_kpsym_debug_stress.inp
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR DIAGONAL_ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
SCHEME MONKHORST-PACK 4 4 4
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 25
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
EXTRAPOLATION USE_GUESS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DIAGONAL_DFTB3 F
|
||||
DISPERSION T
|
||||
HB_SR_GAMMA F
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
PARAM_FILE_PATH ./DFTB/scc
|
||||
SK_FILE C C cc.spl
|
||||
UFF_FORCE_FIELD ../uff_table
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-8
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
ALPHA 0.35
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 3.56683 3.56683 3.56683
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
C 0.000000 0.000000 0.000000
|
||||
C 0.500000 0.500000 0.000000
|
||||
C 0.500000 0.000000 0.500000
|
||||
C 0.000000 0.500000 0.500000
|
||||
C 0.250000 0.250000 0.250000
|
||||
C 0.250000 0.750000 0.750000
|
||||
C 0.750000 0.250000 0.750000
|
||||
C 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT C_kpsym_debug
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES F
|
||||
DEBUG_STRESS_TENSOR T
|
||||
&END DEBUG
|
||||
72
tests/DFTB/regtest-scc/c_kp1_spglib_backend.inp
Normal file
72
tests/DFTB/regtest-scc/c_kp1_spglib_backend.inp
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
SCHEME MONKHORST-PACK 4 4 4
|
||||
SYMMETRY ON
|
||||
SYMMETRY_BACKEND SPGLIB
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 25
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
EXTRAPOLATION USE_GUESS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DIAGONAL_DFTB3 F
|
||||
DISPERSION T
|
||||
HB_SR_GAMMA F
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
PARAM_FILE_PATH ./DFTB/scc
|
||||
SK_FILE C C cc.spl
|
||||
UFF_FORCE_FIELD ../uff_table
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-8
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
ALPHA 0.35
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 3.56683 3.56683 3.56683
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
C 0.000000 0.000000 0.000000
|
||||
C 0.500000 0.500000 0.000000
|
||||
C 0.500000 0.000000 0.500000
|
||||
C 0.000000 0.500000 0.500000
|
||||
C 0.250000 0.250000 0.250000
|
||||
C 0.250000 0.750000 0.750000
|
||||
C 0.750000 0.250000 0.750000
|
||||
C 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT C_spglib_backend
|
||||
RUN_TYPE ENERGY
|
||||
&END GLOBAL
|
||||
85
tests/DFTB/regtest-scc/c_kp2_stress.inp
Normal file
85
tests/DFTB/regtest-scc/c_kp2_stress.inp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_GEO 1.e-8
|
||||
FULL_GRID ON
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
SYMMETRY ON
|
||||
VERBOSE F
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 25
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
EXTRAPOLATION USE_GUESS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DIAGONAL_DFTB3 F
|
||||
DISPERSION T
|
||||
HB_SR_GAMMA F
|
||||
SCC_MIXER CP2K
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
PARAM_FILE_PATH ./DFTB/scc
|
||||
SK_FILE C C cc.spl
|
||||
UFF_FORCE_FIELD ../uff_table
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-10
|
||||
MAX_SCF 500
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
ALPHA 0.50
|
||||
METHOD BROYDEN_MIXING
|
||||
NBUFFER 8
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 3.56683 3.56683 3.56683
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
C 0.000000 0.000000 0.000000
|
||||
C 0.502000 0.502000 0.002000
|
||||
C 0.500000 0.000000 0.500000
|
||||
C 0.000000 0.500000 0.500000
|
||||
C 0.250000 0.250000 0.250000
|
||||
C 0.250000 0.750000 0.750000
|
||||
C 0.750000 0.250000 0.750000
|
||||
C 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT C
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES F
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DX 1.0e-4
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
67
tests/DFTB/regtest-scc/ch2o_force.inp
Normal file
67
tests/DFTB/regtest-scc/ch2o_force.inp
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT CH2O_dftb_force
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES T
|
||||
DEBUG_STRESS_TENSOR F
|
||||
DX 1.0e-4
|
||||
EPS_NO_ERROR_CHECK 1.0e-5
|
||||
&END DEBUG
|
||||
|
||||
#CPQA INCLUDE DFTB/scc/scc_parameter
|
||||
#CPQA INCLUDE ../uff_table
|
||||
#CPQA INCLUDE DFTB/scc/oo.spl
|
||||
#CPQA INCLUDE DFTB/scc/oc.spl
|
||||
#CPQA INCLUDE DFTB/scc/oh.spl
|
||||
#CPQA INCLUDE DFTB/scc/co.spl
|
||||
#CPQA INCLUDE DFTB/scc/cc.spl
|
||||
#CPQA INCLUDE DFTB/scc/ch.spl
|
||||
#CPQA INCLUDE DFTB/scc/ho.spl
|
||||
#CPQA INCLUDE DFTB/scc/hc.spl
|
||||
#CPQA INCLUDE DFTB/scc/hh.spl
|
||||
&FORCE_EVAL
|
||||
&DFT
|
||||
&QS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DISPERSION T
|
||||
DO_EWALD F
|
||||
ORTHOGONAL_BASIS F
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
PARAM_FILE_NAME scc_parameter
|
||||
PARAM_FILE_PATH DFTB/scc
|
||||
UFF_FORCE_FIELD ../uff_table
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-9
|
||||
MAX_SCF 1000
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
ALPHA 0.05
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 20.0 20.0 20.0
|
||||
PERIODIC NONE
|
||||
&END CELL
|
||||
&COORD
|
||||
O 0.051368 0.000000 0.000000
|
||||
C 1.278612 0.000000 0.000000
|
||||
H 1.870460 0.939607 0.000000
|
||||
H 1.870460 -0.939607 0.000000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
51
tests/DFTB/regtest-scc/ch2o_tblite_mixer.inp
Normal file
51
tests/DFTB/regtest-scc/ch2o_tblite_mixer.inp
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT ch2o_tblite_mixer
|
||||
RUN_TYPE ENERGY_FORCE
|
||||
&END GLOBAL
|
||||
|
||||
#CPQA INCLUDE DFTB/scc/scc_parameter
|
||||
#CPQA INCLUDE DFTB/scc/oo.spl
|
||||
#CPQA INCLUDE DFTB/scc/oc.spl
|
||||
#CPQA INCLUDE DFTB/scc/oh.spl
|
||||
#CPQA INCLUDE DFTB/scc/co.spl
|
||||
#CPQA INCLUDE DFTB/scc/cc.spl
|
||||
#CPQA INCLUDE DFTB/scc/ch.spl
|
||||
#CPQA INCLUDE DFTB/scc/ho.spl
|
||||
#CPQA INCLUDE DFTB/scc/hc.spl
|
||||
#CPQA INCLUDE DFTB/scc/hh.spl
|
||||
&FORCE_EVAL
|
||||
&DFT
|
||||
&QS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DISPERSION F
|
||||
ORTHOGONAL_BASIS F
|
||||
SCC_MIXER TBLITE
|
||||
SELF_CONSISTENT T
|
||||
TBLITE_MIXER_DAMPING 0.005
|
||||
&PARAMETER
|
||||
PARAM_FILE_NAME scc_parameter
|
||||
PARAM_FILE_PATH DFTB/scc
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0E-10
|
||||
MAX_SCF 500
|
||||
SCF_GUESS CORE
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 20.0 20.0 20.0
|
||||
PERIODIC NONE
|
||||
&END CELL
|
||||
&COORD
|
||||
O 0.051368 0.000000 0.000000
|
||||
C 1.278612 0.000000 0.000000
|
||||
H 1.870460 0.939607 0.000000
|
||||
H 1.870460 -0.939607 0.000000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
81
tests/DFTB/regtest-scc/zns_kp2_stress.inp
Normal file
81
tests/DFTB/regtest-scc/zns_kp2_stress.inp
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT ZnS
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES F
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DX 1.0e-4
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_GEO 1.e-8
|
||||
FULL_GRID OFF
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 25
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
EXTRAPOLATION USE_GUESS
|
||||
METHOD DFTB
|
||||
&DFTB
|
||||
DISPERSION F
|
||||
ORTHOGONAL_BASIS F
|
||||
SCC_MIXER CP2K
|
||||
SELF_CONSISTENT T
|
||||
&PARAMETER
|
||||
PARAM_FILE_NAME scc_parameter
|
||||
PARAM_FILE_PATH ./DFTB/scc
|
||||
SK_FILE Zn Zn znzn.spl
|
||||
SK_FILE Zn S zns.spl
|
||||
SK_FILE S Zn szn.spl
|
||||
SK_FILE S S ss.spl
|
||||
&END PARAMETER
|
||||
&END DFTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0e-10
|
||||
MAX_SCF 500
|
||||
SCF_GUESS ATOMIC
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.409 5.409 5.409
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Zn 0.000000 0.000000 0.000000
|
||||
Zn 0.000000 0.500000 0.500000
|
||||
Zn 0.500000 0.000000 0.500000
|
||||
Zn 0.500000 0.500000 0.000000
|
||||
S 0.255000 0.250000 0.250000
|
||||
S 0.250000 0.750000 0.750000
|
||||
S 0.750000 0.250000 0.750000
|
||||
S 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
# 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
|
||||
# see regtest/TEST_FILES
|
||||
"tb_uff.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75463073188988}]
|
||||
"tb_d3.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.76288772623661}]
|
||||
"tb_d3bj.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.76508211988679}]
|
||||
"tb_d2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.85163052938608}]
|
||||
"tb_uff.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.75463073189035}]
|
||||
"tb_d3.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.76288772639609}]
|
||||
"tb_d3bj.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.76508212004095}]
|
||||
"tb_d2.inp" = [{matcher="E_total", tol=1.0E-14, ref=-5.85163052938979}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@
|
|||
"dftd3_t3.inp" = [{matcher="M033", tol=1.0E-14, ref=-0.00021588485204}]
|
||||
#
|
||||
"dftd3src1.inp" = [{matcher="M033", tol=1.0E-14, ref=-0.02610167828267}]
|
||||
"dftd3src2.inp" = [{matcher="M033", tol=1.0E-12, ref=-0.01190472610032}]
|
||||
"dftd3src2.inp" = [{matcher="M033", tol=1.0E-12, ref=-0.01190472345638}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"H2-big-12.inp" = [{matcher="M011", tol=2e-13, ref=-27.808422055041142}]
|
||||
"H2O-32-se-ls-2.inp" = [{matcher="M011", tol=2e-12, ref=-91.844809918052079}]
|
||||
"H2-big-nimages.inp" = [{matcher="M011", tol=2e-13, ref=-27.808422055041149}]
|
||||
"H2O-32-dftb-ls-2.inp" = [{matcher="M011", tol=1e-14, ref=-32.574187281046839}]
|
||||
"H2O-32-dftb-ls-2-2.inp" = [{matcher="M011", tol=1e-14, ref=-32.566467816537354}]
|
||||
"H2O-32-dftb-ls-3.inp" = [{matcher="M011", tol=1e-14, ref=-65.156508566365304}]
|
||||
"H2O-32-dftb-ls-2.inp" = [{matcher="M011", tol=1e-14, ref=-32.574187449191}]
|
||||
"H2O-32-dftb-ls-2-2.inp" = [{matcher="M011", tol=1e-14, ref=-32.56646782062275}]
|
||||
"H2O-32-dftb-ls-3.inp" = [{matcher="M011", tol=1e-14, ref=-65.1565085666187}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
"H2O-32-dftb-ls-4.inp" = [{matcher="M011", tol=1e-14, ref=-65.156509160977791}]
|
||||
"H2O-32-dftb-ls-4.inp" = [{matcher="M011", tol=1e-14, ref=-65.156509277266}]
|
||||
"ace_ala_nme_pm6_01.inp" = [{matcher="M011", tol=2e-13, ref=-67.527159993652958}]
|
||||
"ace_ala_nme_pm6_02.inp" = [{matcher="M011", tol=1e-13, ref=-67.527159993652958}]
|
||||
"ace_ala_nme_pm6_03.inp" = [{matcher="M011", tol=1e-13, ref=-67.527159993652731}]
|
||||
|
|
@ -6,6 +6,6 @@
|
|||
"ace_ala_nme_pm6_05.inp" = [{matcher="M011", tol=1e-13, ref=-67.52716001935687}]
|
||||
"ace_ala_nme_pm6_06.inp" = [{matcher="M011", tol=1e-13, ref=-67.52716001935687}]
|
||||
"H2O-32-dftb-trs4.inp" = [{matcher="M011", tol=1e-14, ref=-32.574186126112359}]
|
||||
"H2O-32-dftb-ls-5.inp" = [{matcher="M011", tol=1e-14, ref=-65.156508922082025}]
|
||||
"H2O-32-dftb-ls-6.inp" = [{matcher="M011", tol=1e-14, ref=-65.156509160977791}]
|
||||
"H2O-32-dftb-ls-5.inp" = [{matcher="M011", tol=1e-14, ref=-65.15650903836215}]
|
||||
"H2O-32-dftb-ls-6.inp" = [{matcher="M011", tol=1e-14, ref=-65.156509277266}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
"H2O-32-dftb-ls-7.inp" = [{matcher="M011", tol=1e-14, ref=-65.156508767453730}]
|
||||
"H2O-32-dftb-ls-8.inp" = [{matcher="M011", tol=1e-14, ref=-65.156509052448342}]
|
||||
"H2O-32-dftb-ls-7.inp" = [{matcher="M011", tol=1e-14, ref=-65.15650888373142}]
|
||||
"H2O-32-dftb-ls-8.inp" = [{matcher="M011", tol=1e-14, ref=-65.15650916873452}]
|
||||
"H2O-32-dftb-trs4-dyn.inp" = [{matcher="M011", tol=1e-14, ref=-32.574186126112359}]
|
||||
"H2_curvy-1.inp" = [{matcher="M011", tol=2e-13, ref=-27.808687287777047}]
|
||||
"H2_curvy-2.inp" = [{matcher="M011", tol=2e-13, ref=-27.808687287777051}]
|
||||
"H2_curvy-3.inp" = [{matcher="M011", tol=2e-13, ref=-27.808687287777047}]
|
||||
"H2O-chebyshev-01.inp" = [{matcher="M011", tol=1e-14, ref=-32.574187281046839}]
|
||||
"H2O-chebyshev-01.inp" = [{matcher="M011", tol=1e-14, ref=-32.574187449191}]
|
||||
"H2O-ewindow-01.inp" = [{matcher="M011", tol=2e-13, ref=-17.178459065026125}]
|
||||
"H2O-dft-ecube.inp" = [{matcher="M011", tol=1e-13, ref=-51.496123149381503}]
|
||||
"H2O-dipole.inp" = [{matcher="M039", tol=1.0E-14, ref=0.4862112}]
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
"H2O-restart-read-curvy.inp" = [{matcher="M011", tol=2e-13, ref=-51.496124073690879}]
|
||||
"H2O-curvy-prop.inp" = [{matcher="M011", tol=1e-13, ref=-17.163926787927892}]
|
||||
"H2O-dftb-tc2-1.inp" = [{matcher="M011", tol=1e-10, ref=-65.156509353902877}]
|
||||
"H2O-dftb-tc2-2.inp" = [{matcher="M011", tol=1e-13, ref=-65.156509348964946}]
|
||||
"H2O-dftb-tc2-2.inp" = [{matcher="M011", tol=1e-13, ref=-65.15650934894896}]
|
||||
"ch4_DIIS-TRS4.inp" = [{matcher="M011", tol=2e-14, ref=-7.995026750654139}]
|
||||
"cho_DIIS-TRS4.inp" = [{matcher="M011", tol=2e-14, ref=-22.137028020221496}]
|
||||
"C_TRS4.inp" = [{matcher="M011", tol=2e-04, ref=-5.308503835702582}]
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
#
|
||||
"nlcc-mix.inp" = [{matcher="E_total", tol=1.0E-12, ref=-18.10530459905852}]
|
||||
"C2H4_GRRM.inp" = [{matcher="E_total", tol=1.0E-12, ref=-13.93037233386821}]
|
||||
"h2o_GRRM.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=1465.672},
|
||||
"h2o_GRRM.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=1465.6104041},
|
||||
{matcher="Vib_frc_const", tol=1.0E-04, ref=0.087928}]
|
||||
"C2H4_frozen_GRRM.inp" = [{matcher="E_total", tol=1.0E-12, ref=-13.93037233386821}]
|
||||
"h2o_frozen_GRRM.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=872.278}]
|
||||
"h2o_frozen_GRRM.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=872.26594122}]
|
||||
#
|
||||
"C2H4_SCINE.inp" = [{matcher="E_total", tol=1.0E-12, ref=-13.14346149279209}]
|
||||
"h2o_SCINE.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=1465.672},
|
||||
"h2o_SCINE.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=1465.6104041},
|
||||
{matcher="Vib_frc_const", tol=1.0E-04, ref=0.087928}]
|
||||
"h2o_NEWTONX.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=1447.380},
|
||||
"h2o_NEWTONX.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=1447.326016},
|
||||
{matcher="Vib_frc_const", tol=1.0E-04, ref=0.085778}]
|
||||
#
|
||||
"cif_symbol_1st_column.inp" = [{matcher="E_total", tol=1.0E-14, ref=-13.41107059145742}]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
"H2O-32-dftb-ls-2_mult.inp" = [{matcher="M011", tol=1e-12, ref=-32.574187281046811}]
|
||||
"H2O-32-dftb-ls-2.inp" = [{matcher="M011", tol=1e-12, ref=-32.574187281046811}]
|
||||
"H2O-32-dftb-ls-2_mult.inp" = [{matcher="M011", tol=1e-12, ref=-32.574187449191}]
|
||||
"H2O-32-dftb-ls-2.inp" = [{matcher="M011", tol=1e-12, ref=-32.574187449191}]
|
||||
"H2O-OT-ASPC-1.inp" = [{matcher="E_total", tol=4e-14, ref=-17.13993294752105}]
|
||||
"H2-big-nimages.inp" = [{matcher="M011", tol=2e-13, ref=-27.808422055041138}]
|
||||
"H2O_grad_gpw.inp" = [{matcher="M011", tol=7e-08, ref=-16.990049367524865}]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
"H2O-32-dftb-ls-2_mult.inp" = [{matcher="M011", tol=1e-12, ref=-32.574187281046811}]
|
||||
"H2O-32-dftb-ls-2.inp" = [{matcher="M011", tol=1e-12, ref=-32.574187281046811}]
|
||||
"H2O-32-dftb-ls-2_mult.inp" = [{matcher="M011", tol=1e-12, ref=-32.574187449191}]
|
||||
"H2O-32-dftb-ls-2.inp" = [{matcher="M011", tol=1e-12, ref=-32.574187449191}]
|
||||
"H2O-OT-ASPC-1.inp" = [{matcher="E_total", tol=4e-14, ref=-17.13993294752105}]
|
||||
"H2O-OT-ASPC-1_clusters.inp" = [{matcher="E_total", tol=4e-14, ref=-17.13993294752105}]
|
||||
"H2-big-nimages.inp" = [{matcher="M011", tol=2e-13, ref=-27.808422055041138}]
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@
|
|||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 1.0
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD XTB
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@
|
|||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 1.0
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD XTB
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@
|
|||
"h2o_f08a.inp" = [{matcher="E_total", tol=1.0E-12, ref=-17.23033099140069}]
|
||||
"h2o_f08b.inp" = [{matcher="E_total", tol=1.0E-12, ref=-17.23207213802078}]
|
||||
"CH2O_stda-xtb-s_virtual_shift.inp" = [{matcher="M037", tol=1.0E-06, ref=0.779158E-01}]
|
||||
"water_xTB_virtual_shift.inp" = [{matcher="M037", tol=1.0E-06, ref=0.236164E+00}]
|
||||
"water_xTB_virtual_shift.inp" = [{matcher="M037", tol=1.0E-06, ref=0.236163E+00}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@
|
|||
"SiC-stress-pbe-nlcc.inp" = [{matcher="M031", tol=1.0E-09, ref=-1.84632367133E+05}]
|
||||
"SiC-stress-tpss.inp" = [{matcher="M031", tol=1.0E-09, ref=1.33145056114E+04}]
|
||||
"SiC-stress-br89.inp" = [{matcher="M031", tol=1.0E-09, ref=-5.12223409624E+04}]
|
||||
"LiH-stress-pbe-uks-vdW.inp" = [{matcher="M031", tol=1.0E-09, ref=-2.66548358795E+03}]
|
||||
"LiH-stress-pbe-uks-vdW.inp" = [{matcher="M031", tol=1.0E-09, ref=-2.61376786609E+03}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
"H2O_tddfpt_stda-pbe-t.inp" = [{matcher="M037", tol=1.0E-05, ref=0.595565E+00}]
|
||||
"H2O_tddfpt_stda-pbe0-s.inp" = [{matcher="M037", tol=1.0E-05, ref=0.637391E+00}]
|
||||
"H2O_tddfpt_stda-pbe0-t.inp" = [{matcher="M037", tol=1.0E-05, ref=0.633489E+00}]
|
||||
"H2O_tddfpt_stda-s-1.inp" = [{matcher="M037", tol=1.0E-05, ref=0.173021E+00}]
|
||||
"H2O_tddfpt_stda-s-1.inp" = [{matcher="M037", tol=1.0E-05, ref=0.173147E+00}]
|
||||
"NO_tddfpt_stda-s-1.inp" = [{matcher="M037", tol=1.0E-05, ref=0.375613E+00}]
|
||||
"water_xTB.inp" = [{matcher="M037", tol=2.0E-05, ref=0.125917E+00}]
|
||||
"water_xTBi_NTO.inp" = [{matcher="M037", tol=2.0E-05, ref=0.125917E+00}]
|
||||
|
|
|
|||
|
|
@ -38,5 +38,5 @@
|
|||
# dispersion
|
||||
"2h2o_disp1.inp" = [{matcher="M003", tol=1.0E-14, ref=-649.05174548613479}]
|
||||
"2h2o_disp2.inp" = [{matcher="M003", tol=1.0E-14, ref=-649.05174548613479}]
|
||||
"2h2o_disp3.inp" = [{matcher="M003", tol=1.0E-14, ref=-649.14047694554415}]
|
||||
"2h2o_disp3.inp" = [{matcher="M003", tol=1.0E-14, ref=-649.1404770436569}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -35,10 +35,12 @@ class Matcher(Protocol):
|
|||
|
||||
# ======================================================================================
|
||||
class GenericMatcher(Matcher):
|
||||
def __init__(self, pattern: str, col: int):
|
||||
def __init__(self, pattern: str, col: int, regex: bool = False):
|
||||
self.pattern = pattern
|
||||
for c in r"[]()|+*?":
|
||||
pattern = pattern.replace(c, f"\\{c}") # escape special chars
|
||||
self.regex_mode = regex
|
||||
if not regex:
|
||||
for c in r"[]()|+*?":
|
||||
pattern = pattern.replace(c, f"\\{c}") # escape special chars
|
||||
self.regex = re.compile(pattern)
|
||||
self.col = col
|
||||
|
||||
|
|
@ -48,8 +50,12 @@ class GenericMatcher(Matcher):
|
|||
assert isinstance(ref, float) or isinstance(ref, int)
|
||||
# grep result
|
||||
for line in reversed(output.split("\n")):
|
||||
if self.regex.search(line):
|
||||
value_str = line.split()[self.col - 1]
|
||||
match = self.regex.search(line)
|
||||
if match:
|
||||
if self.regex_mode and match.groups():
|
||||
value_str = match.group(1)
|
||||
else:
|
||||
value_str = line.split()[self.col - 1]
|
||||
break
|
||||
else:
|
||||
error = f"Result not found: '{self.pattern}'.\n"
|
||||
|
|
@ -57,7 +63,7 @@ class GenericMatcher(Matcher):
|
|||
|
||||
# parse result
|
||||
try:
|
||||
value = float(value_str)
|
||||
value = float(value_str.replace("D", "E"))
|
||||
except:
|
||||
error = f"Could not parse result as float: '{value_str}'.\n"
|
||||
return MatchResult("WRONG RESULT", error, value=None)
|
||||
|
|
@ -72,6 +78,19 @@ class GenericMatcher(Matcher):
|
|||
return MatchResult("OK", error=None, value=value) # passed
|
||||
|
||||
|
||||
# ======================================================================================
|
||||
class TextPresenceMatcher(Matcher):
|
||||
def __init__(self, text: str):
|
||||
self.text = text
|
||||
|
||||
def run(self, output: str, **kwargs: Any) -> MatchResult:
|
||||
if self.text not in output:
|
||||
return MatchResult(
|
||||
"WRONG RESULT", f"Text not found: '{self.text}'.\n", value=None
|
||||
)
|
||||
return MatchResult("OK", error=None, value=None)
|
||||
|
||||
|
||||
# ======================================================================================
|
||||
class MatcherRegistry(Dict[str, Matcher]):
|
||||
def __setitem__(self, key: str, value: Matcher) -> None:
|
||||
|
|
@ -179,6 +198,15 @@ registry["IC_gap"] = GenericMatcher(r"IC HOMO-LUMO gap (eV)", col=5)
|
|||
|
||||
registry["M081"] = GenericMatcher(r"HOMO SCF Cycle: 4", col=9)
|
||||
registry["M082"] = GenericMatcher(r"DEBUG| Sum of differences:", col=5)
|
||||
registry["DEBUG_stress_sum"] = GenericMatcher(
|
||||
r"DEBUG\|\s+Sum of differences\s+([-+0-9.EeDd]+)$", col=5, regex=True
|
||||
)
|
||||
registry["DEBUG_force_sum"] = GenericMatcher(
|
||||
r"DEBUG\|\s+Sum of differences:\s+([-+0-9.EeDd]+)", col=5, regex=True
|
||||
)
|
||||
registry["XTB_reference_cli_failed"] = TextPresenceMatcher(
|
||||
"tblite reference CLI check failed to run."
|
||||
)
|
||||
registry["M083"] = GenericMatcher(r"1[ 1] - 2[ 1]", col=7)
|
||||
registry["M084"] = GenericMatcher(r"Ionization potential of the excited atom:", col=7)
|
||||
registry["M085"] = GenericMatcher(r"Total FORCE_EVAL ( SIRIUS ) energy", col=9)
|
||||
|
|
|
|||
|
|
@ -4,19 +4,20 @@
|
|||
# 1 compares the last total energy in the file
|
||||
# for details see cp2k/tools/do_regtest
|
||||
"ch2o.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.84456570296343}]
|
||||
"ch2o_geo.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.84652942485169}]
|
||||
"ch2o_scc_mixer_tblite.inp" = [{matcher="E_total", tol=1.0E-08, ref=-7.84456570570919}]
|
||||
"ch2o_geo.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.84652942195117}]
|
||||
"ch2o_lsd.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.19650182424155}]
|
||||
"ch2o_smear.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.19753850357134}]
|
||||
"tmol.inp" = [{matcher="E_total", tol=1.0E-12, ref=-41.90845660778482}]
|
||||
"h2.inp" = [{matcher="E_total", tol=1.0E-12, ref=-1.03458223634251}]
|
||||
"h2_kab.inp" = [{matcher="E_total", tol=1.0E-12, ref=-0.99816707611986}]
|
||||
"h2o-md.inp" = [{matcher="E_total", tol=1.0E-12, ref=-185.14385714438652}]
|
||||
"h2o-md.inp" = [{matcher="E_total", tol=1.0E-12, ref=-185.14383606866977}]
|
||||
"h2o_str.inp" = [{matcher="E_total", tol=1.0E-12, ref=-5.76524673249110}]
|
||||
"h2o_strsym.inp" = []
|
||||
"h2o-atprop.inp" = [{matcher="E_total", tol=1.0E-10, ref=-185.16262201741714}]
|
||||
"h2o-atprop.inp" = [{matcher="E_total", tol=1.0E-10, ref=-185.16260010725958}]
|
||||
"h2o-atprop0.inp" = [{matcher="E_total", tol=1.0E-12, ref=-187.45499307126425}]
|
||||
"si_geo.inp" = [{matcher="E_total", tol=1.0E-11, ref=-14.51194886943525}]
|
||||
"si_kp.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.73191471087850}]
|
||||
"si_kp.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.73191475194472}]
|
||||
"h2o_dimer.inp" = [{matcher="E_total", tol=1.0E-12, ref=-11.54506384435821}]
|
||||
"ghost.inp" = [{matcher="E_total", tol=1.0E-12, ref=-1.03458221876736}]
|
||||
"tcif.inp" = [{matcher="E_total", tol=1.0E-12, ref=-27.71649842848894}]
|
||||
|
|
|
|||
43
tests/xTB/regtest-1/ch2o_scc_mixer_tblite.inp
Normal file
43
tests/xTB/regtest-1/ch2o_scc_mixer_tblite.inp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT ch2o_scc_mixer_tblite
|
||||
RUN_TYPE ENERGY_FORCE
|
||||
&END GLOBAL
|
||||
|
||||
&FORCE_EVAL
|
||||
&DFT
|
||||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
COULOMB_INTERACTION T
|
||||
GFN_TYPE 1
|
||||
SCC_MIXER TBLITE
|
||||
TBLITE_MIXER_DAMPING 0.002
|
||||
&PARAMETER
|
||||
DISPERSION_PARAMETER_FILE dftd3.dat
|
||||
&END PARAMETER
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0E-10
|
||||
MAX_SCF 500
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 20.0 20.0 20.0
|
||||
PERIODIC NONE
|
||||
&END CELL
|
||||
&COORD
|
||||
O 0.051368 0.000000 0.000000
|
||||
C 1.278612 0.000000 0.000000
|
||||
H 1.870460 0.939607 0.000000
|
||||
H 1.870460 -0.939607 0.000000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
|
@ -6,7 +6,10 @@
|
|||
SCHEME MONKHORST-PACK 2 2 2
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA [bohr^-1] 1.0
|
||||
EWALD_TYPE SPME
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
|
|
@ -27,19 +30,17 @@
|
|||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
DO_EWALD T
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 100
|
||||
EPS_SCF 1.e-6
|
||||
IGNORE_CONVERGENCE_FAILURE
|
||||
MAX_SCF 100
|
||||
MAX_SCF 500
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.15
|
||||
METHOD BROYDEN_MIXING
|
||||
NBROYDEN 12
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART off
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
# for details see cp2k/tools/do_regtest
|
||||
# test mulliken constraints
|
||||
"H2O-field-gopt.inp" = [{matcher="E_total", tol=4e-10, ref=-5.76970818700878}]
|
||||
"H2O-field-gopt-lsd.inp" = [{matcher="E_total", tol=4e-12, ref=-5.76970797174834}]
|
||||
"H2O-field-gopt-lsd.inp" = [{matcher="E_total", tol=4e-12, ref=-5.76970797200779}]
|
||||
"H2O-field.inp" = []
|
||||
"H2O-field-lsd.inp" = [{matcher="E_total", tol=4e-14, ref=-5.76959233315201}]
|
||||
"HF-field.inp" = [{matcher="E_total", tol=1e-12, ref=-5.70162277773935}]
|
||||
|
|
@ -16,6 +16,6 @@
|
|||
"HF-dfield.inp" = [{matcher="E_total", tol=1e-12, ref=-5.66052242442153}]
|
||||
"HF-dfield-debug.inp" = []
|
||||
"HF-loc-field.inp" = [{matcher="E_total", tol=1e-12, ref=-5.65286303322644}]
|
||||
"HF-loc-field-gopt.inp" = [{matcher="E_total", tol=2e-08, ref=-5.65791503021294}]
|
||||
"HF-loc-field-gopt.inp" = [{matcher="E_total", tol=2e-08, ref=-5.65759961599548}]
|
||||
"HF-loc-field-debug.inp" = []
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
# 1 compares the last total energy in the file
|
||||
# for details see cp2k/tools/do_regtest
|
||||
"NdF3.inp" = [{matcher="E_total", tol=1.0E-12, ref=-16.30904020314352}]
|
||||
"h2o_rtp.inp" = [{matcher="E_total", tol=1.0E-12, ref=-5.76539152285971}]
|
||||
"h2o_emd.inp" = [{matcher="E_total", tol=1.0E-12, ref=-5.76621483534992}]
|
||||
"h2o_rtp.inp" = [{matcher="E_total", tol=1.0E-12, ref=-5.76539102399686}]
|
||||
"h2o_emd.inp" = [{matcher="E_total", tol=1.0E-12, ref=-5.76569266115801}]
|
||||
"si8_wan.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.36588818966667}]
|
||||
"si_kp.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.73033123294306}]
|
||||
"si_kp_kpsym.inp" = [{matcher="E_total", tol=1.0E-11, ref=-14.74208554207339},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=32}]
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4}]
|
||||
"si_kp_spglib_backend.inp" = [{matcher="E_total", tol=1.0E-11, ref=-14.74208554207337},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=32}]
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4}]
|
||||
"tmol.inp" = [{matcher="E_total", tol=1.0E-12, ref=-41.90845660778482}]
|
||||
"ch2o.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.84456570305608}]
|
||||
"ch2o_print.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.84456570305608}]
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
"ch2o_dens.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.84456570305607}]
|
||||
"ch2o_loc.inp" = [{matcher="E_total", tol=1.0E-12, ref=-13.55045387785839}]
|
||||
"ch2o_mos.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.84456570305607}]
|
||||
"si_print.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.73033123294387}]
|
||||
"si_band.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.73033123294387}]
|
||||
"H2O-geo-pdos.inp" = [{matcher="E_total", tol=1.0E-12, ref=-5.76872484344198}]
|
||||
"graphite-stm.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.91403228336802}]
|
||||
"si_dos.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.73033123294387}]
|
||||
"si_print.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.73033123463482}]
|
||||
"si_band.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.73033123463482}]
|
||||
"H2O-geo-pdos.inp" = [{matcher="E_total", tol=1.0E-12, ref=-5.76872484352614}]
|
||||
"graphite-stm.inp" = [{matcher="E_total", tol=1.0E-12, ref=-7.91403223193017}]
|
||||
"si_dos.inp" = [{matcher="E_total", tol=1.0E-12, ref=-14.73033123463482}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -5,6 +5,14 @@
|
|||
&KPOINTS
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA [bohr^-1] 1.0
|
||||
EWALD_TYPE SPME
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&PRINT
|
||||
&BAND_STRUCTURE
|
||||
&KPOINT_SET
|
||||
|
|
@ -15,18 +23,16 @@
|
|||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
DO_EWALD T
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 100
|
||||
EPS_SCF 1.e-6
|
||||
MAX_SCF 100
|
||||
MAX_SCF 500
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.40
|
||||
METHOD BROYDEN_MIXING
|
||||
NBUFFER 10
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
|
|
|
|||
|
|
@ -4,6 +4,14 @@
|
|||
&KPOINTS
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA [bohr^-1] 1.0
|
||||
EWALD_TYPE SPME
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&PRINT
|
||||
&DOS
|
||||
&END DOS
|
||||
|
|
@ -11,18 +19,16 @@
|
|||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
DO_EWALD T
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 100
|
||||
EPS_SCF 1.e-6
|
||||
MAX_SCF 100
|
||||
MAX_SCF 500
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.40
|
||||
METHOD BROYDEN_MIXING
|
||||
NBUFFER 10
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 1.0
|
||||
EWALD_TYPE SPME
|
||||
|
|
@ -20,7 +22,6 @@
|
|||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
DO_EWALD T
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 1.0
|
||||
EWALD_TYPE SPME
|
||||
|
|
@ -21,7 +23,6 @@
|
|||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
DO_EWALD T
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
|
|
|
|||
|
|
@ -5,6 +5,14 @@
|
|||
&KPOINTS
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA [bohr^-1] 1.0
|
||||
EWALD_TYPE SPME
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&PRINT
|
||||
&ENERGY_WINDOWS
|
||||
N_WINDOWS 10
|
||||
|
|
@ -40,18 +48,16 @@
|
|||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
DO_EWALD T
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 100
|
||||
EPS_SCF 1.e-6
|
||||
MAX_SCF 100
|
||||
MAX_SCF 500
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.40
|
||||
METHOD BROYDEN_MIXING
|
||||
NBUFFER 10
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# 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
|
||||
"H2O-32-xtb-ls-1.inp" = [{matcher="M011", tol=1.0E-12, ref=-46.140441340701784}]
|
||||
"H2O-32-xtb-ls-1.inp" = [{matcher="M011", tol=1.0E-12, ref=-46.14044075497412}]
|
||||
"H2O-32-xtb-ls-2.inp" = [{matcher="M011", tol=1.0E-12, ref=-46.149897222623842}]
|
||||
"H2O-32-xtb-ls-3.inp" = [{matcher="M011", tol=1.0E-12, ref=-92.314662149041851}]
|
||||
"H2O-32-xtb-ls-4.inp" = [{matcher="M011", tol=1.0E-12, ref=-92.314660970750793}]
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"H2O-xtb-tc2-2.inp" = [{matcher="M011", tol=1.0E-12, ref=-92.314663104135690}]
|
||||
"H2O-32-xtb-trs4.inp" = [{matcher="M011", tol=1.0E-12, ref=-46.149897253047165}]
|
||||
"H2O-32-xtb-trs4-dyn.inp" = [{matcher="M011", tol=1.0E-12, ref=-46.149897253047165}]
|
||||
"h2o_vib.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=1465.672},
|
||||
"h2o_vib.inp" = [{matcher="Vib_freq", tol=8.0E-06, ref=1465.6104041},
|
||||
{matcher="Vib_frc_const", tol=1.0E-04, ref=0.087927}]
|
||||
"tmol.inp" = [{matcher="M011", tol=1.0E-12, ref=-41.908456607784821}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
&END KPOINTS
|
||||
&POISSON
|
||||
&EWALD
|
||||
ALPHA [bohr^-1] 1.0
|
||||
EWALD_TYPE SPME
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
|
|
@ -36,7 +37,7 @@
|
|||
&SCF
|
||||
ADDED_MOS 400
|
||||
EPS_SCF 1.0E-7
|
||||
MAX_SCF 500
|
||||
MAX_SCF 1000
|
||||
SCF_GUESS MOPAC
|
||||
&DIAGONALIZATION
|
||||
ALGORITHM STANDARD
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
# 1 compares the last total energy in the file
|
||||
# for details see cp2k/tools/do_regtest
|
||||
"AdeThyvdW.inp" = [{matcher="E_total", tol=1.0E-12, ref=-58.89501835809043}]
|
||||
"ice.inp" = [{matcher="E_total", tol=1.0E-10, ref=-46.30708081122568}]
|
||||
"ice2.inp" = [{matcher="E_total", tol=1.0E-10, ref=-46.30708081091197}]
|
||||
"Ru_geo.inp" = [{matcher="E_total", tol=5.0E-09, ref=-7.01272555836003}]
|
||||
"ice.inp" = [{matcher="E_total", tol=1.0E-10, ref=-46.30445554804503}]
|
||||
"ice2.inp" = [{matcher="E_total", tol=1.0E-10, ref=-46.30445554772967}]
|
||||
"ef_stress1.inp" = []
|
||||
"ef_stress2.inp" = []
|
||||
"ef_stress3.inp" = []
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
# for details see cp2k/tools/do_regtest
|
||||
"ch2o_t01.inp" = [{matcher="M086", tol=1.0E-12, ref=0.108915750509E+01}]
|
||||
"ch2o_t02.inp" = [{matcher="M086", tol=1.0E-12, ref=0.108915750509E+01}]
|
||||
"ch2o_t03.inp" = [{matcher="M086", tol=1.0E-12, ref=0.114819181828E+01}]
|
||||
"ch2o_t04.inp" = [{matcher="M086", tol=1.0E-12, ref=0.109829662200E+01}]
|
||||
"ch2o_t03.inp" = [{matcher="M086", tol=1.0E-12, ref=0.112728364233E+01}]
|
||||
"ch2o_t04.inp" = [{matcher="M086", tol=1.0E-12, ref=0.109828925085E+01}]
|
||||
"ch2o_t05.inp" = [{matcher="M087", tol=1.0E-12, ref=0.226843652140E+02}]
|
||||
"ch2o_t06.inp" = [{matcher="M087", tol=1.0E-12, ref=0.229761888713E+02}]
|
||||
"ch2o_t06.inp" = [{matcher="M087", tol=1.0E-12, ref=0.229748436012E+02}]
|
||||
"ch2o_t07.inp" = [{matcher="M086", tol=1.0E-12, ref=0.954101834865E+00}]
|
||||
"ch2o_t08.inp" = [{matcher="M086", tol=1.0E-12, ref=0.963128388956E+00}]
|
||||
"ch2o_t08.inp" = [{matcher="M086", tol=1.0E-12, ref=0.963121521347E+00}]
|
||||
"ch3br_nonbond_2.inp" = [{matcher="E_total", tol=1.0E-12, ref=-11.78062819229165}]
|
||||
"ch3br_nonbond.inp" = [{matcher="E_total", tol=1.0E-12, ref=-11.78062802267188}]
|
||||
"ch3br_atprop_nonbond.inp" = [{matcher="E_total", tol=1.0E-10, ref=-11.78112909303997}]
|
||||
"ch3br_atprop_nonbond.inp" = [{matcher="E_total", tol=1.0E-10, ref=-11.78112904495693}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -13,10 +13,25 @@
|
|||
"ch2o_8.inp" = []
|
||||
"ch2o_9.inp" = []
|
||||
"si_kp.inp" = []
|
||||
"si_kp_kpsym.inp" = [{matcher="E_total", tol=1.0E-11, ref=-13.92586350112312},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4},
|
||||
{matcher="M072", tol=1.0E-12, ref=0.0},
|
||||
{matcher="M031", tol=1.0E-5, ref=2.61113942316E+04}]
|
||||
"si_kp_kpsym_atomdisp.inp" = [{matcher="E_total", tol=1.0E-11, ref=-13.92586348551223},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=12}]
|
||||
"si_kp_spglib_backend.inp" = [{matcher="E_total", tol=1.0E-11, ref=-13.92586350112312},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4},
|
||||
{matcher="M072", tol=1.0E-12, ref=0.0},
|
||||
{matcher="M031", tol=1.0E-5, ref=2.61113942316E+04}]
|
||||
"si_kp_spglib_reduction_atomdisp.inp" = [{matcher="E_total", tol=1.0E-11, ref=-13.92586348551223},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=12}]
|
||||
"si_kp_kpsym_debug_stress.inp" = [{matcher="E_total", tol=1.0E-11, ref=-13.92597057189198},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=32},
|
||||
{matcher="M042", tol=1.0E-5, ref=0.0}]
|
||||
"si_smear.inp" = []
|
||||
"SiC_virial.inp" = []
|
||||
"SiC-stress.inp" = []
|
||||
"ch2o_eeq.inp" = [{matcher="E_total", tol=1.0E-11, ref=-7.84498782090161}]
|
||||
"SiC-stress.inp" = [{matcher="M042", tol=1.0E-04, ref=0.0}]
|
||||
"ch2o_eeq.inp" = [{matcher="E_total", tol=1.0E-11, ref=-7.84498764689590}]
|
||||
"ch2o_eloc.inp" = []
|
||||
"ch2o_eper.inp" = []
|
||||
"ch2o_ls1.inp" = [{matcher="E_total", tol=1.0E-12, ref=-6.46515972056537}]
|
||||
|
|
|
|||
82
tests/xTB/regtest-gfn0/si_kp_kpsym.inp
Normal file
82
tests/xTB/regtest-gfn0/si_kp_kpsym.inp
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
PARALLEL_GROUP_SIZE -1
|
||||
SCHEME MONKHORST-PACK 4 4 4
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 50
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE 0
|
||||
VDW_POTENTIAL DFTD3
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 100
|
||||
EPS_SCF 1.e-6
|
||||
MAX_SCF 100
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.40
|
||||
METHOD BROYDEN_MIXING
|
||||
NBUFFER 10
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&SMEAR
|
||||
ELECTRONIC_TEMPERATURE 1000
|
||||
METHOD FERMI_DIRAC
|
||||
&END SMEAR
|
||||
&END SCF
|
||||
&END DFT
|
||||
&PRINT
|
||||
&FORCES ON
|
||||
&END FORCES
|
||||
&STRESS_TENSOR
|
||||
COMPONENTS
|
||||
&END STRESS_TENSOR
|
||||
&END PRINT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.431 5.431 5.431
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Si 0.000000 0.000000 0.000000
|
||||
Si 0.500000 0.500000 0.000000
|
||||
Si 0.500000 0.000000 0.500000
|
||||
Si 0.000000 0.500000 0.500000
|
||||
Si 0.250000 0.250000 0.250000
|
||||
Si 0.250000 0.750000 0.750000
|
||||
Si 0.750000 0.250000 0.750000
|
||||
Si 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT Si_gfn0_kpsym
|
||||
RUN_TYPE ENERGY_FORCE
|
||||
&END GLOBAL
|
||||
82
tests/xTB/regtest-gfn0/si_kp_kpsym_atomdisp.inp
Normal file
82
tests/xTB/regtest-gfn0/si_kp_kpsym_atomdisp.inp
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
PARALLEL_GROUP_SIZE -1
|
||||
SCHEME MONKHORST-PACK 4 4 4
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 50
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE 0
|
||||
VDW_POTENTIAL DFTD3
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 100
|
||||
EPS_SCF 1.e-6
|
||||
MAX_SCF 100
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.40
|
||||
METHOD BROYDEN_MIXING
|
||||
NBUFFER 10
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&SMEAR
|
||||
ELECTRONIC_TEMPERATURE 1000
|
||||
METHOD FERMI_DIRAC
|
||||
&END SMEAR
|
||||
&END SCF
|
||||
&END DFT
|
||||
&PRINT
|
||||
&FORCES ON
|
||||
&END FORCES
|
||||
&STRESS_TENSOR
|
||||
COMPONENTS
|
||||
&END STRESS_TENSOR
|
||||
&END PRINT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.431 5.431 5.431
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Si 0.000050 0.000000 0.000000
|
||||
Si 0.500000 0.500000 0.000000
|
||||
Si 0.500000 0.000000 0.500000
|
||||
Si 0.000000 0.500000 0.500000
|
||||
Si 0.250000 0.250000 0.250000
|
||||
Si 0.250000 0.750000 0.750000
|
||||
Si 0.750000 0.250000 0.750000
|
||||
Si 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT Si_gfn0_kpsym_atomdisp
|
||||
RUN_TYPE ENERGY_FORCE
|
||||
&END GLOBAL
|
||||
84
tests/xTB/regtest-gfn0/si_kp_kpsym_debug_stress.inp
Normal file
84
tests/xTB/regtest-gfn0/si_kp_kpsym_debug_stress.inp
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR DIAGONAL_ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
PARALLEL_GROUP_SIZE -1
|
||||
SCHEME MONKHORST-PACK 4 4 4
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 50
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE 0
|
||||
VDW_POTENTIAL DFTD3
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 100
|
||||
EPS_SCF 1.e-6
|
||||
MAX_SCF 100
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.40
|
||||
METHOD BROYDEN_MIXING
|
||||
NBUFFER 10
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&SMEAR
|
||||
ELECTRONIC_TEMPERATURE 1000
|
||||
METHOD FERMI_DIRAC
|
||||
&END SMEAR
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.431 5.431 5.431
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Si 0.000000 0.000000 0.000000
|
||||
Si 0.500000 0.500000 0.000000
|
||||
Si 0.500000 0.000000 0.500000
|
||||
Si 0.000000 0.500000 0.500000
|
||||
Si 0.250000 0.250000 0.250000
|
||||
Si 0.250000 0.750000 0.750000
|
||||
Si 0.750000 0.250000 0.750000
|
||||
Si 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT Si_gfn0_kpsym_debug
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES F
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DX 0.0005
|
||||
EPS_NO_ERROR_CHECK 0.000001
|
||||
MAX_RELATIVE_ERROR 0.3
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
83
tests/xTB/regtest-gfn0/si_kp_spglib_backend.inp
Normal file
83
tests/xTB/regtest-gfn0/si_kp_spglib_backend.inp
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
PARALLEL_GROUP_SIZE -1
|
||||
SCHEME MONKHORST-PACK 4 4 4
|
||||
SYMMETRY ON
|
||||
SYMMETRY_BACKEND SPGLIB
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 50
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE 0
|
||||
VDW_POTENTIAL DFTD3
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 100
|
||||
EPS_SCF 1.e-6
|
||||
MAX_SCF 100
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.40
|
||||
METHOD BROYDEN_MIXING
|
||||
NBUFFER 10
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&SMEAR
|
||||
ELECTRONIC_TEMPERATURE 1000
|
||||
METHOD FERMI_DIRAC
|
||||
&END SMEAR
|
||||
&END SCF
|
||||
&END DFT
|
||||
&PRINT
|
||||
&FORCES ON
|
||||
&END FORCES
|
||||
&STRESS_TENSOR
|
||||
COMPONENTS
|
||||
&END STRESS_TENSOR
|
||||
&END PRINT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.431 5.431 5.431
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Si 0.000000 0.000000 0.000000
|
||||
Si 0.500000 0.500000 0.000000
|
||||
Si 0.500000 0.000000 0.500000
|
||||
Si 0.000000 0.500000 0.500000
|
||||
Si 0.250000 0.250000 0.250000
|
||||
Si 0.250000 0.750000 0.750000
|
||||
Si 0.750000 0.250000 0.750000
|
||||
Si 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT Si_gfn0_spglib_backend
|
||||
RUN_TYPE ENERGY_FORCE
|
||||
&END GLOBAL
|
||||
83
tests/xTB/regtest-gfn0/si_kp_spglib_reduction_atomdisp.inp
Normal file
83
tests/xTB/regtest-gfn0/si_kp_spglib_reduction_atomdisp.inp
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
@SET NREP 1
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
PARALLEL_GROUP_SIZE -1
|
||||
SCHEME MONKHORST-PACK 4 4 4
|
||||
SYMMETRY ON
|
||||
SYMMETRY_REDUCTION_METHOD SPGLIB
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&EWALD
|
||||
ALPHA 0.35
|
||||
EWALD_TYPE SPME
|
||||
GMAX 50
|
||||
&END EWALD
|
||||
&END POISSON
|
||||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE 0
|
||||
VDW_POTENTIAL DFTD3
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS 100
|
||||
EPS_SCF 1.e-6
|
||||
MAX_SCF 100
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.40
|
||||
METHOD BROYDEN_MIXING
|
||||
NBUFFER 10
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&SMEAR
|
||||
ELECTRONIC_TEMPERATURE 1000
|
||||
METHOD FERMI_DIRAC
|
||||
&END SMEAR
|
||||
&END SCF
|
||||
&END DFT
|
||||
&PRINT
|
||||
&FORCES ON
|
||||
&END FORCES
|
||||
&STRESS_TENSOR
|
||||
COMPONENTS
|
||||
&END STRESS_TENSOR
|
||||
&END PRINT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.431 5.431 5.431
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Si 0.000050 0.000000 0.000000
|
||||
Si 0.500000 0.500000 0.000000
|
||||
Si 0.500000 0.000000 0.500000
|
||||
Si 0.000000 0.500000 0.500000
|
||||
Si 0.250000 0.250000 0.250000
|
||||
Si 0.250000 0.750000 0.750000
|
||||
Si 0.750000 0.250000 0.750000
|
||||
Si 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
|
||||
&END TOPOLOGY
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT Si_gfn0_spglib_reduction_atomdisp
|
||||
RUN_TYPE ENERGY_FORCE
|
||||
&END GLOBAL
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
#
|
||||
"ch2o_t07.inp" = []
|
||||
"ch2o_t08.inp" = []
|
||||
"ch2o_cn_stress.inp" = []
|
||||
#
|
||||
#ch2o_t09.inp 0
|
||||
#ch2o_t10.inp 0
|
||||
|
|
|
|||
53
tests/xTB/regtest-gfn1-d/ch2o_cn_stress.inp
Normal file
53
tests/xTB/regtest-gfn1-d/ch2o_cn_stress.inp
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT CH2O-cn-stress
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DE 0.0002
|
||||
DEBUG_DIPOLE F
|
||||
DEBUG_FORCES F
|
||||
DEBUG_POLARIZABILITY F
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DX 0.0005
|
||||
EPS_NO_ERROR_CHECK 1.0E-7
|
||||
STOP_ON_MISMATCH T
|
||||
&END DEBUG
|
||||
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
COULOMB_INTERACTION F
|
||||
DO_EWALD T
|
||||
DO_NONBONDED F
|
||||
GFN_TYPE 1
|
||||
USE_HALOGEN_CORRECTION F
|
||||
VDW_POTENTIAL NONE
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.0E-10
|
||||
MAX_SCF 300
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.0 5.0 5.0
|
||||
&END CELL
|
||||
&COORD
|
||||
O 0.051368 0.000000 0.000000
|
||||
C 1.278612 0.000000 0.000000
|
||||
H 1.870460 0.939607 0.000000
|
||||
H 1.870460 -0.939607 0.000000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
|
@ -10,6 +10,6 @@
|
|||
#h2o_f15.inp 1 1.0E-12 0.000000E+00
|
||||
#h2o_f16.inp 1 1.0E-12 0.000000E+00
|
||||
#h2o_f17.inp 1 1.0E-12 0.000000E+00
|
||||
"h2o_f18.inp" = [{matcher="E_total", tol=1.0E-12, ref=-5.76959310723082}]
|
||||
"h2o_f18.inp" = [{matcher="E_total", tol=1.0E-12, ref=-5.76904757361574}]
|
||||
#h2o_f19.inp 1 1.0E-12 0.000000E+00
|
||||
#EOF
|
||||
|
|
|
|||
61
tests/xTB/regtest-tblite-gfn1-grad/Ar_fcc_gfn1_kp_debug.inp
Normal file
61
tests/xTB/regtest-tblite-gfn1-grad/Ar_fcc_gfn1_kp_debug.inp
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL MEDIUM
|
||||
PROJECT Ar_fcc_gfn1_kp
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES T
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DX 0.0001
|
||||
MAX_RELATIVE_ERROR 0.5
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
FULL_GRID OFF
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&QS
|
||||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
EPS_SCF 1.e-10
|
||||
MAX_SCF 200
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.2600000000 5.2600000000 5.2600000000
|
||||
PERIODIC XYZ
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Ar 0.113000 0.021000 0.037000
|
||||
Ar 0.486000 0.523000 0.014000
|
||||
Ar 0.517000 0.032000 0.491000
|
||||
Ar 0.029000 0.468000 0.546000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
|
|
|
|||
65
tests/xTB/regtest-tblite-gfn1-grad/Si_gfn1_fd_stress.inp
Normal file
65
tests/xTB/regtest-tblite-gfn1-grad/Si_gfn1_fd_stress.inp
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL MEDIUM
|
||||
PROJECT dat_Si
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES F
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DX 0.0001
|
||||
MAX_RELATIVE_ERROR 0.5
|
||||
STOP_ON_MISMATCH F
|
||||
&END DEBUG
|
||||
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&KPOINTS
|
||||
SCHEME NONE
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&END POISSON
|
||||
&QS
|
||||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS -1 -1
|
||||
EPS_SCF 1.e-8
|
||||
MAX_SCF 100
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&SMEAR ON
|
||||
ELECTRONIC_TEMPERATURE 300
|
||||
METHOD Fermi_Dirac
|
||||
&END SMEAR
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.4310000000 5.4310000000000 5.431000000000
|
||||
PERIODIC XYZ
|
||||
&END CELL
|
||||
&COORD
|
||||
Si 0.00000000 0.00000000 0.00000000
|
||||
Si 2.71550000 2.71550000 0.00000000
|
||||
Si 2.71550000 0.00000000 2.71550000
|
||||
Si 0.00000000 2.71550000 2.71550000
|
||||
Si 1.35775000 1.35775000 1.35775000
|
||||
Si 1.35775000 4.10040500 4.10040500
|
||||
Si 4.10040500 1.35775000 4.10040500
|
||||
Si 4.10040500 4.10040500 1.35775000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
|
@ -6,4 +6,8 @@
|
|||
"CH2O_gfn1_force.inp" = [{matcher="M082", tol=1.0E-5, ref=0.0000000}]
|
||||
"COBe_gfn1_fd_force.inp" = [{matcher="M082", tol=1.0E-5, ref=0.0000000}]
|
||||
"Si_gfn1_fd_force.inp" = [{matcher="M082", tol=2.0E-4, ref=0.0000000}]
|
||||
"Si_gfn1_fd_stress.inp" = [{matcher="M042", tol=1.0E-5, ref=0.0000000}]
|
||||
"Ar_fcc_gfn1_kp_debug.inp" = [{matcher="DEBUG_stress_sum", tol=1.0E-5, ref=0.0000000},
|
||||
{matcher="DEBUG_force_sum", tol=1.0E-5, ref=0.0000000},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
|
|
|
|||
61
tests/xTB/regtest-tblite-gfn1-periodic/Si_gfn1_kp.inp
Normal file
61
tests/xTB/regtest-tblite-gfn1-periodic/Si_gfn1_kp.inp
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT Si_gfn1_kp
|
||||
RUN_TYPE ENERGY
|
||||
&END GLOBAL
|
||||
|
||||
&FORCE_EVAL
|
||||
METHOD QS
|
||||
&DFT
|
||||
&KPOINTS
|
||||
SCHEME MONKHORST-PACK 2 2 2
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&END POISSON
|
||||
&QS
|
||||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS -1 -1
|
||||
EPS_SCF 1.e-8
|
||||
MAX_SCF 100
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&SMEAR ON
|
||||
ELECTRONIC_TEMPERATURE 300
|
||||
METHOD FERMI_DIRAC
|
||||
&END SMEAR
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.4310000000 5.4310000000000 5.431000000000
|
||||
PERIODIC XYZ
|
||||
&END CELL
|
||||
&COORD
|
||||
Si 0.00000000 0.00000000 0.00000000
|
||||
Si 2.71550000 2.71550000 0.00000000
|
||||
Si 2.71550000 0.00000000 2.71550000
|
||||
Si 0.00000000 2.71550000 2.71550000
|
||||
Si 1.35775000 1.35775000 1.35775000
|
||||
Si 1.35775000 4.10040500 4.10040500
|
||||
Si 4.10040500 1.35775000 4.10040500
|
||||
Si 4.10040500 4.10040500 1.35775000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
68
tests/xTB/regtest-tblite-gfn1-periodic/Si_gfn1_kp_kpsym.inp
Normal file
68
tests/xTB/regtest-tblite-gfn1-periodic/Si_gfn1_kp_kpsym.inp
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
&GLOBAL
|
||||
PRINT_LEVEL MEDIUM
|
||||
PROJECT Si_gfn1_kp_kpsym
|
||||
RUN_TYPE ENERGY
|
||||
&END GLOBAL
|
||||
|
||||
&FORCE_EVAL
|
||||
METHOD QS
|
||||
&DFT
|
||||
&KPOINTS
|
||||
EPS_SYMMETRY 1.e-8
|
||||
FULL_GRID OFF
|
||||
PARALLEL_GROUP_SIZE -1
|
||||
SCHEME MONKHORST-PACK 4 4 4
|
||||
SYMMETRY ON
|
||||
VERBOSE T
|
||||
&END KPOINTS
|
||||
&POISSON
|
||||
PERIODIC XYZ
|
||||
POISSON_SOLVER PERIODIC
|
||||
&END POISSON
|
||||
&QS
|
||||
EPS_DEFAULT 1.00E-12
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
&END XTB
|
||||
&END QS
|
||||
&SCF
|
||||
ADDED_MOS -1 -1
|
||||
EPS_SCF 1.e-10
|
||||
MAX_SCF 300
|
||||
SCF_GUESS MOPAC
|
||||
&MIXING
|
||||
ALPHA 0.2
|
||||
METHOD DIRECT_P_MIXING
|
||||
&END MIXING
|
||||
&PRINT
|
||||
&RESTART OFF
|
||||
&END RESTART
|
||||
&END PRINT
|
||||
&SMEAR ON
|
||||
ELECTRONIC_TEMPERATURE 300
|
||||
METHOD FERMI_DIRAC
|
||||
&END SMEAR
|
||||
&END SCF
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 5.4310000000 5.4310000000000 5.431000000000
|
||||
PERIODIC XYZ
|
||||
&END CELL
|
||||
&COORD
|
||||
SCALED
|
||||
Si 0.000000 0.000000 0.000000
|
||||
Si 0.500000 0.500000 0.000000
|
||||
Si 0.500000 0.000000 0.500000
|
||||
Si 0.000000 0.500000 0.500000
|
||||
Si 0.250000 0.250000 0.250000
|
||||
Si 0.250000 0.750000 0.750000
|
||||
Si 0.750000 0.250000 0.750000
|
||||
Si 0.750000 0.750000 0.250000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
|
|
@ -5,5 +5,8 @@
|
|||
# for details see cp2k/tools/do_regtest
|
||||
"COBe_gfn1_fd.inp" = [{matcher="E_total", tol=1.0E-8, ref=-7.4283186205}]
|
||||
"CH2O_gfn1.inp" = [{matcher="E_total", tol=1.0E-8, ref=-7.8503584297}]
|
||||
"Si_gfn1_fd.inp" = [{matcher="E_total", tol=1.0E-8, ref=-14.452117500}]
|
||||
"Si_gfn1_fd.inp" = [{matcher="E_total", tol=1.0E-8, ref=-14.45211729669823}]
|
||||
"Si_gfn1_kp.inp" = [{matcher="E_total", tol=1.0E-8, ref=-14.71883978952347}]
|
||||
"Si_gfn1_kp_kpsym.inp" = [{matcher="E_total", tol=1.0E-8, ref=-14.7262344001},
|
||||
{matcher="N_special_kpoints", tol=0.0, ref=4}]
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
|
|
|
|||
|
|
@ -6,12 +6,11 @@
|
|||
|
||||
&DEBUG
|
||||
DEBUG_FORCES T
|
||||
DEBUG_STRESS_TENSOR T
|
||||
DEBUG_STRESS_TENSOR F
|
||||
DX 0.0001
|
||||
&END DEBUG
|
||||
|
||||
&FORCE_EVAL
|
||||
STRESS_TENSOR ANALYTICAL
|
||||
&DFT
|
||||
&PRINT
|
||||
&DERIVATIVES ON
|
||||
|
|
@ -20,6 +19,7 @@
|
|||
&QS
|
||||
METHOD xTB
|
||||
&XTB
|
||||
GFN_TYPE TBLITE
|
||||
&TBLITE
|
||||
METHOD GFN1
|
||||
&END TBLITE
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue