mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-25 05:51:46 +02:00
corrected bugs in fock for MRPT
This commit is contained in:
parent
d5a76190ca
commit
9121d1a604
@ -11,8 +11,6 @@
|
||||
accu = 0.d0
|
||||
i_inact_core_orb = list_core_inact(i)
|
||||
do j = 1, n_core_inact_orb
|
||||
! do j = 1, elec_alpha_num
|
||||
! j_inact_core_orb = j
|
||||
j_inact_core_orb = list_core_inact(j)
|
||||
accu += 2.d0 * mo_bielec_integral_jj(i_inact_core_orb,j_inact_core_orb) &
|
||||
- mo_bielec_integral_jj_exchange(i_inact_core_orb,j_inact_core_orb)
|
||||
@ -84,8 +82,8 @@
|
||||
accu_exchange(2) += 2.d0 * nb * exchange
|
||||
enddo
|
||||
enddo
|
||||
fock_core_inactive_from_act(i_inact_core_orb,1,i_state) = accu_coulomb + accu_exchange(1)
|
||||
fock_core_inactive_from_act(i_inact_core_orb,2,i_state) = accu_coulomb + accu_exchange(2)
|
||||
fock_core_inactive_from_act(i_inact_core_orb,1,i_state) = accu_coulomb - accu_exchange(1)
|
||||
fock_core_inactive_from_act(i_inact_core_orb,2,i_state) = accu_coulomb - accu_exchange(2)
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
@ -131,8 +129,8 @@
|
||||
accu_exchange(2) += 2.d0 * nb * exchange
|
||||
enddo
|
||||
enddo
|
||||
fock_virt_from_act(i_virt_orb,1,i_state) = accu_coulomb + accu_exchange(1)
|
||||
fock_virt_from_act(i_virt_orb,2,i_state) = accu_coulomb + accu_exchange(2)
|
||||
fock_virt_from_act(i_virt_orb,1,i_state) = accu_coulomb - accu_exchange(1)
|
||||
fock_virt_from_act(i_virt_orb,2,i_state) = accu_coulomb - accu_exchange(2)
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
@ -130,19 +130,30 @@
|
||||
print*, '2h1p = ',accu
|
||||
|
||||
! 2h2p
|
||||
delta_ij_tmp = 0.d0
|
||||
call H_apply_mrpt_2h2p(delta_ij_tmp,N_det)
|
||||
accu = 0.d0
|
||||
!delta_ij_tmp = 0.d0
|
||||
!call H_apply_mrpt_2h2p(delta_ij_tmp,N_det)
|
||||
!accu = 0.d0
|
||||
!do i_state = 1, N_states
|
||||
!do i = 1, N_det
|
||||
! do j = 1, N_det
|
||||
! accu(i_state) += delta_ij_tmp(j,i,i_state) * psi_coef(i,i_state) * psi_coef(j,i_state)
|
||||
! delta_ij(j,i,i_state) += delta_ij_tmp(j,i,i_state)
|
||||
! enddo
|
||||
!enddo
|
||||
!second_order_pt_new_2h2p(i_state) = accu(i_state)
|
||||
!enddo
|
||||
!print*, '2h2p = ',accu
|
||||
|
||||
double precision :: contrib_2h2p(N_states)
|
||||
call give_2h2p(contrib_2h2p)
|
||||
do i_state = 1, N_states
|
||||
do i = 1, N_det
|
||||
do j = 1, N_det
|
||||
accu(i_state) += delta_ij_tmp(j,i,i_state) * psi_coef(i,i_state) * psi_coef(j,i_state)
|
||||
delta_ij(j,i,i_state) += delta_ij_tmp(j,i,i_state)
|
||||
enddo
|
||||
delta_ij(i,i,i_state) += contrib_2h2p(i_state)
|
||||
enddo
|
||||
second_order_pt_new_2h2p(i_state) = accu(i_state)
|
||||
second_order_pt_new_2h2p(i_state) = contrib_2h2p(i_state)
|
||||
enddo
|
||||
print*, '2h2p = ',accu
|
||||
print*, '2h2p = ',contrib_2h2p(1)
|
||||
|
||||
|
||||
! total
|
||||
accu = 0.d0
|
||||
|
Loading…
Reference in New Issue
Block a user