4
1
mirror of https://github.com/pfloos/quack synced 2024-11-07 14:43:58 +01:00

OK for ufGW

This commit is contained in:
Pierre-Francois Loos 2021-10-18 14:14:46 +02:00
parent d038594640
commit 58044a8a89
3 changed files with 43 additions and 22 deletions

View File

@ -15,7 +15,7 @@
# G0W0* evGW* qsGW*
F F F
# G0T0 evGT qsGT
T T T
F F F
# MCMP2
F
# * unrestricted version available

View File

@ -48,8 +48,8 @@ subroutine ufGW(eta,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF)
! Dimension of the supermatrix
n2h1p = nBas*nO*nS
n2p1h = nBas*nV*nS
n2h1p = nO*nO*nS
n2p1h = nV*nV*nO
nH = nBas + n2h1p + n2p1h
! Memory allocation
@ -76,7 +76,7 @@ subroutine ufGW(eta,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF)
! Block F !
!---------!
do p=nC+1,nBas-nV
do p=nC+1,nBas-nR
H(p,p) = eHF(p)
end do
@ -84,12 +84,12 @@ subroutine ufGW(eta,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF)
! Block V2h1p !
!-------------!
do p=nC+1,nBas-nV
do p=nC+1,nBas-nR
klc = 0
do k=nC+1,nO
do l=nC+1,nO
do c=nO+1,nBas-nV
do c=nO+1,nBas-nR
klc = klc + 1
H(p ,nBas+klc) = sqrt(2d0)*ERI(p,c,k,l)
@ -105,16 +105,16 @@ subroutine ufGW(eta,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF)
! Block V2p1h !
!-------------!
do p=nC+1,nBas-nV
do p=nC+1,nBas-nR
kcd = 0
do k=nC+1,nO
do c=nO+1,nBas-nV
do d=nO+1,nBas-nV
do c=nO+1,nBas-nR
do d=nO+1,nBas-nR
kcd = kcd + 1
H(p ,nBas+kcd) = sqrt(2d0)*ERI(p,k,d,c)
H(nBas+kcd,p ) = sqrt(2d0)*ERI(p,k,d,c)
H(p ,nBas+n2h1P+kcd) = sqrt(2d0)*ERI(p,k,d,c)
H(nBas+n2h1p+kcd,p ) = sqrt(2d0)*ERI(p,k,d,c)
end do
end do
@ -129,17 +129,18 @@ subroutine ufGW(eta,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF)
ija = 0
do i=nC+1,nO
do j=nC+1,nO
do a=nO+1,nBas-nV
do a=nO+1,nBas-nR
ija = ija + 1
klc = 0
do k=nC+1,nO
do l=nC+1,nO
do c=nO+1,nBas-nV
do c=nO+1,nBas-nR
klc = klc + 1
H(nBas+ija,nBas+klc) = ((eHF(i) + eHF(j) - eHF(a))*Kronecker_delta(j,l)*Kronecker_delta(a,c) &
- ERI(j,c,a,l))**Kronecker_delta(i,k)
H(nBas+ija,nBas+klc) &
= ((eHF(i) + eHF(j) - eHF(a))*Kronecker_delta(j,l)*Kronecker_delta(a,c) &
- 2d0*ERI(j,c,a,l))*Kronecker_delta(i,k)
end do
end do
@ -155,18 +156,19 @@ subroutine ufGW(eta,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF)
iab = 0
do i=nC+1,nO
do a=nO+1,nBas-nV
do b=nO+1,nBas-nV
do a=nO+1,nBas-nR
do b=nO+1,nBas-nR
iab = iab + 1
kcd = 0
do k=nC+1,nO
do c=nO+1,nBas-nV
do d=nO+1,nBas-nV
do c=nO+1,nBas-nR
do d=nO+1,nBas-nR
kcd = kcd + 1
H(nBas+iab,nBas+kcd) = ((eHF(a) + eHF(b) - eHF(i))*Kronecker_delta(i,k)*Kronecker_delta(a,c) &
- ERI(j,c,a,l))**Kronecker_delta(b,d)
H(nBas+n2h1p+iab,nBas+n2h1p+kcd) &
= ((eHF(a) + eHF(b) - eHF(i))*Kronecker_delta(i,k)*Kronecker_delta(a,c) &
+ 2d0*ERI(a,k,i,c))*Kronecker_delta(b,d)
end do
end do

View File

@ -15,7 +15,7 @@ program QuAcK
logical :: doRPA,doRPAx,doppRPA
logical :: doADC
logical :: doG0F2,doevGF2,doqsGF2,doG0F3,doevGF3
logical :: doG0W0,doevGW,doqsGW
logical :: doG0W0,doevGW,doqsGW,doufGW
logical :: doG0T0,doevGT,doqsGT
logical :: doMCMP2,doMinMCMP2
logical :: doGTGW = .false.
@ -99,6 +99,7 @@ program QuAcK
double precision :: start_G0W0 ,end_G0W0 ,t_G0W0
double precision :: start_evGW ,end_evGW ,t_evGW
double precision :: start_qsGW ,end_qsGW ,t_qsGW
double precision :: start_ufGW ,end_ufGW ,t_ufGW
double precision :: start_G0T0 ,end_G0T0 ,t_G0T0
double precision :: start_evGT ,end_evGT ,t_evGT
double precision :: start_qsGT ,end_qsGT ,t_qsGT
@ -1023,6 +1024,24 @@ program QuAcK
end if
!------------------------------------------------------------------------
! Perform ufGW calculatiom
!------------------------------------------------------------------------
doufGW = .true.
if(doufGW) then
call cpu_time(start_ufGW)
call ufGW(eta_GW,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_MO,eHF)
call cpu_time(end_ufGW)
t_ufGW = end_ufGW - start_ufGW
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for ufGW = ',t_ufGW,' seconds'
write(*,*)
end if
!------------------------------------------------------------------------
! Perform G0T0 calculatiom
!------------------------------------------------------------------------