mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-24 21:41:46 +02:00
Modifications of do_double_exc in generate_h_apply
This commit is contained in:
parent
8f5ba570ea
commit
87ae288904
@ -23,26 +23,23 @@ s.set_selection_pt2("epstein_nesbet")
|
|||||||
s.unset_skip()
|
s.unset_skip()
|
||||||
print s
|
print s
|
||||||
|
|
||||||
s = H_apply("just_mono")
|
s = H_apply("just_mono",do_double_exc=False)
|
||||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||||
s.unset_skip()
|
s.unset_skip()
|
||||||
s.unset_double_excitations()
|
|
||||||
print s
|
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.set_selection_pt2("epstein_nesbet_2x2")
|
||||||
s.unset_skip()
|
s.unset_skip()
|
||||||
s.unset_double_excitations()
|
|
||||||
s.filter_1h()
|
s.filter_1h()
|
||||||
s.filter_1p()
|
s.filter_1p()
|
||||||
print s
|
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.set_selection_pt2("epstein_nesbet_2x2")
|
||||||
s.unset_skip()
|
s.unset_skip()
|
||||||
s.unset_double_excitations()
|
|
||||||
s.filter_1h()
|
s.filter_1h()
|
||||||
s.filter_1p()
|
s.filter_1p()
|
||||||
s.filter_2p()
|
s.filter_2p()
|
||||||
|
@ -6,7 +6,7 @@ subroutine all_single
|
|||||||
double precision,allocatable :: E_before(:)
|
double precision,allocatable :: E_before(:)
|
||||||
N_st = N_states
|
N_st = N_states
|
||||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
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
|
soft_touch selection_criterion
|
||||||
threshold_davidson = 1.d-5
|
threshold_davidson = 1.d-5
|
||||||
soft_touch threshold_davidson davidson_criterion
|
soft_touch threshold_davidson davidson_criterion
|
||||||
|
@ -49,7 +49,7 @@ class H_apply(object):
|
|||||||
|
|
||||||
self.selection_pt2 = None
|
self.selection_pt2 = None
|
||||||
self.perturbation = None
|
self.perturbation = None
|
||||||
|
self.do_double_exc = do_double_exc
|
||||||
#s["omp_parallel"] = """!$OMP PARALLEL DEFAULT(NONE) &
|
#s["omp_parallel"] = """!$OMP PARALLEL DEFAULT(NONE) &
|
||||||
s["omp_parallel"] = """ PROVIDE elec_num_tab
|
s["omp_parallel"] = """ PROVIDE elec_num_tab
|
||||||
!$OMP PARALLEL DEFAULT(SHARED) &
|
!$OMP PARALLEL DEFAULT(SHARED) &
|
||||||
@ -247,15 +247,21 @@ class H_apply(object):
|
|||||||
self.data["initialization"] = """
|
self.data["initialization"] = """
|
||||||
PROVIDE psi_selectors_coef psi_selectors E_corr_per_selectors psi_det_sorted_bit
|
PROVIDE psi_selectors_coef psi_selectors E_corr_per_selectors psi_det_sorted_bit
|
||||||
"""
|
"""
|
||||||
|
if self.do_double_exc == True:
|
||||||
self.data["keys_work"] = """
|
self.data["keys_work"] = """
|
||||||
if(check_double_excitation)then
|
! 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, &
|
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)
|
sum_norm_pert,sum_H_pert_diag,N_st,N_int,key_mask,fock_diag_tmp)
|
||||||
else
|
! 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, &
|
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)
|
sum_norm_pert,sum_H_pert_diag,N_st,N_int,key_mask,fock_diag_tmp)
|
||||||
endif
|
"""%(pert)
|
||||||
"""%(pert,pert)
|
|
||||||
|
|
||||||
|
|
||||||
self.data["finalization"] = """
|
self.data["finalization"] = """
|
||||||
|
Loading…
Reference in New Issue
Block a user