From ae5c8e381b55cf0d1faf5fad821dc3d4c1dd8136 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 27 Apr 2021 19:13:22 +0200 Subject: [PATCH] Deactivated CSF in Davidson: bug in n_CSF --- src/davidson/diagonalize_ci.irp.f | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/davidson/diagonalize_ci.irp.f b/src/davidson/diagonalize_ci.irp.f index aaf0fe5f..da5fb950 100644 --- a/src/davidson/diagonalize_ci.irp.f +++ b/src/davidson/diagonalize_ci.irp.f @@ -40,6 +40,7 @@ END_PROVIDER double precision, allocatable :: e_array(:) integer, allocatable :: iorder(:) logical :: converged + logical :: do_csf PROVIDE threshold_davidson nthreads_davidson ! Guess values for the "N_states" states of the |CI| eigenvectors @@ -55,10 +56,13 @@ END_PROVIDER enddo enddo +! Deactivated temporarily: bug in N_csf +! do_csf = s2_eig .and. only_expected_s2 .and. (expected_s2 == 0.d0) + do_csf = .False. + if (diag_algorithm == "Davidson") then -! if (s2_eig.and.only_expected_s2) then - if (s2_eig.and.only_expected_s2.and.expected_s2==0.d0) then + if (do_csf) then call davidson_diag_H_csf(psi_det,CI_eigenvectors, & size(CI_eigenvectors,1),CI_electronic_energy, & N_det,N_csf,min(N_det,N_states),min(N_det,N_states_diag),N_int,0,converged) @@ -78,8 +82,7 @@ END_PROVIDER N_states_diag *= 2 TOUCH N_states_diag -! if (s2_eig.and.only_expected_s2) then - if (s2_eig.and.only_expected_s2.and.expected_s2==0.d0) then + if (do_csf) then allocate (CI_electronic_energy_tmp (N_states_diag) ) allocate (CI_eigenvectors_tmp (N_det,N_states_diag) )