adding SRG-qsGW+C

This commit is contained in:
Pierre-Francois Loos 2024-01-18 12:04:34 +01:00
parent 87245a33e2
commit 26afce35ca
2 changed files with 63 additions and 49 deletions

View File

@ -1,4 +1,4 @@
subroutine RGWC(dotest,nBas,nC,nO,nR,nS,Om,rho,e,eGW,Z)
subroutine RGWC(dotest,nBas,nC,nO,nR,nS,Om,rho,eGW,Z)
! Perform GW+C calculation
@ -17,7 +17,6 @@ subroutine RGWC(dotest,nBas,nC,nO,nR,nS,Om,rho,e,eGW,Z)
double precision,intent(in) :: Om(nS)
double precision,intent(in) :: rho(nBas,nBas,nS)
double precision,intent(in) :: e(nBas)
double precision,intent(in) :: eGW(nBas)
double precision,intent(in) :: Z(nBas)
@ -25,7 +24,10 @@ subroutine RGWC(dotest,nBas,nC,nO,nR,nS,Om,rho,e,eGW,Z)
integer :: p,q,i,a,m
integer :: iSat
double precision,parameter :: cutoff = 1d-3
double precision,parameter :: cutoff = 1d-6
logical,parameter :: do_hole_branch = .true.
logical,parameter :: do_electron_branch = .false.
double precision,allocatable :: de(:,:,:)
double precision,allocatable :: ZC(:)
@ -99,6 +101,8 @@ subroutine RGWC(dotest,nBas,nC,nO,nR,nS,Om,rho,e,eGW,Z)
! GW+C satellites on hole branch
if(do_hole_branch) then
ZSat(:,:) = 0d0
do i=nC+1,nO
do m=1,nS
@ -126,8 +130,12 @@ subroutine RGWC(dotest,nBas,nC,nO,nR,nS,Om,rho,e,eGW,Z)
write(*,*)'-------------------------------------------------------------------------------'
write(*,*)
end if
! GW+C satellites on electron branch
if(do_electron_branch) then
ZSat(:,:) = 0d0
do a=nO+1,nBas-nR
do m=1,nS
@ -155,6 +163,8 @@ subroutine RGWC(dotest,nBas,nC,nO,nR,nS,Om,rho,e,eGW,Z)
write(*,*)'-------------------------------------------------------------------------------'
write(*,*)
end if
! Testing zone
! if(dotest) then

View File

@ -309,6 +309,10 @@ subroutine SRG_qsGW(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,
print *, "Wall Time for SRG", tsrg
print *, "Wall time MO to AO Sigma", tmo
! Cumulant expansion
call RGWC(dotest,nBas,nC,nO,nR,nS,Om,rho,eGW,Z)
! Deallocate memory
deallocate(c,cp,P,F,Fp,J,K,SigC,Z,Om,XpY,XmY,rho,error,error_diis,F_diis)