From 503cea9378c483b79214e67ffabe493fb7531d0a Mon Sep 17 00:00:00 2001 From: Manu Date: Fri, 6 Jun 2014 16:22:54 +0200 Subject: [PATCH] add threshold_convergence_SC2 --- src/CISD_SC2_selected/cisd_sc2_selection.irp.f | 6 +++--- src/Dets/diagonalize_CI_SC2.irp.f | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/CISD_SC2_selected/cisd_sc2_selection.irp.f b/src/CISD_SC2_selected/cisd_sc2_selection.irp.f index 1bb9a389..3610a0fe 100644 --- a/src/CISD_SC2_selected/cisd_sc2_selection.irp.f +++ b/src/CISD_SC2_selected/cisd_sc2_selection.irp.f @@ -13,9 +13,9 @@ program cisd_sc2_selected pt2 = 1.d0 perturbation = "epstein_nesbet_sc2_projected" E_old(1) = HF_energy - davidson_threshold = 1.d-4 + davidson_threshold = 1.d-6 - do while (maxval(abs(pt2(1:N_st))) > 1.d-6) + do while (maxval(abs(pt2(1:N_st))) > 1.d-4) print*,'----' print*,'' call H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st) @@ -39,7 +39,7 @@ program cisd_sc2_selected enddo pt2 = 0.d0 call H_apply_PT2(pt2, norm_pert, H_pert_diag, N_st) - davidson_threshold = 1.d-8 + davidson_threshold = 1.d-10 touch davidson_threshold davidson_criterion do i = 1, N_st max = 0.d0 diff --git a/src/Dets/diagonalize_CI_SC2.irp.f b/src/Dets/diagonalize_CI_SC2.irp.f index 6873f930..c1b67e54 100644 --- a/src/Dets/diagonalize_CI_SC2.irp.f +++ b/src/Dets/diagonalize_CI_SC2.irp.f @@ -15,6 +15,14 @@ BEGIN_PROVIDER [ double precision, CI_SC2_energy, (N_states) ] END_PROVIDER + BEGIN_PROVIDER [ double precision, threshold_convergence_SC2] + implicit none + BEGIN_DOC + ! convergence of the correlation energy of SC2 iterations + END_DOC + threshold_convergence_SC2 = 1.d-8 + + END_PROVIDER BEGIN_PROVIDER [ double precision, CI_SC2_electronic_energy, (N_states) ] &BEGIN_PROVIDER [ double precision, CI_SC2_eigenvectors, (N_det,N_states) ] implicit none @@ -32,7 +40,7 @@ END_PROVIDER double precision :: convergence call CISD_SC2(psi_det,CI_SC2_eigenvectors,CI_SC2_electronic_energy, & - size(CI_SC2_eigenvectors,1),N_det,N_states,N_int,davidson_threshold) + size(CI_SC2_eigenvectors,1),N_det,N_states,N_int,threshold_convergence_SC2) END_PROVIDER subroutine diagonalize_CI_SC2