From 87ae288904aa8e069f811702647576e0ad93bdc3 Mon Sep 17 00:00:00 2001 From: Emmanuel Giner Date: Thu, 18 Feb 2016 17:06:22 +0100 Subject: [PATCH] Modifications of do_double_exc in generate_h_apply --- plugins/FOBOCI/H_apply.irp.f | 9 +++------ plugins/FOBOCI/all_singles.irp.f | 2 +- scripts/generate_h_apply.py | 26 ++++++++++++++++---------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/plugins/FOBOCI/H_apply.irp.f b/plugins/FOBOCI/H_apply.irp.f index c12fa555..0a488753 100644 --- a/plugins/FOBOCI/H_apply.irp.f +++ b/plugins/FOBOCI/H_apply.irp.f @@ -23,26 +23,23 @@ s.set_selection_pt2("epstein_nesbet") s.unset_skip() print s -s = H_apply("just_mono") +s = H_apply("just_mono",do_double_exc=False) s.set_selection_pt2("epstein_nesbet_2x2") s.unset_skip() -s.unset_double_excitations() print s -s = H_apply("just_mono_no_1h_no_1p") +s = H_apply("just_mono_no_1h_no_1p",do_double_exc=False) s.set_selection_pt2("epstein_nesbet_2x2") s.unset_skip() -s.unset_double_excitations() s.filter_1h() s.filter_1p() print s -s = H_apply("just_mono_no_1h_no_1p_no_2p") +s = H_apply("just_mono_no_1h_no_1p_no_2p",do_double_exc=False) s.set_selection_pt2("epstein_nesbet_2x2") s.unset_skip() -s.unset_double_excitations() s.filter_1h() s.filter_1p() s.filter_2p() diff --git a/plugins/FOBOCI/all_singles.irp.f b/plugins/FOBOCI/all_singles.irp.f index 91550b70..e2c4c01e 100644 --- a/plugins/FOBOCI/all_singles.irp.f +++ b/plugins/FOBOCI/all_singles.irp.f @@ -6,7 +6,7 @@ subroutine all_single double precision,allocatable :: E_before(:) N_st = N_states allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st)) - selection_criterion = 0.d0 + selection_criterion = 1.d-8 soft_touch selection_criterion threshold_davidson = 1.d-5 soft_touch threshold_davidson davidson_criterion diff --git a/scripts/generate_h_apply.py b/scripts/generate_h_apply.py index 4f08997b..ca2be5d6 100755 --- a/scripts/generate_h_apply.py +++ b/scripts/generate_h_apply.py @@ -49,7 +49,7 @@ class H_apply(object): self.selection_pt2 = None self.perturbation = None - + self.do_double_exc = do_double_exc #s["omp_parallel"] = """!$OMP PARALLEL DEFAULT(NONE) & s["omp_parallel"] = """ PROVIDE elec_num_tab !$OMP PARALLEL DEFAULT(SHARED) & @@ -247,15 +247,21 @@ class H_apply(object): self.data["initialization"] = """ PROVIDE psi_selectors_coef psi_selectors E_corr_per_selectors psi_det_sorted_bit """ - self.data["keys_work"] = """ - if(check_double_excitation)then - call perturb_buffer_%s(i_generator,keys_out,key_idx,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert, & - sum_norm_pert,sum_H_pert_diag,N_st,N_int,key_mask,fock_diag_tmp) - else - call perturb_buffer_by_mono_%s(i_generator,keys_out,key_idx,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert, & - sum_norm_pert,sum_H_pert_diag,N_st,N_int,key_mask,fock_diag_tmp) - endif - """%(pert,pert) + if self.do_double_exc == True: + self.data["keys_work"] = """ +! if(check_double_excitation)then + call perturb_buffer_%s(i_generator,keys_out,key_idx,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert, & + sum_norm_pert,sum_H_pert_diag,N_st,N_int,key_mask,fock_diag_tmp) +! else +! call perturb_buffer_by_mono_%s(i_generator,keys_out,key_idx,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert, & +! sum_norm_pert,sum_H_pert_diag,N_st,N_int,key_mask,fock_diag_tmp) +! endif + """%(pert,pert) + else: + self.data["keys_work"] = """ + call perturb_buffer_by_mono_%s(i_generator,keys_out,key_idx,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert, & + sum_norm_pert,sum_H_pert_diag,N_st,N_int,key_mask,fock_diag_tmp) + """%(pert) self.data["finalization"] = """