From 61771af83ade23fec6dc7aa6bb2dd6c7ef8bf414 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 29 Jul 2014 12:11:26 +0200 Subject: [PATCH] Removed H_apply_threshold --- src/Dets/H_apply.irp.f | 18 ------------------ src/Dets/H_apply_template.f | 2 +- src/Dets/determinants.ezfio_config | 1 - src/Full_CI/full_ci.irp.f | 18 +++++++++++++++++- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/Dets/H_apply.irp.f b/src/Dets/H_apply.irp.f index abe6ae6d..72d3dd36 100644 --- a/src/Dets/H_apply.irp.f +++ b/src/Dets/H_apply.irp.f @@ -42,24 +42,6 @@ BEGIN_PROVIDER [ logical, H_apply_buffer_allocated ] END_PROVIDER -BEGIN_PROVIDER [ double precision, H_apply_threshold ] - implicit none - BEGIN_DOC - ! Theshold on | | - END_DOC - logical :: has - PROVIDE ezfio_filename - call ezfio_has_determinants_H_apply_threshold(has) - if (has) then - call ezfio_get_determinants_H_apply_threshold(H_apply_threshold) - else - H_apply_threshold = 1.d-10 - endif - call write_time(output_Dets) - call write_double(output_Dets, H_apply_threshold, & - 'H_apply_threshold') -END_PROVIDER - subroutine resize_H_apply_buffer(new_size,iproc) implicit none integer, intent(in) :: new_size, iproc diff --git a/src/Dets/H_apply_template.f b/src/Dets/H_apply_template.f index da41da23..84c25c69 100644 --- a/src/Dets/H_apply_template.f +++ b/src/Dets/H_apply_template.f @@ -381,7 +381,7 @@ subroutine $subroutine($params_main) integer :: ispin, k PROVIDE H_apply_buffer_allocated mo_bielec_integrals_in_map N_det_selectors psi_generators - PROVIDE psi_det_sorted_bit coef_hf_selector psi_det psi_coef H_apply_threshold ref_bitmask_energy + PROVIDE psi_det_sorted_bit coef_hf_selector psi_det psi_coef ref_bitmask_energy nmax = ( N_det_generators/nproc ) *nproc call wall_time(wall_0) diff --git a/src/Dets/determinants.ezfio_config b/src/Dets/determinants.ezfio_config index 1b96ffb4..47fe30e8 100644 --- a/src/Dets/determinants.ezfio_config +++ b/src/Dets/determinants.ezfio_config @@ -6,7 +6,6 @@ determinants n_states integer psi_coef double precision (determinants_n_det,determinants_n_states) psi_det integer*8 (determinants_n_int*determinants_bit_kind/8,2,determinants_n_det) - H_apply_threshold double precision n_det_max_jacobi integer threshold_generators double precision threshold_selectors double precision diff --git a/src/Full_CI/full_ci.irp.f b/src/Full_CI/full_ci.irp.f index 96b5796f..51c20b87 100644 --- a/src/Full_CI/full_ci.irp.f +++ b/src/Full_CI/full_ci.irp.f @@ -11,7 +11,23 @@ program cisd pt2 = 1.d0 diag_algorithm = "Lapack" -! do while (maxval(abs(pt2(1:N_st))) > 1.d-4) + if (N_det > n_det_max_fci) then + call diagonalize_CI + call save_wavefunction + psi_det = psi_det_sorted + psi_coef = psi_coef_sorted + N_det = n_det_max_fci + soft_touch N_det psi_det psi_coef + call diagonalize_CI + call save_wavefunction + print *, 'N_det = ', N_det + print *, 'N_states = ', N_states + print *, 'PT2 = ', pt2 + print *, 'E = ', CI_energy + print *, 'E+PT2 = ', CI_energy+pt2 + print *, '-----' + endif + do while (N_det < n_det_max_fci.and.maxval(abs(pt2(1:N_st))) > pt2_max) call H_apply_FCI(pt2, norm_pert, H_pert_diag, N_st) if (N_det > n_det_max_fci) then