4
1
mirror of https://github.com/pfloos/quack synced 2024-12-22 12:23:50 +01:00

implementation of BSE2@GW

This commit is contained in:
Pierre-Francois Loos 2022-11-28 15:05:29 +01:00
parent 5a561e0ed9
commit d2082f55f8
5 changed files with 26 additions and 133 deletions

View File

@ -7,15 +7,15 @@
# drCCD rCCD crCCD lCCD # drCCD rCCD crCCD lCCD
F F F F F F F F
# CIS* CIS(D) CID CISD FCI # CIS* CIS(D) CID CISD FCI
F F F F F T F F F F
# RPA* RPAx* crRPA ppRPA # RPA* RPAx* crRPA ppRPA
F F F F F T F F
# G0F2* evGF2* qsGF2* G0F3 evGF3 # G0F2* evGF2* qsGF2* G0F3 evGF3
F F F F F F F F F F
# G0W0* evGW* qsGW* ufG0W0 ufGW # G0W0* evGW* qsGW* ufG0W0 ufGW
T F F F F T F F F F
# G0T0 evGT qsGT # G0T0 evGT qsGT
T F F F F F
# MCMP2 # MCMP2
F F
# * unrestricted version available # * unrestricted version available

View File

@ -14,7 +14,7 @@
10 0.00001 T 5 T 0.0 F F 10 0.00001 T 5 T 0.0 F F
# ACFDT: AC Kx XBS # ACFDT: AC Kx XBS
F T T F T T
# BSE: BSE dBSE dTDA evDyn ppBSE # BSE: BSE dBSE dTDA evDyn ppBSE BSE2
F F T F F T F T F F T
# MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift # MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift
1000000 100000 10 0.3 10000 1234 T 1000000 100000 10 0.3 10000 1234 T

View File

@ -1,4 +1,4 @@
2 2
H 0. 0. 0. H 0. 0. 0.
H 0. 0. 0.7 H 0. 0. 0.740848

View File

@ -1,123 +0,0 @@
subroutine BSE2_static_kernel(eta,nBas,nC,nO,nV,nR,nS,lambda,eW,ERI,Om,rho,A_sta)
! Compute the second-order static BSE kernel (only for singlets!)
implicit none
include 'parameters.h'
! Input variables
double precision,intent(in) :: eta
integer,intent(in) :: nBas
integer,intent(in) :: nC
integer,intent(in) :: nO
integer,intent(in) :: nV
integer,intent(in) :: nR
integer,intent(in) :: nS
double precision,intent(in) :: lambda
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
double precision,intent(in) :: eW(nBas)
double precision,intent(in) :: Om(nS)
double precision,intent(in) :: rho(nBas,nBas,nS)
! Local variables
double precision :: chi
integer :: p,q,r,s
integer :: m
double precision :: dem,num
integer :: i,j,k,l
integer :: a,b,c,d
integer :: ia,jb
double precision,allocatable :: W(:,:,:,:)
! Output variables
double precision,intent(inout) :: A_sta(nS,nS)
! memory allocation
allocate(W(nBas,nBas,nBas,nBas))
!------------------------------------------------
! Compute static screening (physicist's notation)
!------------------------------------------------
do p=1,nBas
do q=1,nBas
do r=1,nBas
do s=1,nBas
chi = 0d0
do m=1,nS
dem = Om(m)**2 + eta**2
chi = chi + rho(p,q,m)*rho(r,s,m)*Om(m)/dem
enddo
W(p,s,q,r) = - ERI(p,s,q,r) + 4d0*chi
enddo
enddo
enddo
enddo
ia = 0
do i=nC+1,nO
do a=nO+1,nBas-nR
ia = ia + 1
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
do k=nC+1,nO
do c=nO+1,nBas-nR
dem = - (eW(c) - eW(k))
num = 2d0*W(j,k,i,c)*W(a,c,b,k)
A_sta(ia,jb) = A_sta(ia,jb) - num*dem/(dem**2 + eta**2)
dem = + (eW(c) - eW(k))
num = 2d0*W(j,c,i,k)*W(a,k,b,c)
A_sta(ia,jb) = A_sta(ia,jb) + num*dem/(dem**2 + eta**2)
end do
end do
do c=nO+1,nBas-nR
do d=nO+1,nBas-nR
dem = - (eW(c) + eW(d))
num = 2d0*W(a,j,c,d)*W(c,d,i,b)
A_sta(ia,jb) = A_sta(ia,jb) + num*dem/(dem**2 + eta**2)
end do
end do
do k=nC+1,nO
do l=nC+1,nO
dem = - (eW(k) + eW(l))
num = 2d0*W(a,j,k,l)*W(k,l,i,b)
A_sta(ia,jb) = A_sta(ia,jb) - num*dem/(dem**2 + eta**2)
end do
end do
end do
end do
end do
end do
end subroutine BSE2_static_kernel

View File

@ -46,6 +46,10 @@ subroutine Bethe_Salpeter(BSE2,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBa
double precision,allocatable :: KA_sta(:,:) double precision,allocatable :: KA_sta(:,:)
double precision,allocatable :: KB_sta(:,:) double precision,allocatable :: KB_sta(:,:)
double precision,allocatable :: W(:,:,:,:)
double precision,allocatable :: KA2_sta(:,:)
double precision,allocatable :: KB2_sta(:,:)
! Output variables ! Output variables
double precision,intent(out) :: EcBSE(nspin) double precision,intent(out) :: EcBSE(nspin)
@ -78,13 +82,25 @@ subroutine Bethe_Salpeter(BSE2,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBa
ispin = 1 ispin = 1
EcBSE(ispin) = 0d0 EcBSE(ispin) = 0d0
! Second-order BSE staic kernel ! Second-order BSE static kernel
if(BSE2) call BSE2_static_kernel(eta,nBas,nC,nO,nV,nR,nS,1d0,eW,ERI,OmRPA,rho_RPA,KA_sta)
allocate(W(nBas,nBas,nBas,nBas),KA2_sta(nS,nS),KB2_sta(nS,nS))
KA2_sta(:,:) = 0d0
KB2_sta(:,:) = 0d0
if(BSE2) then
write(*,*) '*** Second-order BSE static kernel activated! ***'
call static_kernel_W(eta,nBas,nC,nO,nV,nR,nS,1d0,ERI,OmRPA,rho_RPA,W)
call BSE2_static_kernel_KA(eta,nBas,nC,nO,nV,nR,nS,1d0,eW,W,KA2_sta)
if(.not.TDA) call BSE2_static_kernel_KB(eta,nBas,nC,nO,nV,nR,nS,1d0,eW,W,KB2_sta)
end if
! Compute BSE excitation energies ! Compute BSE excitation energies
call linear_response_BSE(ispin,.true.,TDA,.true.,eta,nBas,nC,nO,nV,nR,nS,1d0,eGW,ERI,KA_sta,KB_sta, & call linear_response_BSE(ispin,.true.,TDA,.true.,eta,nBas,nC,nO,nV,nR,nS,1d0,eGW,ERI,KA_sta-KA2_sta,KB_sta-KB2_sta, &
EcBSE(ispin),OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin)) EcBSE(ispin),OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin))
call print_excitation('BSE@GW ',ispin,nS,OmBSE(:,ispin)) call print_excitation('BSE@GW ',ispin,nS,OmBSE(:,ispin))
call print_transition_vectors(.true.,nBas,nC,nO,nV,nR,nS,dipole_int, & call print_transition_vectors(.true.,nBas,nC,nO,nV,nR,nS,dipole_int, &