mirror of
https://github.com/pfloos/quack
synced 2025-01-09 20:48:51 +01:00
fix bug in dBSE@GW
This commit is contained in:
parent
6c4d0c7544
commit
d8678bfe4f
@ -5,7 +5,7 @@
|
|||||||
# CC: maxSCF thresh DIIS n_diis
|
# CC: maxSCF thresh DIIS n_diis
|
||||||
64 0.0000001 T 5
|
64 0.0000001 T 5
|
||||||
# spin: TDA singlet triplet spin_conserved spin_flip
|
# spin: TDA singlet triplet spin_conserved spin_flip
|
||||||
F T T T T
|
F T F T T
|
||||||
# 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 COHSEX TDA_W reg
|
# GW: maxSCF thresh DIIS n_diis lin eta COHSEX TDA_W reg
|
||||||
@ -15,4 +15,4 @@
|
|||||||
# ACFDT: AC Kx XBS
|
# ACFDT: AC Kx XBS
|
||||||
F F T
|
F F T
|
||||||
# BSE: phBSE phBSE2 ppBSE dBSE dTDA
|
# BSE: phBSE phBSE2 ppBSE dBSE dTDA
|
||||||
T T T T F
|
T F F T T
|
||||||
|
@ -183,6 +183,7 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,dophBSE,dophBSE2,TDA_W,TDA,dBSE,dT
|
|||||||
|
|
||||||
call GW_phBSE(dophBSE2,TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int,eHF,eGW,EcBSE)
|
call GW_phBSE(dophBSE2,TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int,eHF,eGW,EcBSE)
|
||||||
|
|
||||||
|
|
||||||
if(exchange_kernel) then
|
if(exchange_kernel) then
|
||||||
|
|
||||||
EcBSE(1) = 0.5d0*EcBSE(1)
|
EcBSE(1) = 0.5d0*EcBSE(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine GW_phBSE(BSE2,TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI,dipole_int,eW,eGW,EcBSE)
|
subroutine GW_phBSE(dophBSE2,TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI,dipole_int,eW,eGW,EcBSE)
|
||||||
|
|
||||||
! Compute the Bethe-Salpeter excitation energies
|
! Compute the Bethe-Salpeter excitation energies
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ subroutine GW_phBSE(BSE2,TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nBas,nC,nO,nV,n
|
|||||||
|
|
||||||
! Input variables
|
! Input variables
|
||||||
|
|
||||||
logical,intent(in) :: BSE2
|
logical,intent(in) :: dophBSE2
|
||||||
logical,intent(in) :: TDA_W
|
logical,intent(in) :: TDA_W
|
||||||
logical,intent(in) :: TDA
|
logical,intent(in) :: TDA
|
||||||
logical,intent(in) :: dBSE
|
logical,intent(in) :: dBSE
|
||||||
@ -95,7 +95,7 @@ subroutine GW_phBSE(BSE2,TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nBas,nC,nO,nV,n
|
|||||||
|
|
||||||
! Second-order BSE static kernel
|
! Second-order BSE static kernel
|
||||||
|
|
||||||
if(BSE2) then
|
if(dophBSE2) then
|
||||||
|
|
||||||
allocate(W(nBas,nBas,nBas,nBas))
|
allocate(W(nBas,nBas,nBas,nBas))
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ subroutine GW_phBSE(BSE2,TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nBas,nC,nO,nV,n
|
|||||||
!-------------------------------------------------
|
!-------------------------------------------------
|
||||||
|
|
||||||
if(dBSE) &
|
if(dBSE) &
|
||||||
call GW_phBSE_dynamic_perturbation(BSE2,dTDA,eta,nBas,nC,nO,nV,nR,nS,eW,eGW,ERI,dipole_int,OmRPA,rho_RPA, &
|
call GW_phBSE_dynamic_perturbation(dophBSE2,dTDA,eta,nBas,nC,nO,nV,nR,nS,eW,eGW,ERI,dipole_int,OmRPA,rho_RPA, &
|
||||||
OmBSE,XpY_BSE,XmY_BSE,KA_sta,KB_sta)
|
OmBSE,XpY_BSE,XmY_BSE,KA_sta,KB_sta)
|
||||||
|
|
||||||
end if
|
end if
|
||||||
@ -157,7 +157,7 @@ subroutine GW_phBSE(BSE2,TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nBas,nC,nO,nV,n
|
|||||||
!-------------------------------------------------
|
!-------------------------------------------------
|
||||||
|
|
||||||
if(dBSE) &
|
if(dBSE) &
|
||||||
call GW_phBSE_dynamic_perturbation(BSE2,dTDA,eta,nBas,nC,nO,nV,nR,nS,eW,eGW,ERI,dipole_int,OmRPA,rho_RPA, &
|
call GW_phBSE_dynamic_perturbation(dophBSE2,dTDA,eta,nBas,nC,nO,nV,nR,nS,eW,eGW,ERI,dipole_int,OmRPA,rho_RPA, &
|
||||||
OmBSE,XpY_BSE,XmY_BSE,KA_sta,KB_sta)
|
OmBSE,XpY_BSE,XmY_BSE,KA_sta,KB_sta)
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine GW_phBSE_dynamic_kernel_A(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,OmRPA,rho_RPA,OmBSE,A_dyn,ZA_dyn)
|
subroutine GW_phBSE_dynamic_kernel_A(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,OmRPA,rho_RPA,OmBSE,KA_dyn,ZA_dyn)
|
||||||
|
|
||||||
! Compute the dynamic part of the Bethe-Salpeter equation matrices
|
! Compute the dynamic part of the Bethe-Salpeter equation matrices
|
||||||
|
|
||||||
@ -23,18 +23,18 @@ subroutine GW_phBSE_dynamic_kernel_A(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,OmRPA,rh
|
|||||||
|
|
||||||
! Output variables
|
! Output variables
|
||||||
|
|
||||||
double precision,intent(out) :: A_dyn(nS,nS)
|
double precision,intent(out) :: KA_dyn(nS,nS)
|
||||||
double precision,intent(out) :: ZA_dyn(nS,nS)
|
double precision,intent(out) :: ZA_dyn(nS,nS)
|
||||||
|
|
||||||
! Initialization
|
! Initialization
|
||||||
|
|
||||||
A_dyn(:,:) = 0d0
|
KA_dyn(:,:) = 0d0
|
||||||
ZA_dyn(:,:) = 0d0
|
ZA_dyn(:,:) = 0d0
|
||||||
|
|
||||||
! Build dynamic A matrix
|
! Build dynamic A matrix
|
||||||
|
|
||||||
jb = 0
|
jb = 0
|
||||||
!$omp parallel do default(private) shared(A_dyn,ZA_dyn,OmRPA,OmBSE,eGW,rho_RPA,nO,nBas,nS,chi,eps,eta,nC,nR,lambda)
|
!$omp parallel do default(private) shared(KA_dyn,ZA_dyn,OmRPA,OmBSE,eGW,rho_RPA,nO,nBas,nS,chi,eps,eta,nC,nR,lambda)
|
||||||
do j=nC+1,nO
|
do j=nC+1,nO
|
||||||
do b=nO+1,nBas-nR
|
do b=nO+1,nBas-nR
|
||||||
jb = (b-nO) + (j-1)*(nBas-nO)
|
jb = (b-nO) + (j-1)*(nBas-nO)
|
||||||
@ -45,16 +45,6 @@ subroutine GW_phBSE_dynamic_kernel_A(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,OmRPA,rh
|
|||||||
ia = (a-nO) + (i-1)*(nBas-nO)
|
ia = (a-nO) + (i-1)*(nBas-nO)
|
||||||
|
|
||||||
chi = 0d0
|
chi = 0d0
|
||||||
|
|
||||||
do kc=1,nS
|
|
||||||
eps = OmRPA(kc)
|
|
||||||
chi = chi + rho_RPA(i,j,kc)*rho_RPA(a,b,kc)*eps/(eps**2 + eta**2)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
A_dyn(ia,jb) = A_dyn(ia,jb) - 4d0*lambda*chi
|
|
||||||
|
|
||||||
chi = 0d0
|
|
||||||
|
|
||||||
do kc=1,nS
|
do kc=1,nS
|
||||||
|
|
||||||
eps = + OmBSE - OmRPA(kc) - (eGW(a) - eGW(j))
|
eps = + OmBSE - OmRPA(kc) - (eGW(a) - eGW(j))
|
||||||
@ -65,7 +55,7 @@ subroutine GW_phBSE_dynamic_kernel_A(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,OmRPA,rh
|
|||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
A_dyn(ia,jb) = A_dyn(ia,jb) - 2d0*lambda*chi
|
KA_dyn(ia,jb) = KA_dyn(ia,jb) - 2d0*lambda*chi
|
||||||
|
|
||||||
chi = 0d0
|
chi = 0d0
|
||||||
do kc=1,nS
|
do kc=1,nS
|
||||||
|
@ -145,7 +145,7 @@ program QuAcK
|
|||||||
maxSCF_GW,thresh_GW,DIIS_GW,n_diis_GW,linGW,eta_GW,regGW,COHSEX,TDA_W, &
|
maxSCF_GW,thresh_GW,DIIS_GW,n_diis_GW,linGW,eta_GW,regGW,COHSEX,TDA_W, &
|
||||||
maxSCF_GT,thresh_GT,DIIS_GT,n_diis_GT,linGT,eta_GT,regGT,TDA_T, &
|
maxSCF_GT,thresh_GT,DIIS_GT,n_diis_GT,linGT,eta_GT,regGT,TDA_T, &
|
||||||
doACFDT,exchange_kernel,doXBS, &
|
doACFDT,exchange_kernel,doXBS, &
|
||||||
dophBSE,dBSE,dTDA,doppBSE,dophBSE2)
|
dophBSE,dophBSE2,doppBSE,dBSE,dTDA)
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Read input information
|
! Read input information
|
||||||
|
Loading…
Reference in New Issue
Block a user