9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-07 14:03:37 +01:00

working on some bugs for pert 2rdm

This commit is contained in:
Emmanuel Giner LCT 2019-10-29 00:55:04 +01:00
parent 53242a66b7
commit ecd1e840b5
3 changed files with 8 additions and 1 deletions

View File

@ -177,9 +177,13 @@ subroutine fill_buffer_double_rdm(i_generator, sp, h1, h2, bannedOrb, banned, fo
sum_e_pert = 0d0 sum_e_pert = 0d0
!!!!!!!!!!!!!!!!!! LOOP OVER STATES !!!!!!!!!!!!!!!!!! LOOP OVER STATES
double precision :: i_H_psi_array(N_states)
call i_H_psi(det,psi_det,psi_coef,N_int,N_det,psi_det_size,N_states,i_H_psi_array)
do istate=1,N_states do istate=1,N_states
delta_E = E0(istate) - Hii + E_shift delta_E = E0(istate) - Hii + E_shift
alpha_h_psi = mat(istate, p1, p2) integer :: k
! alpha_h_psi = mat(istate, p1, p2)
alpha_h_psi = i_H_psi_array(istate)
val = alpha_h_psi + alpha_h_psi val = alpha_h_psi + alpha_h_psi
tmp = dsqrt(delta_E * delta_E + val * val) tmp = dsqrt(delta_E * delta_E + val * val)
if (delta_E < 0.d0) then if (delta_E < 0.d0) then
@ -194,6 +198,7 @@ subroutine fill_buffer_double_rdm(i_generator, sp, h1, h2, bannedOrb, banned, fo
end do end do
call give_2rdm_pert_contrib(det,coef,psi_det_connection,psi_coef_connection_reverse,n_det_connection,nkeys,keys,values,nkeys_1e,keys_1e,values_1e,sze_buff) call give_2rdm_pert_contrib(det,coef,psi_det_connection,psi_coef_connection_reverse,n_det_connection,nkeys,keys,values,nkeys_1e,keys_1e,values_1e,sze_buff)
! call give_2rdm_pert_contrib(det,coef,psi_det_sorted,psi_coef_sorted_reverse,N_det,nkeys,keys,values,nkeys_1e,keys_1e,values_1e,sze_buff)
end do end do
end do end do

View File

@ -747,6 +747,7 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
do istate=1,N_states do istate=1,N_states
delta_E = E0(istate) - Hii + E_shift delta_E = E0(istate) - Hii + E_shift
alpha_h_psi = mat(istate, p1, p2) alpha_h_psi = mat(istate, p1, p2)
val = alpha_h_psi + alpha_h_psi val = alpha_h_psi + alpha_h_psi
tmp = dsqrt(delta_E * delta_E + val * val) tmp = dsqrt(delta_E * delta_E + val * val)
if (delta_E < 0.d0) then if (delta_E < 0.d0) then

View File

@ -22,6 +22,7 @@ subroutine give_2rdm_pert_contrib(det,coef,psi_det_connection,psi_coef_connectio
print*,'PB !! there is a perturbative determinant already in the WF !!' print*,'PB !! there is a perturbative determinant already in the WF !!'
call debug_det(det,N_int) call debug_det(det,N_int)
call debug_det(psi_det_connection(1,1,i),N_int) call debug_det(psi_det_connection(1,1,i),N_int)
stop
endif endif
call get_excitation(det,psi_det_connection(1,1,i),exc,degree,phase,N_int) call get_excitation(det,psi_det_connection(1,1,i),exc,degree,phase,N_int)