From b53bfe5e4c54d6945d5685e3ab42b41f39313942 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 26 Feb 2021 18:40:29 +0100 Subject: [PATCH] Only singlets work with S2 --- src/cipsi/selection.irp.f | 2 +- src/csf/sigma_vector.irp.f | 2 +- src/davidson/diagonalize_ci.irp.f | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cipsi/selection.irp.f b/src/cipsi/selection.irp.f index 6a6d2a23..e688a7bb 100644 --- a/src/cipsi/selection.irp.f +++ b/src/cipsi/selection.irp.f @@ -836,7 +836,7 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d enddo call configuration_to_dets_size(occ,n,elec_alpha_num,N_int) n = max(n,1) - w *= dble(n) + w *= dsqrt(dble(n)) endif if(w <= buf%mini) then diff --git a/src/csf/sigma_vector.irp.f b/src/csf/sigma_vector.irp.f index 4385430e..6703d41b 100644 --- a/src/csf/sigma_vector.irp.f +++ b/src/csf/sigma_vector.irp.f @@ -66,7 +66,7 @@ subroutine get_phase_qp_to_cfg(Ialpha, Ibeta, phaseout) integer :: nbetas integer :: k - ! Initliaze deta and detb + ! Initialize deta and detb deta = Ialpha detb = Ibeta diff --git a/src/davidson/diagonalize_ci.irp.f b/src/davidson/diagonalize_ci.irp.f index 55370cc5..aaf0fe5f 100644 --- a/src/davidson/diagonalize_ci.irp.f +++ b/src/davidson/diagonalize_ci.irp.f @@ -57,8 +57,8 @@ END_PROVIDER 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 (s2_eig.and.only_expected_s2) then + if (s2_eig.and.only_expected_s2.and.expected_s2==0.d0) 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 +78,8 @@ 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 (s2_eig.and.only_expected_s2) then + if (s2_eig.and.only_expected_s2.and.expected_s2==0.d0) then allocate (CI_electronic_energy_tmp (N_states_diag) ) allocate (CI_eigenvectors_tmp (N_det,N_states_diag) )