mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-06 21:43:39 +01:00
removed STUPID DAMN BUG in ordering of psi_selectors for TC
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
bea45d618f
commit
a284f6f9d8
2
external/qp2-dependencies
vendored
2
external/qp2-dependencies
vendored
@ -1 +1 @@
|
||||
Subproject commit f40bde0925808bbec0424b57bfcef1b26473a1c8
|
||||
Subproject commit ce14f57b50511825a9fedb096749200779d3f4d4
|
@ -916,8 +916,18 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
|
||||
psi_h_alpha = mat_l(istate, p1, p2)
|
||||
alpha_h_psi = mat_r(istate, p1, p2)
|
||||
endif
|
||||
coef(istate) = alpha_h_psi / delta_E
|
||||
e_pert(istate) = coef(istate) * psi_h_alpha
|
||||
val = 4.d0 * psi_h_alpha * alpha_h_psi
|
||||
tmp = dsqrt(delta_E * delta_E + val)
|
||||
if (delta_E < 0.d0) then
|
||||
tmp = -tmp
|
||||
endif
|
||||
e_pert(istate) = 0.5d0 * (tmp - delta_E)
|
||||
if(dsqrt(dabs(tmp)).gt.1.d-4.and.dabs(alpha_h_psi).gt.1.d-4)then
|
||||
coef(istate) = e_pert(istate) / alpha_h_psi
|
||||
else
|
||||
coef(istate) = alpha_h_psi / delta_E
|
||||
endif
|
||||
|
||||
! if(selection_tc == 1 )then
|
||||
! if(e_pert(istate).lt.0.d0)then
|
||||
! e_pert(istate) = 0.d0
|
||||
|
@ -78,6 +78,8 @@ subroutine run_stochastic_cipsi
|
||||
(N_det < N_det_max) .and. &
|
||||
(maxval(abs(pt2_data % pt2(1:N_states))) > pt2_max) &
|
||||
)
|
||||
print*,'maxval(abs(pt2_data % pt2(1:N_states)))',maxval(abs(pt2_data % pt2(1:N_states)))
|
||||
print*,pt2_max
|
||||
write(*,'(A)') '--------------------------------------------------------------------------------'
|
||||
|
||||
|
||||
|
@ -18,14 +18,14 @@ BEGIN_PROVIDER [ integer, N_det_selectors]
|
||||
double precision :: norm, norm_max
|
||||
call write_time(6)
|
||||
N_det_selectors = N_det
|
||||
norm = 1.d0
|
||||
do i=1,N_det
|
||||
norm = norm - psi_average_norm_contrib_tc(i)
|
||||
if (norm - 1.d-10 < 1.d0 - threshold_selectors) then
|
||||
N_det_selectors = i
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
! norm = 1.d0
|
||||
! do i=1,N_det
|
||||
! norm = norm - psi_average_norm_contrib_tc(i)
|
||||
! if (norm - 1.d-10 < 1.d0 - threshold_selectors) then
|
||||
! N_det_selectors = i
|
||||
! exit
|
||||
! endif
|
||||
! enddo
|
||||
N_det_selectors = max(N_det_selectors,N_det_generators)
|
||||
call write_int(6,N_det_selectors,'Number of selectors')
|
||||
END_PROVIDER
|
||||
|
@ -56,6 +56,7 @@ BEGIN_PROVIDER [double precision, ao_tc_int_chemist, (ao_num, ao_num, ao_num, ao
|
||||
do i = 1, ao_num
|
||||
do k = 1, ao_num
|
||||
ao_tc_int_chemist(k,i,l,j) = tc_grad_square_ao(k,i,l,j) + tc_grad_and_lapl_ao(k,i,l,j) + ao_two_e_coul(k,i,l,j)
|
||||
! ao_tc_int_chemist(k,i,l,j) = ao_two_e_coul(k,i,l,j)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
@ -83,6 +84,7 @@ BEGIN_PROVIDER [double precision, ao_tc_int_chemist_test, (ao_num, ao_num, ao_nu
|
||||
do i = 1, ao_num
|
||||
do k = 1, ao_num
|
||||
ao_tc_int_chemist_test(k,i,l,j) = tc_grad_square_ao_test(k,i,l,j) + tc_grad_and_lapl_ao_test(k,i,l,j) + ao_two_e_coul(k,i,l,j)
|
||||
! ao_tc_int_chemist_test(k,i,l,j) = ao_two_e_coul(k,i,l,j)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
@ -39,7 +39,7 @@ END_PROVIDER
|
||||
psi_average_norm_contrib_sorted_tc(i) = -psi_average_norm_contrib_tc(i)
|
||||
iorder(i) = i
|
||||
enddo
|
||||
call dsort(psi_average_norm_contrib_sorted_tc,iorder,N_det)
|
||||
! call dsort(psi_average_norm_contrib_sorted_tc,iorder,N_det)
|
||||
do i=1,N_det
|
||||
do j=1,N_int
|
||||
psi_det_sorted_tc(j,1,i) = psi_det(j,1,iorder(i))
|
||||
|
@ -232,6 +232,7 @@ subroutine double_htilde_three_body_ints_bi_ort(Nint, key_j, key_i, hthree)
|
||||
other_spin(1) = 2
|
||||
other_spin(2) = 1
|
||||
|
||||
|
||||
call get_excitation_degree(key_i, key_j, degree, Nint)
|
||||
|
||||
hthree = 0.d0
|
||||
|
@ -94,6 +94,7 @@ subroutine three_comp_two_e_elem(key_i,h1,h2,p1,p2,s1,s2,hthree)
|
||||
integer :: ipart, ihole
|
||||
double precision :: direct_int, exchange_int
|
||||
|
||||
|
||||
nexc(1) = 0
|
||||
nexc(2) = 0
|
||||
!! Get all the holes and particles of key_i with respect to the ROHF determinant
|
||||
|
@ -93,9 +93,9 @@ subroutine H_tc_u_0_nstates_openmp(v_0,u_0,N_st,sze, do_right)
|
||||
double precision, allocatable :: u_t(:,:), v_t(:,:)
|
||||
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: u_t
|
||||
allocate(u_t(N_st,N_det),v_t(N_st,N_det))
|
||||
provide mo_bi_ortho_tc_one_e mo_bi_ortho_tc_two_e
|
||||
provide ref_tc_energy_tot fock_op_2_e_tc_closed_shell
|
||||
provide eff_2_e_from_3_e_ab eff_2_e_from_3_e_aa eff_2_e_from_3_e_bb
|
||||
! provide mo_bi_ortho_tc_one_e mo_bi_ortho_tc_two_e
|
||||
! provide ref_tc_energy_tot fock_op_2_e_tc_closed_shell
|
||||
! provide eff_2_e_from_3_e_ab eff_2_e_from_3_e_aa eff_2_e_from_3_e_bb
|
||||
do k=1,N_st
|
||||
call dset_order(u_0(1,k),psi_bilinear_matrix_order,N_det)
|
||||
enddo
|
||||
|
Loading…
Reference in New Issue
Block a user