mirror of
https://github.com/pfloos/quack
synced 2024-08-25 05:31:47 +02:00
add QP search in UG0W0 and evUGW
This commit is contained in:
parent
1be31c72f4
commit
4d8b25dfea
@ -13,7 +13,7 @@
|
|||||||
# G0F2* evGF2* qsGF2* G0F3 evGF3
|
# G0F2* evGF2* qsGF2* G0F3 evGF3
|
||||||
F F F F F
|
F F F F F
|
||||||
# G0W0* evGW* qsGW* SRG-qsGW ufG0W0 ufGW
|
# G0W0* evGW* qsGW* SRG-qsGW ufG0W0 ufGW
|
||||||
T F F F F F
|
F T F F F F
|
||||||
# G0T0pp* evGTpp* qsGTpp* G0T0eh evGTeh qsGTeh
|
# G0T0pp* evGTpp* qsGTpp* G0T0eh evGTeh qsGTeh
|
||||||
F F F F F F
|
F F F F F F
|
||||||
# * unrestricted version available
|
# * unrestricted version available
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# HF: maxSCF thresh DIIS n_diis guess_type ortho_type mix_guess level_shift stability
|
# HF: maxSCF thresh DIIS n_diis guess_type ortho_type mix_guess level_shift stability
|
||||||
999 0.0000001 T 5 1 1 T 0.0 T
|
5000 0.0000001 T 5 1 1 T 0.0 T
|
||||||
# MP: reg
|
# MP: reg
|
||||||
F
|
F
|
||||||
# CC: maxSCF thresh DIIS n_diis
|
# CC: maxSCF thresh DIIS n_diis
|
||||||
@ -9,7 +9,7 @@
|
|||||||
# GF: maxSCF thresh DIIS n_diis lin eta renorm reg
|
# GF: maxSCF thresh DIIS n_diis lin eta renorm reg
|
||||||
256 0.00001 T 5 T 0.0 0 F
|
256 0.00001 T 5 T 0.0 0 F
|
||||||
# GW: maxSCF thresh DIIS n_diis lin eta TDA_W reg
|
# GW: maxSCF thresh DIIS n_diis lin eta TDA_W reg
|
||||||
256 0.00001 T 5 T 0.00367493 F F
|
256 0.00001 T 5 F 0.0 F F
|
||||||
# GT: maxSCF thresh DIIS n_diis lin eta TDA_T reg
|
# GT: maxSCF thresh DIIS n_diis lin eta TDA_T reg
|
||||||
256 0.00001 T 5 F 0.0 F F
|
256 0.00001 T 5 F 0.0 F F
|
||||||
# ACFDT: AC Kx XBS
|
# ACFDT: AC Kx XBS
|
||||||
|
@ -32,21 +32,21 @@ double precision function GW_SigC(p,w,eta,nBas,nC,nO,nV,nR,nS,e,Om,rho)
|
|||||||
! Occupied part of the correlation self-energy
|
! Occupied part of the correlation self-energy
|
||||||
|
|
||||||
do i=nC+1,nO
|
do i=nC+1,nO
|
||||||
do m=1,nS
|
do m=1,nS
|
||||||
eps = w - e(i) + Om(m)
|
eps = w - e(i) + Om(m)
|
||||||
num = 2d0*rho(p,i,m)**2
|
num = 2d0*rho(p,i,m)**2
|
||||||
GW_SigC = GW_SigC + num*eps/(eps**2 + eta**2)
|
GW_SigC = GW_SigC + num*eps/(eps**2 + eta**2)
|
||||||
enddo
|
end do
|
||||||
enddo
|
end do
|
||||||
|
|
||||||
! Virtual part of the correlation self-energy
|
! Virtual part of the correlation self-energy
|
||||||
|
|
||||||
do a=nO+1,nBas-nR
|
do a=nO+1,nBas-nR
|
||||||
do m=1,nS
|
do m=1,nS
|
||||||
eps = w - e(a) - Om(m)
|
eps = w - e(a) - Om(m)
|
||||||
num = 2d0*rho(p,a,m)**2
|
num = 2d0*rho(p,a,m)**2
|
||||||
GW_SigC = GW_SigC + num*eps/(eps**2 + eta**2)
|
GW_SigC = GW_SigC + num*eps/(eps**2 + eta**2)
|
||||||
enddo
|
end do
|
||||||
enddo
|
end do
|
||||||
|
|
||||||
end function
|
end function
|
||||||
|
@ -32,21 +32,21 @@ double precision function GW_dSigC(p,w,eta,nBas,nC,nO,nV,nR,nS,e,Om,rho)
|
|||||||
! Occupied part of the correlation self-energy
|
! Occupied part of the correlation self-energy
|
||||||
|
|
||||||
do i=nC+1,nO
|
do i=nC+1,nO
|
||||||
do m=1,nS
|
do m=1,nS
|
||||||
eps = w - e(i) + Om(m)
|
eps = w - e(i) + Om(m)
|
||||||
num = 2d0*rho(p,i,m)**2
|
num = 2d0*rho(p,i,m)**2
|
||||||
GW_dSigC = GW_dSigC - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
GW_dSigC = GW_dSigC - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
||||||
enddo
|
end do
|
||||||
enddo
|
end do
|
||||||
|
|
||||||
! Virtual part of the correlation self-energy
|
! Virtual part of the correlation self-energy
|
||||||
|
|
||||||
do a=nO+1,nBas-nR
|
do a=nO+1,nBas-nR
|
||||||
do m=1,nS
|
do m=1,nS
|
||||||
eps = w - e(a) - Om(m)
|
eps = w - e(a) - Om(m)
|
||||||
num = 2d0*rho(p,a,m)**2
|
num = 2d0*rho(p,a,m)**2
|
||||||
GW_dSigC = GW_dSigC - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
GW_dSigC = GW_dSigC - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
||||||
enddo
|
end do
|
||||||
enddo
|
end do
|
||||||
|
|
||||||
end function
|
end function
|
||||||
|
@ -147,9 +147,17 @@ subroutine UG0W0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,spin_cons
|
|||||||
|
|
||||||
! Find graphical solution of the QP equation
|
! Find graphical solution of the QP equation
|
||||||
|
|
||||||
|
write(*,*) ' *** Quasiparticle energies obtained by root search (experimental) *** '
|
||||||
|
write(*,*)
|
||||||
|
|
||||||
do is=1,nspin
|
do is=1,nspin
|
||||||
|
|
||||||
|
write(*,*)'-----------------------------------------------------'
|
||||||
|
if(is==1) write(*,*)' Spin-up orbitals '
|
||||||
|
if(is==2) write(*,*)' Spin-down orbitals '
|
||||||
|
|
||||||
call UGW_QP_graph(eta,nBas,nC(is),nO(is),nV(is),nR(is),nS_sc,eHF(:,is), &
|
call UGW_QP_graph(eta,nBas,nC(is),nO(is),nV(is),nR(is),nS_sc,eHF(:,is), &
|
||||||
Om,rho(:,:,:,is),eHF(:,is),eGW(:,is),Z(:,is))
|
Om,rho(:,:,:,is),eGWlin(:,is),eHF(:,is),eGW(:,is),Z(:,is))
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine UGW_QP_graph(eta,nBas,nC,nO,nV,nR,nS,eHF,Om,rho,eGWlin,eGW,Z)
|
subroutine UGW_QP_graph(eta,nBas,nC,nO,nV,nR,nS,eHF,Om,rho,eGWlin,eOld,eGW,Z)
|
||||||
|
|
||||||
! Compute the graphical solution of the QP equation
|
! Compute the graphical solution of the QP equation
|
||||||
|
|
||||||
@ -13,12 +13,14 @@ subroutine UGW_QP_graph(eta,nBas,nC,nO,nV,nR,nS,eHF,Om,rho,eGWlin,eGW,Z)
|
|||||||
integer,intent(in) :: nV
|
integer,intent(in) :: nV
|
||||||
integer,intent(in) :: nR
|
integer,intent(in) :: nR
|
||||||
integer,intent(in) :: nS
|
integer,intent(in) :: nS
|
||||||
|
|
||||||
double precision,intent(in) :: eta
|
double precision,intent(in) :: eta
|
||||||
double precision,intent(in) :: eHF(nBas)
|
double precision,intent(in) :: eHF(nBas)
|
||||||
double precision,intent(in) :: Om(nS)
|
double precision,intent(in) :: Om(nS)
|
||||||
double precision,intent(in) :: rho(nBas,nBas,nS,nspin)
|
double precision,intent(in) :: rho(nBas,nBas,nS,nspin)
|
||||||
|
|
||||||
double precision,intent(in) :: eGWlin(nBas)
|
double precision,intent(in) :: eGWlin(nBas)
|
||||||
|
double precision,intent(in) :: eOld(nBas)
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
@ -27,7 +29,7 @@ subroutine UGW_QP_graph(eta,nBas,nC,nO,nV,nR,nS,eHF,Om,rho,eGWlin,eGW,Z)
|
|||||||
integer,parameter :: maxIt = 64
|
integer,parameter :: maxIt = 64
|
||||||
double precision,parameter :: thresh = 1d-6
|
double precision,parameter :: thresh = 1d-6
|
||||||
double precision,external :: UGW_SigC,UGW_dSigC
|
double precision,external :: UGW_SigC,UGW_dSigC
|
||||||
double precision :: sigC,dsigC
|
double precision :: SigC,dSigC
|
||||||
double precision :: f,df
|
double precision :: f,df
|
||||||
double precision :: w
|
double precision :: w
|
||||||
|
|
||||||
@ -38,44 +40,40 @@ subroutine UGW_QP_graph(eta,nBas,nC,nO,nV,nR,nS,eHF,Om,rho,eGWlin,eGW,Z)
|
|||||||
|
|
||||||
! Run Newton's algorithm to find the root
|
! Run Newton's algorithm to find the root
|
||||||
|
|
||||||
do p=nC+1,nBas-nR
|
write(*,*)'-----------------------------------------------------'
|
||||||
|
write(*,'(A5,1X,A3,1X,A15,1X,A15,1X,A10)') 'Orb.','It.','e_GWlin (eV)','e_GW (eV)','Z'
|
||||||
|
write(*,*)'-----------------------------------------------------'
|
||||||
|
|
||||||
write(*,*) '-----------------'
|
do p=nC+1,nBas-nR
|
||||||
write(*,'(A10,I3)') 'Orbital ',p
|
|
||||||
write(*,*) '-----------------'
|
|
||||||
|
|
||||||
w = eGWlin(p)
|
w = eGWlin(p)
|
||||||
nIt = 0
|
nIt = 0
|
||||||
f = 1d0
|
f = 1d0
|
||||||
write(*,'(A3,I3,A1,1X,3F15.9)') 'It.',nIt,':',w*HaToeV,f
|
|
||||||
|
|
||||||
do while (abs(f) > thresh .and. nIt < maxIt)
|
do while (abs(f) > thresh .and. nIt < maxIt)
|
||||||
|
|
||||||
nIt = nIt + 1
|
nIt = nIt + 1
|
||||||
|
|
||||||
sigC = UGW_SigC(p,w,eta,nBas,nC,nO,nV,nR,nS,eGWlin,Om,rho)
|
SigC = UGW_SigC(p,w,eta,nBas,nC,nO,nV,nR,nS,eOld,Om,rho)
|
||||||
dsigC = UGW_dSigC(p,w,eta,nBas,nC,nO,nV,nR,nS,eGWlin,Om,rho)
|
dSigC = UGW_dSigC(p,w,eta,nBas,nC,nO,nV,nR,nS,eOld,Om,rho)
|
||||||
f = w - eHF(p) - sigC
|
f = w - eHF(p) - SigC
|
||||||
df = 1d0/(1d0 - dsigC)
|
df = 1d0/(1d0 - dSigC)
|
||||||
|
|
||||||
w = w - df*f
|
w = w - df*f
|
||||||
|
|
||||||
write(*,'(A3,I3,A1,1X,3F15.9)') 'It.',nIt,':',w*HaToeV,df,f
|
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
if(nIt == maxIt) then
|
if(nIt == maxIt) then
|
||||||
|
|
||||||
write(*,*) 'Newton root search has not converged!'
|
|
||||||
eGW(p) = eGWlin(p)
|
eGW(p) = eGWlin(p)
|
||||||
|
write(*,'(I5,1X,I3,1X,F15.9,1X,F15.9,1X,F10.6,1X,A12)') p,nIt,eGWlin(p)*HaToeV,eGW(p)*HaToeV,Z(p),'Cvg Failed!'
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
eGW(p) = w
|
eGW(p) = w
|
||||||
Z(p) = df
|
Z(p) = df
|
||||||
|
|
||||||
write(*,'(A32,F16.10)') 'Quasiparticle energy (eV) ',eGW(p)*HaToeV
|
write(*,'(I5,1X,I3,1X,F15.9,1X,F15.9,1X,F10.6)') p,nIt,eGWlin(p)*HaToeV,eGW(p)*HaToeV,Z(p)
|
||||||
write(*,*)
|
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ double precision function UGW_SigC(p,w,eta,nBas,nC,nO,nV,nR,nS,e,Om,rho)
|
|||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
integer :: i,a,jb
|
integer :: i,a,m
|
||||||
double precision :: num,eps
|
double precision :: num,eps
|
||||||
|
|
||||||
! Initialize
|
! Initialize
|
||||||
@ -32,9 +32,9 @@ double precision function UGW_SigC(p,w,eta,nBas,nC,nO,nV,nR,nS,e,Om,rho)
|
|||||||
! Occupied part of the correlation self-energy
|
! Occupied part of the correlation self-energy
|
||||||
|
|
||||||
do i=nC+1,nO
|
do i=nC+1,nO
|
||||||
do jb=1,nS
|
do m=1,nS
|
||||||
eps = w - e(i) + Om(jb)
|
eps = w - e(i) + Om(m)
|
||||||
num = rho(p,i,jb)**2
|
num = rho(p,i,m)**2
|
||||||
UGW_SigC = UGW_SigC + num*eps/(eps**2 + eta**2)
|
UGW_SigC = UGW_SigC + num*eps/(eps**2 + eta**2)
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
@ -42,9 +42,9 @@ double precision function UGW_SigC(p,w,eta,nBas,nC,nO,nV,nR,nS,e,Om,rho)
|
|||||||
! Virtual part of the correlation self-energy
|
! Virtual part of the correlation self-energy
|
||||||
|
|
||||||
do a=nO+1,nBas-nR
|
do a=nO+1,nBas-nR
|
||||||
do jb=1,nS
|
do m=1,nS
|
||||||
eps = w - e(a) - Om(jb)
|
eps = w - e(a) - Om(m)
|
||||||
num = rho(p,a,jb)**2
|
num = rho(p,a,m)**2
|
||||||
UGW_SigC = UGW_SigC + num*eps/(eps**2 + eta**2)
|
UGW_SigC = UGW_SigC + num*eps/(eps**2 + eta**2)
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
@ -22,7 +22,7 @@ double precision function UGW_dSigC(p,w,eta,nBas,nC,nO,nV,nR,nS,e,Om,rho)
|
|||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
integer :: i,a,jb
|
integer :: i,a,m
|
||||||
double precision :: num,eps
|
double precision :: num,eps
|
||||||
|
|
||||||
! Initialize
|
! Initialize
|
||||||
@ -32,20 +32,20 @@ double precision function UGW_dSigC(p,w,eta,nBas,nC,nO,nV,nR,nS,e,Om,rho)
|
|||||||
! Occupied part of the correlation self-energy
|
! Occupied part of the correlation self-energy
|
||||||
|
|
||||||
do i=nC+1,nO
|
do i=nC+1,nO
|
||||||
do jb=1,nS
|
do m=1,nS
|
||||||
eps = w - e(i) + Om(jb)
|
eps = w - e(i) + Om(m)
|
||||||
num = rho(p,i,jb)**2
|
num = rho(p,i,m)**2
|
||||||
UGW_dSigC = UGW_dSigC + num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
UGW_dSigC = UGW_dSigC - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
|
||||||
! Virtual part of the correlation self-energy
|
! Virtual part of the correlation self-energy
|
||||||
|
|
||||||
do a=nO+1,nBas-nR
|
do a=nO+1,nBas-nR
|
||||||
do jb=1,nS
|
do m=1,nS
|
||||||
eps = w - e(a) - Om(jb)
|
eps = w - e(a) - Om(m)
|
||||||
num = rho(p,a,jb)**2
|
num = rho(p,a,m)**2
|
||||||
UGW_dSigC = UGW_dSigC + num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
UGW_dSigC = UGW_dSigC - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
@ -166,8 +166,13 @@ subroutine evUGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,
|
|||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
do is=1,nspin
|
do is=1,nspin
|
||||||
|
|
||||||
|
write(*,*)'-----------------------------------------------------'
|
||||||
|
if(is==1) write(*,*)' Spin-up orbitals '
|
||||||
|
if(is==2) write(*,*)' Spin-down orbitals '
|
||||||
|
|
||||||
call UGW_QP_graph(eta,nBas,nC(is),nO(is),nV(is),nR(is),nS_sc,eHF(:,is), &
|
call UGW_QP_graph(eta,nBas,nC(is),nO(is),nV(is),nR(is),nS_sc,eHF(:,is), &
|
||||||
Om,rho(:,:,:,is),eOld(:,is),eGW(:,is),Z(:,is))
|
Om,rho(:,:,:,is),eOld(:,is),eOld(:,is),eGW(:,is),Z(:,is))
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
Loading…
Reference in New Issue
Block a user