10
1
mirror of https://github.com/pfloos/quack synced 2025-04-01 06:21:37 +02:00

ok with spin adaptation

This commit is contained in:
Antoine Marie 2025-03-24 23:24:59 +01:00
parent e0fe498b51
commit 86c42b7001
5 changed files with 24 additions and 31 deletions

View File

@ -153,9 +153,9 @@ subroutine GParquet(max_it_1b,conv_1b,max_it_2b,conv_2b,nOrb,nC,nO,nV,nR,nS,eHF,
write(*,*) 'Computing eh effective interaction...'
call wall_time(start_t)
!call R_eh_Gamma(nOrb,nC,nO,nV,nR,nS,nOO,nVV, &
! old_eh_Om,eh_rho,old_ee_Om,ee_rho,old_hh_Om,hh_rho, &
! eh_Gam)
call G_eh_Gamma(nOrb,nC,nO,nV,nR,nS,nOO,nVV, &
old_eh_Om,eh_rho,old_ee_Om,ee_rho,old_hh_Om,hh_rho, &
eh_Gam)
call wall_time(end_t)
t = end_t - start_t

View File

@ -30,31 +30,21 @@ subroutine G_eh_Gamma(nOrb,nC,nO,nV,nR,nS,nOO,nVV, &
do q = nC+1, nOrb-nR
do p = nC+1, nOrb-nR
! do n=1,nS
! eh_sing_Gam(p,q,r,s) = eh_sing_Gam(p,q,r,s) &
! + eh_sing_rho(s,p,n)*eh_sing_rho(q,r,n)/eh_sing_Om(n) &
! + 3d0 * eh_trip_rho(s,p,n)*eh_trip_rho(q,r,n)/eh_trip_Om(n)
! end do
do n=1,nS
eh_Gam(p,q,r,s) = eh_Gam(p,q,r,s) &
+ eh_rho(s,p,n)*eh_rho(q,r,n)/eh_Om(n) &
+ eh_rho(p,s,n)*eh_rho(r,q,n)/eh_Om(n)
end do
! do n=1,nVVs
! eh_sing_Gam(p,q,r,s) = eh_sing_Gam(p,q,r,s) &
! + ee_sing_rho(p,q,n)*ee_sing_rho(r,s,n)/ee_sing_Om(n)
! end do
do n=1,nVV
eh_Gam(p,q,r,s) = eh_Gam(p,q,r,s) &
+ 2d0 * ee_rho(p,q,n)*ee_rho(r,s,n)/ee_Om(n)
end do
! do n=1,nOOs
! eh_sing_Gam(p,q,r,s) = eh_sing_Gam(p,q,r,s) &
! - hh_sing_rho(p,q,n)*hh_sing_rho(r,s,n)/hh_sing_Om(n)
! end do
! do n=1,nVVt
! eh_sing_Gam(p,q,r,s) = eh_sing_Gam(p,q,r,s) &
! + 3d0 * ee_trip_rho(p,q,n)*ee_trip_rho(r,s,n)/ee_trip_Om(n)
! end do
! do n=1,nOOt
! eh_sing_Gam(p,q,r,s) = eh_sing_Gam(p,q,r,s) &
! - 3d0 * hh_trip_rho(p,q,n)*hh_trip_rho(r,s,n)/hh_trip_Om(n)
! end do
do n=1,nOO
eh_Gam(p,q,r,s) = eh_Gam(p,q,r,s) &
- 2d0 * hh_rho(p,q,n)*hh_rho(r,s,n)/hh_Om(n)
end do
enddo
enddo

View File

@ -39,7 +39,9 @@ subroutine G_eh_screened_integral(nOrb,nC,nO,nR,nS,ERI,eh_Gam,XpY,XmY,rho)
!+ (ERI(p,j,q,b) - ERI(p,j,b,q))*XpY(ia,jb) &
+ (ERI(p,j,q,b) - ERI(p,j,b,q))*X &
+ (ERI(p,b,q,j) - ERI(p,b,j,q))*Y &
+ 0d0*eh_Gam(p,j,q,b)*XpY(ia,jb)
+ 1d0*eh_Gam(p,j,q,b)*X &
+ 1d0*eh_Gam(p,b,q,j)*Y
end do
end do
@ -59,7 +61,6 @@ subroutine G_pp_screened_integral(nOrb,nC,nO,nV,nR,nOO,nVV,ERI,pp_Gam,X1,Y1,rho1
! Input variables
integer,intent(in) :: nOrb,nC,nO,nV,nR
double precision,intent(in) :: ERI(nOrb,nOrb,nOrb,nOrb)
double precision,intent(in) :: pp_Gam(nOrb,nOrb,nOrb,nOrb)

View File

@ -43,7 +43,7 @@ subroutine R_pp_singlet_Gamma(nOrb,nC,nR,nS,eh_sing_Om,eh_sing_rho,eh_trip_Om,eh
+ 1.5d0 * eh_trip_rho(p,s,n)*eh_trip_rho(r,q,n)/eh_trip_Om(n)
end do
pp_sing_Gam(p,q,r,s) = pp_sing_Gam(p,q,r,s)/sqrt((1d0 + Kronecker_delta(p,q))*(1d0 + Kronecker_delta(r,s)))
! pp_sing_Gam(p,q,r,s) = pp_sing_Gam(p,q,r,s)/sqrt((1d0 + Kronecker_delta(p,q))*(1d0 + Kronecker_delta(r,s)))
end do
end do

View File

@ -36,7 +36,8 @@ subroutine R_eh_singlet_screened_integral(nOrb,nC,nO,nR,nS,ERI,eh_sing_Gam,XpY,X
rho(p,q,ia) = rho(p,q,ia) &
+ (2d0*ERI(p,j,q,b) - ERI(p,j,b,q))*X &
+ (2d0*ERI(p,b,q,j) - ERI(p,b,j,q))*Y &
+ 0d0*eh_sing_Gam(p,j,q,b)*XpY(ia,jb)
+ 1d0*eh_sing_Gam(p,j,q,b)*X &
+ 1d0*eh_sing_Gam(p,b,q,j)*Y
end do
end do
@ -86,7 +87,8 @@ subroutine R_eh_triplet_screened_integral(nOrb,nC,nO,nR,nS,ERI,eh_trip_Gam,XpY,X
rho(p,q,ia) = rho(p,q,ia) &
- ERI(p,j,b,q)*X &
- ERI(p,b,j,q)*Y &
+ 0d0*eh_trip_Gam(p,j,q,b)*XpY(ia,jb)
+ 1d0*eh_trip_Gam(p,j,q,b)*X &
+ 1d0*eh_trip_Gam(p,b,q,j)*Y
end do
end do
end do