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

right two-body inactive-virtual gradients implemented

This commit is contained in:
eginer 2023-08-17 18:17:46 +02:00
parent 0ffaf820a2
commit 6b56e213d8

View File

@ -79,7 +79,22 @@ subroutine gradvec_tc_ia(i,a,res_l, res_r)
res_r = 0.d0
res_l(1) = -2 * mo_bi_ortho_tc_one_e(a,i)
res_r(1) = -2 * mo_bi_ortho_tc_one_e(i,a)
integer :: j,t,r,jj,tt,rr
do jj = 1, n_core_inact_orb
j = list_core_inact(jj)
res_r(2) += -2.d0 * ( 2.d0 * mo_bi_ortho_tc_two_e(j,i,j,a) - mo_bi_ortho_tc_two_e(i,j,j,a))
res_l(2) += -2.d0 * ( 2.d0 * mo_bi_ortho_tc_two_e(j,a,j,i) - mo_bi_ortho_tc_two_e(j,a,i,j))
enddo
do tt = 1, n_act_orb
t = list_act(tt)
do rr = 1, n_act_orb
r = list_act(rr)
res_r(2) += -0.5d0 * ( &
tc_transition_matrix_mo(r,t,1,1) *(2.d0 * mo_bi_ortho_tc_two_e(r,i,t,a) - mo_bi_ortho_tc_two_e(i,r,t,a)) &
+tc_transition_matrix_mo(t,r,1,1) *(2.d0 * mo_bi_ortho_tc_two_e(t,i,r,a) - mo_bi_ortho_tc_two_e(i,t,r,a)) &
)
enddo
enddo
end
subroutine gradvec_tc_it(i,t,res_l, res_r)