From 6fa207a9fbebf79d3f0e36f2196bc3260878d45d Mon Sep 17 00:00:00 2001 From: AbdAmmar Date: Fri, 16 Feb 2024 16:45:54 +0100 Subject: [PATCH] Boys & Handy Jastrow: OK --- .../non_h_ints_mu/jast_deriv_utils_vect.irp.f | 4 +--- plugins/local/tc_scf/rh_tcscf_diis.irp.f | 23 ++++++------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/plugins/local/non_h_ints_mu/jast_deriv_utils_vect.irp.f b/plugins/local/non_h_ints_mu/jast_deriv_utils_vect.irp.f index 88778ee0..31ad5756 100644 --- a/plugins/local/non_h_ints_mu/jast_deriv_utils_vect.irp.f +++ b/plugins/local/non_h_ints_mu/jast_deriv_utils_vect.irp.f @@ -113,10 +113,8 @@ subroutine get_grad1_u12_withsq_r1_seq(ipoint, n_grid2, resx, resy, resz, res) PROVIDE jBH_size jBH_en jBH_ee jBH_m jBH_n jBH_o jBH_c - if(env_type .ne. "None") then - + if(env_type .eq. "None") then call grad1_j12_r1_seq(r1, n_grid2, resx, resy, resz) - endif ! env_type else diff --git a/plugins/local/tc_scf/rh_tcscf_diis.irp.f b/plugins/local/tc_scf/rh_tcscf_diis.irp.f index 12678500..431b6e08 100644 --- a/plugins/local/tc_scf/rh_tcscf_diis.irp.f +++ b/plugins/local/tc_scf/rh_tcscf_diis.irp.f @@ -22,6 +22,9 @@ subroutine rh_tcscf_diis() logical, external :: qp_stop + PROVIDE level_shift_TCSCF + PROVIDE mo_l_coef mo_r_coef + it = 0 e_save = 0.d0 dim_DIIS = 0 @@ -41,19 +44,6 @@ subroutine rh_tcscf_diis() ! --- - PROVIDE level_shift_TCSCF - PROVIDE mo_l_coef mo_r_coef - - !write(6, '(A4,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A4, 1X, A8)') & - ! '====', '================', '================', '================', '================', '================' & - ! , '================', '================', '================', '====', '========' - !write(6, '(A4,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A4, 1X, A8)') & - ! ' it ', ' SCF TC Energy ', ' E(1e) ', ' E(2e) ', ' E(3e) ', ' energy diff ' & - ! , ' gradient ', ' DIIS error ', ' level shift ', 'DIIS', ' WT (m)' - !write(6, '(A4,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A4, 1X, A8)') & - ! '====', '================', '================', '================', '================', '================' & - ! , '================', '================', '================', '====', '========' - write(6, '(A4,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A16,1X, A4, 1X, A8)') & '====', '================', '================', '================', '================', '================' & , '================', '================', '====', '========' @@ -81,8 +71,6 @@ subroutine rh_tcscf_diis() er_save = er_DIIS call wall_time(t1) - !write(6, '(I4,1X, F16.10,1X, F16.10,1X, F16.10,1X, F16.10,1X, F16.10,1X, F16.10,1X, F16.10,1X, F16.10,1X, I4,1X, F8.2)') & - ! it, etc_tot, etc_1e, etc_2e, etc_3e, e_delta, tc_grad, er_DIIS, level_shift_tcscf, dim_DIIS, (t1-t0)/60.d0 write(6, '(I4,1X, F16.10,1X, F16.10,1X, F16.10,1X, F16.10,1X, F16.10,1X, F16.10,1X, F16.10,1X, I4,1X, F8.2)') & it, etc_tot, etc_1e, etc_2e, etc_3e, e_delta, er_DIIS, level_shift_tcscf, dim_DIIS, (t1-t0)/60.d0 @@ -91,6 +79,8 @@ subroutine rh_tcscf_diis() PROVIDE FQS_SQF_ao Fock_matrix_tc_ao_tot converged = .false. + call ezfio_set_tc_scf_converged_tcscf(converged) + !do while((tc_grad .gt. dsqrt(thresh_tcscf)) .and. (er_DIIS .gt. dsqrt(thresh_tcscf))) do while(.not. converged) @@ -253,8 +243,9 @@ subroutine rh_tcscf_diis() endif call lock_io - if (converged) then + if(converged) then write(json_unit, json_true_fmtx) 'converged' + call ezfio_set_tc_scf_converged_tcscf(converged) else write(json_unit, json_false_fmtx) 'converged' endif