mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-29 06:35:28 -04:00
Debug using finite field differences for dipole and polarizability. … (#549)
* Local energy for GPW method * Local stress (1. step) * Towards local stress * Add stop for not yet implemented local stress * Fix regtests * Debug using finite field differences for dipole and polarizability. Enable IR intensities for semi-empirical methods. * More regtests for DEBUG option * Bug fix on call to get_results
This commit is contained in:
parent
c5227fa72d
commit
7863fcd744
15 changed files with 584 additions and 11 deletions
|
|
@ -4110,6 +4110,37 @@ CONTAINS
|
|||
"ER"), &
|
||||
DOI="10.1103/PhysRevB.65.224117")
|
||||
|
||||
CALL add_reference(key=Cohen2000, ISI_record=s2a( &
|
||||
"AU Cohen, Morrel H.", &
|
||||
" Frydel, Derek", &
|
||||
" Burke, Kieron", &
|
||||
" Engel, Eberhard", &
|
||||
"AF Cohen, Morrel H.", &
|
||||
" Frydel, Derek", &
|
||||
" Burke, Kieron", &
|
||||
" Engel, Eberhard", &
|
||||
"TI Total energy density as an interpretative tool", &
|
||||
"SO The Journal of Chemical Physics", &
|
||||
"PY 2000", &
|
||||
"VL 113", &
|
||||
"BP 2990", &
|
||||
"DI 10.1063/1.1286805", &
|
||||
"ER"), &
|
||||
DOI="10.1063/1.1286805")
|
||||
|
||||
CALL add_reference(key=Rogers2002, ISI_record=s2a( &
|
||||
"AU Rogers, Christopher L.", &
|
||||
" Rappe, Andrew M.", &
|
||||
"TI Geometric formulation of quantum stress fields", &
|
||||
"SO PHYSICAL REVIEW B", &
|
||||
"DT Article", &
|
||||
"PY 2002", &
|
||||
"VL 65", &
|
||||
"AR 224117", &
|
||||
"DI 10.1103/PhysRevB.65.224117", &
|
||||
"ER"), &
|
||||
DOI="10.1103/PhysRevB.65.224117")
|
||||
|
||||
CALL add_reference(key=Filippetti2000, ISI_record=s2a( &
|
||||
"AU Filippetti, Alessio", &
|
||||
" Fiorentini, Vincenzo", &
|
||||
|
|
|
|||
164
src/cp2k_debug.F
164
src/cp2k_debug.F
|
|
@ -23,11 +23,15 @@
|
|||
! **************************************************************************************************
|
||||
MODULE cp2k_debug
|
||||
USE cell_types, ONLY: cell_type
|
||||
USE cp_control_types, ONLY: dft_control_type
|
||||
USE cp_log_handling, ONLY: cp_get_default_logger,&
|
||||
cp_logger_type
|
||||
USE cp_output_handling, ONLY: cp_print_key_finished_output,&
|
||||
cp_print_key_unit_nr
|
||||
USE cp_para_types, ONLY: cp_para_env_type
|
||||
USE cp_result_methods, ONLY: get_results,&
|
||||
test_for_result
|
||||
USE cp_result_types, ONLY: cp_result_type
|
||||
USE cp_subsys_types, ONLY: cp_subsys_get,&
|
||||
cp_subsys_type
|
||||
USE force_env_methods, ONLY: force_env_calc_energy_force,&
|
||||
|
|
@ -78,19 +82,28 @@ CONTAINS
|
|||
routineP = moduleN//':'//routineN
|
||||
|
||||
CHARACTER(LEN=3*default_string_length) :: message
|
||||
CHARACTER(LEN=default_string_length) :: description
|
||||
INTEGER :: i, ip, iw, j, k, np, stress_tensor
|
||||
LOGICAL :: check_failed, debug_forces, &
|
||||
LOGICAL :: check_failed, debug_dipole, &
|
||||
debug_forces, debug_polar, &
|
||||
debug_stress_tensor, skip, &
|
||||
stop_on_mismatch
|
||||
REAL(KIND=dp) :: difference, dx, eps_no_error_check, &
|
||||
std_value, sum_of_differences
|
||||
REAL(KIND=dp) :: amplitude, dd, de, derr, difference, dx, &
|
||||
eps_no_error_check, std_value, &
|
||||
sum_of_differences
|
||||
REAL(KIND=dp), DIMENSION(2) :: numer_energy
|
||||
REAL(KIND=dp), DIMENSION(3) :: err, my_maxerr
|
||||
REAL(KIND=dp), DIMENSION(3) :: dipole_moment, dipole_numer, err, &
|
||||
my_maxerr, poldir
|
||||
REAL(KIND=dp), DIMENSION(3, 2) :: dipn
|
||||
REAL(KIND=dp), DIMENSION(3, 3) :: polar_analytic, polar_numeric
|
||||
REAL(KIND=dp), DIMENSION(9) :: pvals
|
||||
REAL(KIND=dp), DIMENSION(:, :), POINTER :: analyt_forces, numer_forces
|
||||
TYPE(cell_type), POINTER :: cell
|
||||
TYPE(cp_logger_type), POINTER :: logger
|
||||
TYPE(cp_para_env_type), POINTER :: para_env
|
||||
TYPE(cp_result_type), POINTER :: results
|
||||
TYPE(cp_subsys_type), POINTER :: subsys
|
||||
TYPE(dft_control_type), POINTER :: dft_control
|
||||
TYPE(particle_type), DIMENSION(:), POINTER :: particles
|
||||
TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
|
||||
TYPE(section_vals_type), POINTER :: root_section, subsys_section
|
||||
|
|
@ -109,8 +122,14 @@ CONTAINS
|
|||
l_val=debug_stress_tensor)
|
||||
CALL section_vals_val_get(root_section, "DEBUG%DEBUG_FORCES", &
|
||||
l_val=debug_forces)
|
||||
CALL section_vals_val_get(root_section, "DEBUG%DEBUG_DIPOLE", &
|
||||
l_val=debug_dipole)
|
||||
CALL section_vals_val_get(root_section, "DEBUG%DEBUG_POLARIZABILITY", &
|
||||
l_val=debug_polar)
|
||||
CALL section_vals_val_get(root_section, "DEBUG%DX", &
|
||||
r_val=dx)
|
||||
CALL section_vals_val_get(root_section, "DEBUG%DE", &
|
||||
r_val=de)
|
||||
dx = ABS(dx)
|
||||
CALL section_vals_val_get(root_section, "DEBUG%EPS_NO_ERROR_CHECK", &
|
||||
r_val=eps_no_error_check)
|
||||
|
|
@ -332,9 +351,142 @@ CONTAINS
|
|||
IF (ASSOCIATED(analyt_forces)) DEALLOCATE (analyt_forces)
|
||||
IF (ASSOCIATED(numer_forces)) DEALLOCATE (numer_forces)
|
||||
END IF
|
||||
CALL cp_print_key_finished_output(iw, logger, root_section, &
|
||||
"DEBUG%PROGRAM_RUN_INFO")
|
||||
|
||||
IF (debug_dipole) THEN
|
||||
IF (force_env%in_use == use_qs_force) THEN
|
||||
CALL get_qs_env(force_env%qs_env, dft_control=dft_control)
|
||||
poldir = (/0.0_dp, 0.0_dp, 1.0_dp/)
|
||||
amplitude = 0.0_dp
|
||||
CALL set_efield(dft_control, amplitude, poldir)
|
||||
CALL force_env_calc_energy_force(force_env, calc_force=.FALSE.)
|
||||
CALL get_qs_env(force_env%qs_env, results=results)
|
||||
description = "[DIPOLE]"
|
||||
IF (test_for_result(results, description=description)) THEN
|
||||
CALL get_results(results, description=description, values=dipole_moment)
|
||||
ELSE
|
||||
CALL cp_warn(__LOCATION__, "Debug of dipole moments needs DFT/PRINT/MOMENTS section enabled")
|
||||
CPABORT("DEBUG")
|
||||
END IF
|
||||
amplitude = de
|
||||
DO k = 1, 3
|
||||
poldir = 0.0_dp
|
||||
poldir(k) = 1.0_dp
|
||||
DO j = 1, 2
|
||||
poldir = -1.0_dp*poldir
|
||||
CALL set_efield(dft_control, amplitude, poldir)
|
||||
CALL force_env_calc_energy_force(force_env, calc_force=.FALSE.)
|
||||
CALL force_env_get(force_env, potential_energy=numer_energy(j))
|
||||
END DO
|
||||
dipole_numer(k) = 0.5_dp*(numer_energy(1)-numer_energy(2))/de
|
||||
END DO
|
||||
IF (iw > 0) THEN
|
||||
WRITE (UNIT=iw, FMT="(/,(T2,A))") &
|
||||
"DEBUG|========================= DIPOLE MOMENTS ================================", &
|
||||
"DEBUG| Coordinate D(numerical) D(analytical) Difference Error [%]"
|
||||
DO k = 1, 3
|
||||
dd = dipole_moment(k)-dipole_numer(k)
|
||||
IF (ABS(dipole_moment(k)) > eps_no_error_check) THEN
|
||||
derr = 100._dp*dd/dipole_moment(k)
|
||||
WRITE (UNIT=iw, FMT="(T13,A1,T21,F16.8,T38,F16.8,T56,G12.3,T72,F9.3)") &
|
||||
ACHAR(119+k), dipole_numer(k), dipole_moment(k), dd, derr
|
||||
ELSE
|
||||
WRITE (UNIT=iw, FMT="(T13,A1,T21,F16.8,T38,F16.8,T56,G12.3)") &
|
||||
ACHAR(119+k), dipole_numer(k), dipole_moment(k), dd
|
||||
END IF
|
||||
END DO
|
||||
WRITE (UNIT=iw, FMT="((T2,A))") &
|
||||
"DEBUG|========================================================================="
|
||||
WRITE (UNIT=iw, FMT="(T2,A,T61,E20.12)") ' DIPOLE : CheckSum =', SUM(dipole_moment)
|
||||
END IF
|
||||
ELSE
|
||||
CALL cp_warn(__LOCATION__, "Debug of dipole moments only for Quickstep code available")
|
||||
END IF
|
||||
END IF
|
||||
|
||||
IF (debug_polar) THEN
|
||||
IF (force_env%in_use == use_qs_force) THEN
|
||||
CALL get_qs_env(force_env%qs_env, dft_control=dft_control)
|
||||
poldir = (/0.0_dp, 0.0_dp, 1.0_dp/)
|
||||
amplitude = 0.0_dp
|
||||
CALL set_efield(dft_control, amplitude, poldir)
|
||||
CALL force_env_calc_energy_force(force_env, calc_force=.FALSE.)
|
||||
CALL get_qs_env(force_env%qs_env, results=results)
|
||||
description = "[POLAR]"
|
||||
IF (test_for_result(results, description=description)) THEN
|
||||
CALL get_results(results, description=description, values=pvals)
|
||||
polar_analytic(1:3, 1:3) = RESHAPE(pvals(1:9), (/3, 3/))
|
||||
ELSE
|
||||
CALL cp_warn(__LOCATION__, "Debug of polarizabilities needs PROPERTIES/LINRES/POLAR section enabled")
|
||||
CPABORT("DEBUG")
|
||||
END IF
|
||||
description = "[DIPOLE]"
|
||||
IF (.NOT. test_for_result(results, description=description)) THEN
|
||||
CALL cp_warn(__LOCATION__, "Debug of polarizabilities need DFT/PRINT/MOMENTS section enabled")
|
||||
CPABORT("DEBUG")
|
||||
END IF
|
||||
amplitude = de
|
||||
DO k = 1, 3
|
||||
poldir = 0.0_dp
|
||||
poldir(k) = 1.0_dp
|
||||
DO j = 1, 2
|
||||
poldir = -1.0_dp*poldir
|
||||
CALL set_efield(dft_control, amplitude, poldir)
|
||||
CALL force_env_calc_energy_force(force_env, calc_force=.FALSE., linres=.TRUE.)
|
||||
CALL get_results(results, description=description, values=dipn(1:3, j))
|
||||
END DO
|
||||
polar_numeric(1:3, k) = 0.5_dp*(dipn(1:3, 2)-dipn(1:3, 1))/de
|
||||
END DO
|
||||
IF (iw > 0) THEN
|
||||
WRITE (UNIT=iw, FMT="(/,(T2,A))") &
|
||||
"DEBUG|========================= POLARIZABILITY ================================", &
|
||||
"DEBUG| Coordinates P(numerical) P(analytical) Difference Error [%]"
|
||||
DO k = 1, 3
|
||||
DO j = 1, 3
|
||||
dd = polar_analytic(k, j)-polar_numeric(k, j)
|
||||
IF (ABS(polar_analytic(k, j)) > eps_no_error_check) THEN
|
||||
derr = 100._dp*dd/polar_analytic(k, j)
|
||||
WRITE (UNIT=iw, FMT="(T12,A1,A1,T21,F16.8,T38,F16.8,T56,G12.3,T72,F9.3)") &
|
||||
ACHAR(119+k), ACHAR(119+j), polar_numeric(k, j), polar_analytic(k, j), dd, derr
|
||||
ELSE
|
||||
WRITE (UNIT=iw, FMT="(T12,A1,A1,T21,F16.8,T38,F16.8,T56,G12.3)") &
|
||||
ACHAR(119+k), ACHAR(119+j), polar_numeric(k, j), polar_analytic(k, j), dd
|
||||
END IF
|
||||
END DO
|
||||
END DO
|
||||
WRITE (UNIT=iw, FMT="((T2,A))") &
|
||||
"DEBUG|========================================================================="
|
||||
WRITE (UNIT=iw, FMT="(T2,A,T61,E20.12)") ' POLAR : CheckSum =', SUM(polar_analytic)
|
||||
END IF
|
||||
ELSE
|
||||
CALL cp_warn(__LOCATION__, "Debug of polarizabilities only for Quickstep code available")
|
||||
END IF
|
||||
END IF
|
||||
|
||||
CALL cp_print_key_finished_output(iw, logger, root_section, "DEBUG%PROGRAM_RUN_INFO")
|
||||
|
||||
END SUBROUTINE cp2k_debug_energy_and_forces
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief ...
|
||||
!> \param dft_control ...
|
||||
!> \param amplitude ...
|
||||
!> \param poldir ...
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE set_efield(dft_control, amplitude, poldir)
|
||||
TYPE(dft_control_type), POINTER :: dft_control
|
||||
REAL(KIND=dp), INTENT(IN) :: amplitude
|
||||
REAL(KIND=dp), DIMENSION(3), INTENT(IN) :: poldir
|
||||
|
||||
IF (dft_control%apply_efield) THEN
|
||||
dft_control%efield_fields(1)%efield%strength = amplitude
|
||||
dft_control%efield_fields(1)%efield%polarisation(1:3) = poldir(1:3)
|
||||
ELSEIF (dft_control%apply_period_efield) THEN
|
||||
dft_control%period_efield%strength = amplitude
|
||||
dft_control%period_efield%polarisation(1:3) = poldir(1:3)
|
||||
ELSE
|
||||
CPABORT("No EFIELD definition available")
|
||||
END IF
|
||||
|
||||
END SUBROUTINE set_efield
|
||||
|
||||
END MODULE cp2k_debug
|
||||
|
|
|
|||
|
|
@ -1685,9 +1685,9 @@ CONTAINS
|
|||
DO l = 0, nmom
|
||||
SELECT CASE (l)
|
||||
CASE (0)
|
||||
WRITE (unit_number, "(T3,A,T32,3F14.8)") "Reference Point [Bohr]", rcc
|
||||
WRITE (unit_number, "(T3,A,T33,3F16.8)") "Reference Point [Bohr]", rcc
|
||||
WRITE (unit_number, "(T3,A)") "Charges"
|
||||
WRITE (unit_number, "(T5,A,T18,F14.8,T36,A,T42,F14.8,T60,A,T68,F14.8)") &
|
||||
WRITE (unit_number, "(T5,A,T18,F14.8,T36,A,T42,F14.8,T60,A,T67,F14.8)") &
|
||||
"Electronic=", rmom(1, 1), "Core=", rmom(1, 2), "Total=", rmom(1, 3)
|
||||
CASE (1)
|
||||
IF (periodic) THEN
|
||||
|
|
@ -1701,7 +1701,7 @@ CONTAINS
|
|||
ENDIF
|
||||
dd = SQRT(SUM(rmom(2:4, 3)**2))*debye
|
||||
WRITE (unit_number, "(T3,A)") "Dipole moment [Debye]"
|
||||
WRITE (unit_number, "(T5,3(A,A,F14.8,1X),T60,A,T68,F14.8)") &
|
||||
WRITE (unit_number, "(T5,3(A,A,F14.8,1X),T60,A,T67,F14.8)") &
|
||||
(TRIM(rlab(i)), "=", rmom(i, 3)*debye, i=2, 4), "Total=", dd
|
||||
CASE (2)
|
||||
WRITE (unit_number, "(T3,A)") "Quadrupole moment [Debye*Angstrom]"
|
||||
|
|
@ -1743,7 +1743,7 @@ CONTAINS
|
|||
IF (nmom >= 1) THEN
|
||||
dd = SQRT(SUM(mmom(1:3)**2))
|
||||
WRITE (unit_number, "(T3,A)") "Magnetic Dipole Moment (only orbital contrib.) [a.u.]"
|
||||
WRITE (unit_number, "(T5,3(A,A,F14.8,1X),T60,A,T68,F14.8)") &
|
||||
WRITE (unit_number, "(T5,3(A,A,F14.8,1X),T60,A,T67,F14.8)") &
|
||||
(TRIM(rlab(i+1)), "=", mmom(i), i=1, 3), "Total=", dd
|
||||
END IF
|
||||
END IF
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ MODULE qs_scf_post_se
|
|||
cp_print_key_should_output,&
|
||||
cp_print_key_unit_nr
|
||||
USE cp_para_types, ONLY: cp_para_env_type
|
||||
USE cp_result_methods, ONLY: cp_results_erase,&
|
||||
put_results
|
||||
USE cp_result_types, ONLY: cp_result_type
|
||||
USE dbcsr_api, ONLY: dbcsr_get_block_p,&
|
||||
dbcsr_p_type
|
||||
USE input_section_types, ONLY: section_get_ival,&
|
||||
|
|
@ -225,6 +228,7 @@ CONTAINS
|
|||
REAL(KIND=dp), DIMENSION(:, :), POINTER :: pblock
|
||||
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
|
||||
TYPE(cell_type), POINTER :: cell
|
||||
TYPE(cp_result_type), POINTER :: results
|
||||
TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: matrix_p
|
||||
TYPE(dft_control_type), POINTER :: dft_control
|
||||
TYPE(gto_basis_set_type), POINTER :: basis_set
|
||||
|
|
@ -234,6 +238,7 @@ CONTAINS
|
|||
TYPE(section_vals_type), POINTER :: print_key
|
||||
TYPE(semi_empirical_type), POINTER :: se_kind
|
||||
|
||||
NULLIFY (results)
|
||||
print_key => section_vals_get_subs_vals(input, "DFT%PRINT%MOMENTS")
|
||||
IF (BTEST(cp_print_key_should_output(logger%iter_info, print_key), cp_p_file)) THEN
|
||||
! Dipole Moments
|
||||
|
|
@ -257,6 +262,7 @@ CONTAINS
|
|||
natom=natom, &
|
||||
qs_kind_set=qs_kind_set, &
|
||||
particle_set=particle_set, &
|
||||
results=results, &
|
||||
dft_control=dft_control)
|
||||
|
||||
CALL qs_rho_get(rho, rho_ao=matrix_p)
|
||||
|
|
@ -369,6 +375,9 @@ CONTAINS
|
|||
END DO
|
||||
DEALLOCATE (mom)
|
||||
END DO
|
||||
CALL cp_results_erase(results=results, description=description)
|
||||
CALL put_results(results=results, description=description, &
|
||||
values=dipole(1:3))
|
||||
IF (unit_nr > 0) THEN
|
||||
WRITE (unit_nr, '(1X,A,T48,3F11.6)') "DIPOLE "//TRIM(dipole_type)//"(A.U.)|", dipole
|
||||
WRITE (unit_nr, '(1X,A,T48,3F11.6)') "DIPOLE "//TRIM(dipole_type)//"(Debye)|", dipole*debye
|
||||
|
|
|
|||
|
|
@ -330,12 +330,32 @@ CONTAINS
|
|||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="DEBUG_DIPOLE", &
|
||||
description="Activates the debugging of the dipole moment", &
|
||||
usage="DEBUG_DIPOLE {LOGICAL}", 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="DEBUG_POLARIZABILITY", &
|
||||
description="Activates the debugging of the polarizability", &
|
||||
usage="DEBUG_POLARIZABILITY {LOGICAL}", 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="DX", &
|
||||
description="Increment for the calculation of the numerical derivatives", &
|
||||
usage="DX {REAL}", default_r_val=0.001_dp)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="DE", &
|
||||
description="Increment for the calculation of the numerical electric field derivatives", &
|
||||
usage="DE {REAL}", default_r_val=0.0001_dp)
|
||||
CALL section_add_keyword(section, keyword)
|
||||
CALL keyword_release(keyword)
|
||||
|
||||
CALL keyword_create(keyword, __LOCATION__, name="EPS_NO_ERROR_CHECK", &
|
||||
description="The mismatch between the numerical and the "// &
|
||||
"analytical value is not checked for analytical "// &
|
||||
|
|
|
|||
10
tests/QS/regtest-debug/TEST_FILES
Normal file
10
tests/QS/regtest-debug/TEST_FILES
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# runs are executed in the same order as in this file
|
||||
# the second field tells which test should be run in order to compare with the last available output
|
||||
# e.g. 0 means do not compare anything, running is enough
|
||||
# 1 compares the last total energy in the file
|
||||
# for details see cp2k/tools/do_regtest
|
||||
h2o_dipole.inp 86 1e-05 0.908927636669E+00
|
||||
h2o_polar.inp 87 1e-05 0.164538039001E+02
|
||||
h2o_pdip.inp 86 1e-05 0.961018561809E+00
|
||||
h2o_periodic.inp 87 1e-05 0.139741440657E+02
|
||||
#EOF
|
||||
1
tests/QS/regtest-debug/TEST_FILES_RESET
Normal file
1
tests/QS/regtest-debug/TEST_FILES_RESET
Normal file
|
|
@ -0,0 +1 @@
|
|||
#
|
||||
71
tests/QS/regtest-debug/h2o_dipole.inp
Normal file
71
tests/QS/regtest-debug/h2o_dipole.inp
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
&FORCE_EVAL
|
||||
METHOD Quickstep
|
||||
&DFT
|
||||
&QS
|
||||
METHOD GPW
|
||||
&END QS
|
||||
&EFIELD
|
||||
&END
|
||||
&SCF
|
||||
SCF_GUESS ATOMIC
|
||||
&OT
|
||||
PRECONDITIONER FULL_SINGLE_INVERSE
|
||||
MINIMIZER DIIS
|
||||
&END
|
||||
&OUTER_SCF
|
||||
MAX_SCF 10
|
||||
EPS_SCF 1.0E-8
|
||||
&END
|
||||
MAX_SCF 10
|
||||
EPS_SCF 1.0E-8
|
||||
&END SCF
|
||||
&XC
|
||||
&XC_FUNCTIONAL Pade
|
||||
&END XC_FUNCTIONAL
|
||||
&END XC
|
||||
&PRINT
|
||||
&MOMENTS ON
|
||||
PERIODIC .FALSE.
|
||||
REFERENCE COM
|
||||
&END
|
||||
&END
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC [angstrom] 6.0 6.0 6.0
|
||||
PERIODIC NONE
|
||||
&END
|
||||
&COORD
|
||||
O 0.000000 0.000000 -0.065587
|
||||
H 0.000000 -0.757136 0.520545
|
||||
H 0.000000 0.757136 0.520545
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
&CENTER_COORDINATES
|
||||
&END
|
||||
&END
|
||||
&KIND H
|
||||
BASIS_SET DZV-GTH-PADE
|
||||
POTENTIAL GTH-PADE-q1
|
||||
&END KIND
|
||||
&KIND O
|
||||
BASIS_SET DZVP-GTH-PADE
|
||||
POTENTIAL GTH-PADE-q6
|
||||
&END KIND
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT dipole
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES .FALSE.
|
||||
DEBUG_STRESS_TENSOR .FALSE.
|
||||
DEBUG_DIPOLE .TRUE.
|
||||
DEBUG_POLARIZABILITY .FALSE.
|
||||
DE 0.0002
|
||||
&END
|
||||
|
||||
|
||||
70
tests/QS/regtest-debug/h2o_pdip.inp
Normal file
70
tests/QS/regtest-debug/h2o_pdip.inp
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
&FORCE_EVAL
|
||||
METHOD Quickstep
|
||||
&DFT
|
||||
&QS
|
||||
METHOD GPW
|
||||
&END QS
|
||||
&PERIODIC_EFIELD
|
||||
&END
|
||||
&SCF
|
||||
SCF_GUESS ATOMIC
|
||||
&OT
|
||||
PRECONDITIONER FULL_SINGLE_INVERSE
|
||||
MINIMIZER DIIS
|
||||
&END
|
||||
&OUTER_SCF
|
||||
MAX_SCF 10
|
||||
EPS_SCF 1.0E-8
|
||||
&END
|
||||
MAX_SCF 10
|
||||
EPS_SCF 1.0E-8
|
||||
&END SCF
|
||||
&XC
|
||||
&XC_FUNCTIONAL Pade
|
||||
&END XC_FUNCTIONAL
|
||||
&END XC
|
||||
&PRINT
|
||||
&MOMENTS ON
|
||||
PERIODIC T
|
||||
&END
|
||||
&END
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC [angstrom] 5.0 5.0 5.0
|
||||
PERIODIC NONE
|
||||
&END
|
||||
&COORD
|
||||
O 0.000000 0.000000 -0.065587
|
||||
H 0.000000 -0.757136 0.520545
|
||||
H 0.000000 0.757136 0.520545
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
&CENTER_COORDINATES
|
||||
&END
|
||||
&END
|
||||
&KIND H
|
||||
BASIS_SET DZV-GTH-PADE
|
||||
POTENTIAL GTH-PADE-q1
|
||||
&END KIND
|
||||
&KIND O
|
||||
BASIS_SET DZVP-GTH-PADE
|
||||
POTENTIAL GTH-PADE-q6
|
||||
&END KIND
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT dipole
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES .FALSE.
|
||||
DEBUG_STRESS_TENSOR .FALSE.
|
||||
DEBUG_DIPOLE .TRUE.
|
||||
DEBUG_POLARIZABILITY .FALSE.
|
||||
DE 0.0002
|
||||
&END
|
||||
|
||||
|
||||
82
tests/QS/regtest-debug/h2o_periodic.inp
Normal file
82
tests/QS/regtest-debug/h2o_periodic.inp
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
&FORCE_EVAL
|
||||
METHOD Quickstep
|
||||
&PROPERTIES
|
||||
&LINRES
|
||||
PRECONDITIONER FULL_ALL
|
||||
EPS 1.e-10
|
||||
&POLAR
|
||||
DO_RAMAN T
|
||||
PERIODIC_DIPOLE_OPERATOR T
|
||||
&END
|
||||
&END
|
||||
&END
|
||||
&DFT
|
||||
&QS
|
||||
METHOD GPW
|
||||
EPS_DEFAULT 1.e-10
|
||||
&END QS
|
||||
&PERIODIC_EFIELD
|
||||
&END
|
||||
&SCF
|
||||
SCF_GUESS ATOMIC
|
||||
&OT
|
||||
PRECONDITIONER FULL_SINGLE_INVERSE
|
||||
MINIMIZER DIIS
|
||||
&END
|
||||
&OUTER_SCF
|
||||
MAX_SCF 10
|
||||
EPS_SCF 1.0E-7
|
||||
&END
|
||||
MAX_SCF 10
|
||||
EPS_SCF 1.0E-7
|
||||
&END SCF
|
||||
&XC
|
||||
&XC_FUNCTIONAL Pade
|
||||
&END XC_FUNCTIONAL
|
||||
&END XC
|
||||
&PRINT
|
||||
&MOMENTS ON
|
||||
PERIODIC T
|
||||
&END
|
||||
&END
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC [angstrom] 5.0 5.0 5.0
|
||||
PERIODIC NONE
|
||||
&END
|
||||
&COORD
|
||||
O 0.000000 0.000000 -0.065587
|
||||
H 0.000000 -0.757136 0.520545
|
||||
H 0.000000 0.757136 0.520545
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
&CENTER_COORDINATES
|
||||
&END
|
||||
&END
|
||||
&KIND H
|
||||
BASIS_SET DZV-GTH-PADE
|
||||
POTENTIAL GTH-PADE-q1
|
||||
&END KIND
|
||||
&KIND O
|
||||
BASIS_SET DZVP-GTH-PADE
|
||||
POTENTIAL GTH-PADE-q6
|
||||
&END KIND
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT dipole
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES .FALSE.
|
||||
DEBUG_STRESS_TENSOR .FALSE.
|
||||
DEBUG_DIPOLE .FALSE.
|
||||
DEBUG_POLARIZABILITY .TRUE.
|
||||
DE 0.002
|
||||
EPS_NO_ERROR_CHECK 5.e-5
|
||||
&END
|
||||
|
||||
|
||||
83
tests/QS/regtest-debug/h2o_polar.inp
Normal file
83
tests/QS/regtest-debug/h2o_polar.inp
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
&FORCE_EVAL
|
||||
METHOD Quickstep
|
||||
&PROPERTIES
|
||||
&LINRES
|
||||
PRECONDITIONER FULL_ALL
|
||||
EPS 1.e-10
|
||||
&POLAR
|
||||
DO_RAMAN T
|
||||
PERIODIC_DIPOLE_OPERATOR F
|
||||
&END
|
||||
&END
|
||||
&END
|
||||
&DFT
|
||||
&QS
|
||||
METHOD GPW
|
||||
EPS_DEFAULT 1.e-10
|
||||
&END QS
|
||||
&EFIELD
|
||||
&END
|
||||
&SCF
|
||||
SCF_GUESS ATOMIC
|
||||
&OT
|
||||
PRECONDITIONER FULL_SINGLE_INVERSE
|
||||
MINIMIZER DIIS
|
||||
&END
|
||||
&OUTER_SCF
|
||||
MAX_SCF 10
|
||||
EPS_SCF 1.0E-7
|
||||
&END
|
||||
MAX_SCF 10
|
||||
EPS_SCF 1.0E-7
|
||||
&END SCF
|
||||
&XC
|
||||
&XC_FUNCTIONAL Pade
|
||||
&END XC_FUNCTIONAL
|
||||
&END XC
|
||||
&PRINT
|
||||
&MOMENTS ON
|
||||
PERIODIC .FALSE.
|
||||
REFERENCE COM
|
||||
&END
|
||||
&END
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC [angstrom] 6.0 6.0 6.0
|
||||
PERIODIC NONE
|
||||
&END
|
||||
&COORD
|
||||
O 0.000000 0.000000 -0.065587
|
||||
H 0.000000 -0.757136 0.520545
|
||||
H 0.000000 0.757136 0.520545
|
||||
&END COORD
|
||||
&TOPOLOGY
|
||||
&CENTER_COORDINATES
|
||||
&END
|
||||
&END
|
||||
&KIND H
|
||||
BASIS_SET DZV-GTH-PADE
|
||||
POTENTIAL GTH-PADE-q1
|
||||
&END KIND
|
||||
&KIND O
|
||||
BASIS_SET DZVP-GTH-PADE
|
||||
POTENTIAL GTH-PADE-q6
|
||||
&END KIND
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
&GLOBAL
|
||||
PRINT_LEVEL LOW
|
||||
PROJECT dipole
|
||||
RUN_TYPE DEBUG
|
||||
&END GLOBAL
|
||||
|
||||
&DEBUG
|
||||
DEBUG_FORCES .FALSE.
|
||||
DEBUG_STRESS_TENSOR .FALSE.
|
||||
DEBUG_DIPOLE .FALSE.
|
||||
DEBUG_POLARIZABILITY .TRUE.
|
||||
DE 0.002
|
||||
EPS_NO_ERROR_CHECK 5.e-5
|
||||
&END
|
||||
|
||||
|
||||
|
|
@ -53,4 +53,6 @@ ice-ewald-nomol.inp 3 1.0E-14 -2
|
|||
ice-ewald-r_cut.inp 3 1.0E-14 -2502.01852258319195
|
||||
# Atprop energy
|
||||
dimer_atprop.inp 3 2e-13 -697.08211512090054
|
||||
# VIBANALYSIS
|
||||
h2o_vib.inp 8 8.0E-06 1922.87193
|
||||
#EOF
|
||||
|
|
|
|||
39
tests/SE/regtest/h2o_vib.inp
Normal file
39
tests/SE/regtest/h2o_vib.inp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
&FORCE_EVAL
|
||||
METHOD Quickstep
|
||||
&DFT
|
||||
&QS
|
||||
METHOD AM1
|
||||
&SE
|
||||
&END
|
||||
&END QS
|
||||
&SCF
|
||||
SCF_GUESS MOPAC
|
||||
&END SCF
|
||||
&PRINT
|
||||
&MOMENTS ON
|
||||
PERIODIC .FALSE.
|
||||
REFERENCE COM
|
||||
&END
|
||||
&END
|
||||
&END DFT
|
||||
&SUBSYS
|
||||
&CELL
|
||||
ABC 20.0 20.0 20.0
|
||||
PERIODIC NONE
|
||||
&END CELL
|
||||
&COORD
|
||||
O .00000000 .00000000 .00000000
|
||||
H 1.05000000 .00000000 .00000000
|
||||
H -.26289900 1.01655502 .00000000
|
||||
&END COORD
|
||||
&END SUBSYS
|
||||
&END FORCE_EVAL
|
||||
&GLOBAL
|
||||
PROJECT h2o
|
||||
RUN_TYPE VIBRATIONAL_ANALYSIS
|
||||
&END GLOBAL
|
||||
&VIBRATIONAL_ANALYSIS
|
||||
INTENSITIES .TRUE.
|
||||
DX 0.001
|
||||
&END
|
||||
|
||||
|
|
@ -12,6 +12,7 @@ QS/regtest-cdft-hirshfeld
|
|||
SIRIUS/regtest-1 sirius
|
||||
QS/regtest-embed libint
|
||||
QS/regtest-pod
|
||||
QS/regtest-debug
|
||||
QS/regtest-cdft-diag
|
||||
xTB/regtest-1
|
||||
xTB/regtest-2
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
85
|
||||
87
|
||||
Total energy:!3
|
||||
POTENTIAL ENERGY!4
|
||||
Total energy \[eV\]:!4
|
||||
|
|
@ -84,6 +84,8 @@ DEBUG| Sum of differences:!5
|
|||
1\[\ \ \ 1\]\ -\ 2\[\ \ \ 1\]!7
|
||||
Ionization potential of the excited atom:!7
|
||||
( SIRIUS ) !9
|
||||
DIPOLE : CheckSum =!5
|
||||
POLAR : CheckSum =!5
|
||||
#
|
||||
# these are the tests the can be selected for regtesting.
|
||||
# do regtest will grep for test_grep (first column) and look if the numeric value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue