4
1
mirror of https://github.com/pfloos/quack synced 2025-05-06 23:34:42 +02:00

bugs fixed complex G0F2

This commit is contained in:
Loris Burth 2025-03-25 16:23:27 +01:00
parent 0ed01dc905
commit a7e5bb1857
7 changed files with 12 additions and 10 deletions

View File

@ -175,7 +175,7 @@ subroutine RGF(dotest,doG0F2,doevGF2,doqsGF2,doufG0F02,doG0F3,doevGF3,docG0F2,
! Compute complex G0F2 electronic binding energies
!------------------------------------------------------------------------
if(doG0F2) then
if(docG0F2) then
call wall_time(start_GF)
call cRG0F2(dotest,dophBSE,doppBSE,TDA,dBSE,dTDA,singlet,triplet, &

View File

@ -63,7 +63,8 @@ subroutine cRG0F2(dotest,dophBSE,doppBSE,TDA,dBSE,dTDA,singlet,triplet,linearize
allocate(Re_SigC(nOrb),Im_SigC(nOrb), Re_Z(nOrb),Im_Z(nOrb),&
Re_eGFlin(nOrb),Im_eGFlin(nOrb), Re_eGF(nOrb),Im_eGF(nOrb),e_CAP(nOrb))
do p = 1, nOrb
e_CAP(p) = CAP(p,p)
e_CAP(p) = CAP(p,p)
write(*,*) p, e_CAP(p)
end do
! Frequency-dependent second-order contribution
@ -74,7 +75,7 @@ subroutine cRG0F2(dotest,dophBSE,doppBSE,TDA,dBSE,dTDA,singlet,triplet,linearize
else
call RGF2_self_energy_diag(eta,nOrb,nC,nO,nV,nR,eHF,ERI,Re_SigC,Im_SigC,Re_Z,Im_Z,e_CAP)
call cRGF2_self_energy_diag(eta,nOrb,nC,nO,nV,nR,eHF,ERI,Re_SigC,Im_SigC,Re_Z,Im_Z,e_CAP)
end if

View File

@ -54,7 +54,7 @@ subroutine cRGF2_self_energy_diag(eta,nBas,nC,nO,nV,nR,e,ERI,Re_SigC,Im_SigC,Re_
num = (2d0*ERI(p,a,i,j) - ERI(p,a,j,i))*ERI(p,a,i,j)
Re_SigC(p) = Re_SigC(p) + num*eps/(eps**2 + eta_tilde**2)
Im_SigC(p) = Im_SigC(p) - num*eta_tilde/(eps**2 + eta_tilde**2)
Im_SigC(p) = Im_SigC(p) + num*eta_tilde/(eps**2 + eta_tilde**2)
Re_DS(p) = Re_DS(p) - num*(eps**2 - eta_tilde**2)/(eps**2 + eta_tilde**2)**2
Im_DS(p) = Im_DS(p) + 2*num*eta_tilde*eps/(eps**2 + eta_tilde**2)**2
@ -81,7 +81,6 @@ subroutine cRGF2_self_energy_diag(eta,nBas,nC,nO,nV,nR,e,ERI,Re_SigC,Im_SigC,Re_
end do
end do
end do
Re_Z(:) = (1d0-Re_DS(:))/((1d0 - Re_DS(:))**2 + Im_DS(:)**2)
Im_Z(:) = Im_DS(:)/((1d0 - Re_DS(:))**2 + Im_DS(:)**2)
deallocate(Re_DS,Im_DS)

View File

@ -42,7 +42,7 @@ subroutine print_cRG0F2(nBas,nO,eHF,e_cap,Re_Sig,Im_Sig,Re_eGF,Im_eGF,Re_Z,Im_Z,
write(*,*)'-------------------------------------------------------------------------------'
write(*,'(1X,A1,1X,A3,1X,A1,1X,A15,1X,A1,1X,A15,1X,A1,1X,A15,1X,A1,1X,A15,1X,A1,1X)') &
'|','#','|','Im(e_HF) (eV)','|','Im(Sig_GF2) (eV)','|','Im(Z)','|','Im(e_GF2) (eV)','|'
'|','#','|','CAP(p,p) (eV)','|','Im(Sig_GF2) (eV)','|','Im(Z)','|','Im(e_GF2) (eV)','|'
write(*,*)'-------------------------------------------------------------------------------'
do p=1,nBas

View File

@ -194,7 +194,7 @@ program QuAcK
call read_1e_integrals(working_dir,nBas,S,T,V,Hc)
call read_eta_cap(working_dir,eta_cap)
if (docRHF .or. docG0W0) call read_CAP_integrals(nBas,CAP) ! Add different cases if needed
if (docRHF .or. docG0W0 .or. docG0F2) call read_CAP_integrals(nBas,CAP) ! Add different cases if needed
CAP(:,:) = -eta_cap*CAP(:,:)
call read_dipole_integrals(working_dir,nBas,dipole_int_AO)
call wall_time(end_int)

View File

@ -207,7 +207,10 @@ subroutine RQuAcK(working_dir,use_gpu,dotest,doRHF,doROHF,docRHF,
! 4-index transform
call AOtoMO_ERI_RHF(nBas,nOrb,cHF,ERI_AO,ERI_MO)
if (docG0W0 .or. docG0F2) call AOtoMO(nBas,nOrb,cHF,CAP_AO,CAP_MO) ! Add the different cases for cGW methods when implemented
write(*,*) docG0F2
if (docG0W0 .or. docG0F2) then
call AOtoMO(nBas,nOrb,cHF,CAP_AO,CAP_MO) ! Add the different cases for cGW methods when implemented
end if
call wall_time(end_AOtoMO)
t_AOtoMO = end_AOtoMO - start_AOtoMO
@ -330,7 +333,6 @@ subroutine RQuAcK(working_dir,use_gpu,dotest,doRHF,doROHF,docRHF,
doGF = doG0F2 .or. doevGF2 .or. doqsGF2 .or. doufG0F02 .or. doG0F3 .or. doevGF3 .or. docG0F2
if(doGF) then
call wall_time(start_GF)
call RGF(dotest,doG0F2,doevGF2,doqsGF2,doufG0F02,doG0F3,doevGF3,docG0F2,renorm_GF,maxSCF_GF, &
thresh_GF,max_diis_GF,dophBSE,doppBSE,TDA,dBSE,dTDA,singlet,triplet,lin_GF, &

View File

@ -208,7 +208,7 @@ subroutine read_methods(working_dir, &
! Read Complex methods
docG0W0 = .false.
doG0F2 = .false.
docG0F2 = .false.
read(1,*)
read(1,*) ans1,ans2