Skip to content

Commit 062c9f7

Browse files
author
lburth
committed
CVS evGW + bug fix in CVS SRG root search
1 parent 42aad4e commit 062c9f7

File tree

7 files changed

+367
-143
lines changed

7 files changed

+367
-143
lines changed

src/GW/CVSUGW.f90

Lines changed: 0 additions & 126 deletions
This file was deleted.

src/GW/CVS_SRG_UGW_Re_SigC.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
double precision function CVS_UGW_SRG_Re_SigC(p,w,s,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupations,virtuals,e,Om,rho)
1+
double precision function CVS_SRG_UGW_Re_SigC(p,w,s,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupations,virtuals,e,Om,rho)
22

33
! Compute diagonal of the correlation part of the self-energy
44

@@ -30,14 +30,14 @@ double precision function CVS_UGW_SRG_Re_SigC(p,w,s,nBas,nC,nO,nV,nR,nS,nCVS,nFC
3030

3131
! Initialize
3232

33-
CVS_UGW_SRG_Re_SigC = 0d0
33+
CVS_SRG_UGW_Re_SigC = 0d0
3434

3535
! Occupied part of the correlation self-energy
3636

3737
do i=1,nO-nFC
3838
do m=1,nS
3939
Dpim = w - e(occupations(i)) + Om(m)
40-
CVS_UGW_SRG_Re_SigC = CVS_UGW_SRG_Re_SigC &
40+
CVS_SRG_UGW_Re_SigC = CVS_SRG_UGW_Re_SigC &
4141
+ rho(p,occupations(i),m)**2*(1d0-exp(-2d0*s*Dpim*Dpim))/Dpim
4242
end do
4343
end do
@@ -47,7 +47,7 @@ double precision function CVS_UGW_SRG_Re_SigC(p,w,s,nBas,nC,nO,nV,nR,nS,nCVS,nFC
4747
do a=nCVS+1,nBas-nO
4848
do m=1,nS
4949
Dpam = w - e(virtuals(a)) - Om(m)
50-
CVS_UGW_SRG_Re_SigC = CVS_UGW_SRG_Re_SigC &
50+
CVS_SRG_UGW_Re_SigC = CVS_SRG_UGW_Re_SigC &
5151
+ rho(p,virtuals(a),m)**2*(1d0-exp(-2d0*s*Dpam*Dpam))/Dpam
5252
end do
5353
end do

src/GW/CVS_SRG_UGW_Re_dSigC.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
double precision function CVS_UGW_SRG_Re_dSigC(p,w,s,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupations,virtuals,e,Om,rho)
1+
double precision function CVS_SRG_UGW_Re_dSigC(p,w,s,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupations,virtuals,e,Om,rho)
22

33
! Compute the derivative of the correlation part of the self-energy
44

@@ -30,24 +30,24 @@ double precision function CVS_UGW_SRG_Re_dSigC(p,w,s,nBas,nC,nO,nV,nR,nS,nCVS,nF
3030

3131
! Initialize
3232

33-
CVS_UGW_SRG_Re_dSigC = 0d0
33+
CVS_SRG_UGW_Re_dSigC = 0d0
3434

3535
! Occupied part of the correlation self-energy
3636

3737
do i=1,nO-nFC
3838
do m=1,nS
3939
Dpim = w - e(occupations(i)) + Om(m)
40-
CVS_UGW_SRG_Re_dSigC = CVS_UGW_SRG_Re_dSigC &
40+
CVS_SRG_UGW_Re_dSigC = CVS_SRG_UGW_Re_dSigC &
4141
- rho(p,occupations(i),m)**2*(1d0-exp(-2d0*s*Dpim*Dpim))/Dpim**2
4242
end do
4343
end do
4444

4545
! Virtual part of the correlation self-energy
4646

47-
do a=nCVS+1,nBas-nFC
47+
do a=nCVS+1,nBas-nO
4848
do m=1,nS
4949
Dpam = w - e(virtuals(a)) - Om(m)
50-
CVS_UGW_SRG_Re_dSigC = CVS_UGW_SRG_Re_dSigC &
50+
CVS_SRG_UGW_Re_dSigC = CVS_SRG_UGW_Re_dSigC &
5151
- rho(p,virtuals(a),m)**2*(1d0-exp(-2d0*s*Dpam*Dpam))/Dpam**2
5252
end do
5353
end do

src/GW/CVS_UG0W0.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ subroutine CVS_UG0W0(dotest,doACFDT,exchange_kernel,doXBS,dophBSE,TDA_W,TDA,dBSE
183183
!------------------------------------------------!
184184

185185
if(doSRG) then
186-
call UGW_SRG_self_energy_diag(flow,nBas,nC,nO,nV,nR,nSt,eHF,Om,rho,EcGM,SigC,Z)
186+
call CVS_UGW_SRG_self_energy_diag(flow,nBas,nC,nO,nV,nR,nSt,nCVS,nFC,occupations_fc,virtuals,eHF,Om,rho,EcGM,SigC,Z)
187187
else
188-
call UGW_self_energy_diag(eta,nBas,nC,nO,nV,nR,nSt,eHF,Om,rho,EcGM,SigC,Z)
188+
call CVS_UGW_self_energy_diag(eta,nBas,nC,nO,nV,nR,nSt,nCVS,nFC,occupations_fc,virtuals,eHF,Om,rho,EcGM,SigC,Z)
189189
end if
190190

191191
!-----------------------------------!

src/GW/CVS_UGW_QP_graph.f90

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ subroutine CVS_UGW_QP_graph(doSRG,eta,flow,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupati
3434
integer,parameter :: maxIt = 64
3535
double precision,parameter :: thresh = 1d-6
3636
double precision,external :: CVS_UGW_Re_SigC,CVS_UGW_Re_dSigC
37-
double precision,external :: CVS_UGW_SRG_Re_SigC,CVS_UGW_SRG_Re_dSigC
37+
double precision,external :: CVS_SRG_UGW_Re_SigC,CVS_SRG_UGW_Re_dSigC
3838
double precision :: SigC,dSigC
3939
double precision :: f,df
4040
double precision :: w
@@ -49,8 +49,7 @@ subroutine CVS_UGW_QP_graph(doSRG,eta,flow,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupati
4949
write(*,*)'-----------------------------------------------------'
5050
write(*,'(A5,1X,A3,1X,A15,1X,A15,1X,A10)') 'Orb.','It.','e_GWlin (eV)','e_GW (eV)','Z'
5151
write(*,*)'-----------------------------------------------------'
52-
53-
do p=nC+1,nBas-nR
52+
do p=1,nBas
5453

5554
w = eGWlin(p)
5655
nIt = 0
@@ -62,8 +61,8 @@ subroutine CVS_UGW_QP_graph(doSRG,eta,flow,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupati
6261

6362
if(doSRG) then
6463

65-
SigC = CVS_UGW_SRG_Re_SigC(p,w,flow,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupations,virtuals,eOld,Om,rho)
66-
dSigC = CVS_UGW_SRG_Re_dSigC(p,w,flow,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupations,virtuals,eOld,Om,rho)
64+
SigC = CVS_SRG_UGW_Re_SigC(p,w,flow,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupations,virtuals,eOld,Om,rho)
65+
dSigC = CVS_SRG_UGW_Re_dSigC(p,w,flow,nBas,nC,nO,nV,nR,nS,nCVS,nFC,occupations,virtuals,eOld,Om,rho)
6766

6867
else
6968

0 commit comments

Comments
 (0)