mirror of
https://github.com/pfloos/quack
synced 2024-12-23 12:55:25 +01:00
T-matrix with KS starting point
This commit is contained in:
parent
144b5904cb
commit
a2155a4ae6
@ -1,5 +1,5 @@
|
|||||||
subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet, &
|
subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet, &
|
||||||
linearize,eta,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,dipole_int,eHF,eG0T0)
|
linearize,eta,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eG0T0)
|
||||||
|
|
||||||
! Perform one-shot calculation with a T-matrix self-energy (G0T0)
|
! Perform one-shot calculation with a T-matrix self-energy (G0T0)
|
||||||
|
|
||||||
@ -30,8 +30,12 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
integer,intent(in) :: nS
|
integer,intent(in) :: nS
|
||||||
double precision,intent(in) :: ENuc
|
double precision,intent(in) :: ENuc
|
||||||
double precision,intent(in) :: ERHF
|
double precision,intent(in) :: ERHF
|
||||||
|
double precision,intent(in) :: Vxc(nBas)
|
||||||
double precision,intent(in) :: eHF(nBas)
|
double precision,intent(in) :: eHF(nBas)
|
||||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
double precision,intent(in) :: cHF(nBas,nBas)
|
||||||
|
double precision,intent(in) :: PHF(nBas,nBas)
|
||||||
|
double precision,intent(in) :: ERI_AO(nBas,nBas,nBas,nBas)
|
||||||
|
double precision,intent(in) :: ERI_MO(nBas,nBas,nBas,nBas)
|
||||||
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
@ -54,6 +58,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
double precision,allocatable :: X2s(:,:),X2t(:,:)
|
double precision,allocatable :: X2s(:,:),X2t(:,:)
|
||||||
double precision,allocatable :: Y2s(:,:),Y2t(:,:)
|
double precision,allocatable :: Y2s(:,:),Y2t(:,:)
|
||||||
double precision,allocatable :: rho2s(:,:,:),rho2t(:,:,:)
|
double precision,allocatable :: rho2s(:,:,:),rho2t(:,:,:)
|
||||||
|
double precision,allocatable :: SigX(:)
|
||||||
double precision,allocatable :: SigT(:)
|
double precision,allocatable :: SigT(:)
|
||||||
double precision,allocatable :: Z(:)
|
double precision,allocatable :: Z(:)
|
||||||
|
|
||||||
@ -90,7 +95,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
Omega1t(nVVt),X1t(nVVt,nVVt),Y1t(nOOt,nVVt), &
|
Omega1t(nVVt),X1t(nVVt,nVVt),Y1t(nOOt,nVVt), &
|
||||||
Omega2t(nOOt),X2t(nVVt,nOOt),Y2t(nOOt,nOOt), &
|
Omega2t(nOOt),X2t(nVVt,nOOt),Y2t(nOOt,nOOt), &
|
||||||
rho1t(nBas,nO,nVVt),rho2t(nBas,nV,nOOt), &
|
rho1t(nBas,nO,nVVt),rho2t(nBas,nV,nOOt), &
|
||||||
SigT(nBas),Z(nBas))
|
SigX(nBas),SigT(nBas),Z(nBas))
|
||||||
|
|
||||||
!----------------------------------------------
|
!----------------------------------------------
|
||||||
! alpha-beta block
|
! alpha-beta block
|
||||||
@ -101,7 +106,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
|
|
||||||
! Compute linear response
|
! Compute linear response
|
||||||
|
|
||||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:),ERI(:,:,:,:), &
|
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:),ERI_MO(:,:,:,:), &
|
||||||
Omega1s(:),X1s(:,:),Y1s(:,:),Omega2s(:),X2s(:,:),Y2s(:,:),EcRPA(ispin))
|
Omega1s(:),X1s(:,:),Y1s(:,:),Omega2s(:),X2s(:,:),Y2s(:,:),EcRPA(ispin))
|
||||||
|
|
||||||
! EcRPA(ispin) = 1d0*EcRPA(ispin)
|
! EcRPA(ispin) = 1d0*EcRPA(ispin)
|
||||||
@ -118,7 +123,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
|
|
||||||
! Compute linear response
|
! Compute linear response
|
||||||
|
|
||||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:),ERI(:,:,:,:), &
|
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:),ERI_MO(:,:,:,:), &
|
||||||
Omega1t(:),X1t(:,:),Y1t(:,:),Omega2t(:),X2t(:,:),Y2t(:,:),EcRPA(ispin))
|
Omega1t(:),X1t(:,:),Y1t(:,:),Omega2t(:),X2t(:,:),Y2t(:,:),EcRPA(ispin))
|
||||||
|
|
||||||
! EcRPA(ispin) = 2d0*EcRPA(ispin)
|
! EcRPA(ispin) = 2d0*EcRPA(ispin)
|
||||||
@ -139,7 +144,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
xERI = +0d0
|
xERI = +0d0
|
||||||
alpha = +1d0
|
alpha = +1d0
|
||||||
|
|
||||||
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI(:,:,:,:), &
|
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI_MO(:,:,:,:), &
|
||||||
X1s(:,:),Y1s(:,:),rho1s(:,:,:),X2s(:,:),Y2s(:,:),rho2s(:,:,:))
|
X1s(:,:),Y1s(:,:),rho1s(:,:,:),X2s(:,:),Y2s(:,:),rho2s(:,:,:))
|
||||||
|
|
||||||
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:), &
|
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:), &
|
||||||
@ -153,7 +158,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
xERI = -1d0
|
xERI = -1d0
|
||||||
alpha = +1d0
|
alpha = +1d0
|
||||||
|
|
||||||
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI(:,:,:,:), &
|
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI_MO(:,:,:,:), &
|
||||||
X1t(:,:),Y1t(:,:),rho1t(:,:,:),X2t(:,:),Y2t(:,:),rho2t(:,:,:))
|
X1t(:,:),Y1t(:,:),rho1t(:,:,:),X2t(:,:),Y2t(:,:),rho2t(:,:,:))
|
||||||
|
|
||||||
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:), &
|
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:), &
|
||||||
@ -164,17 +169,24 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
|
|
||||||
Z(:) = 1d0/(1d0 - Z(:))
|
Z(:) = 1d0/(1d0 - Z(:))
|
||||||
|
|
||||||
|
|
||||||
|
!----------------------------------------------
|
||||||
|
! Compute the exchange part of the self-energy
|
||||||
|
!----------------------------------------------
|
||||||
|
|
||||||
|
call self_energy_exchange_diag(nBas,cHF,PHF,ERI_AO,SigX)
|
||||||
|
|
||||||
!----------------------------------------------
|
!----------------------------------------------
|
||||||
! Solve the quasi-particle equation
|
! Solve the quasi-particle equation
|
||||||
!----------------------------------------------
|
!----------------------------------------------
|
||||||
|
|
||||||
if(linearize) then
|
if(linearize) then
|
||||||
|
|
||||||
eG0T0(:) = eHF(:) + Z(:)*SigT(:)
|
eG0T0(:) = eHF(:) + Z(:)*(SigX(:) + SigT(:) - Vxc(:))
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
eG0T0(:) = eHF(:) + SigT(:)
|
eG0T0(:) = eHF(:) + SigX(:) + SigT(:) - Vxc(:)
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@ -188,11 +200,11 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
|
|
||||||
ispin = 1
|
ispin = 1
|
||||||
iblock = 3
|
iblock = 3
|
||||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eG0T0(:),ERI(:,:,:,:), &
|
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eG0T0(:),ERI_MO(:,:,:,:), &
|
||||||
Omega1s(:),X1s(:,:),Y1s(:,:),Omega2s(:),X2s(:,:),Y2s(:,:),EcRPA(ispin))
|
Omega1s(:),X1s(:,:),Y1s(:,:),Omega2s(:),X2s(:,:),Y2s(:,:),EcRPA(ispin))
|
||||||
ispin = 2
|
ispin = 2
|
||||||
iblock = 4
|
iblock = 4
|
||||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eG0T0(:),ERI(:,:,:,:), &
|
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eG0T0(:),ERI_MO(:,:,:,:), &
|
||||||
Omega1t(:),X1t(:,:),Y1t(:,:),Omega2t(:),X2t(:,:),Y2t(:,:),EcRPA(ispin))
|
Omega1t(:),X1t(:,:),Y1t(:,:),Omega2t(:),X2t(:,:),Y2t(:,:),EcRPA(ispin))
|
||||||
EcRPA(1) = EcRPA(1) - EcRPA(2)
|
EcRPA(1) = EcRPA(1) - EcRPA(2)
|
||||||
EcRPA(2) = 3d0*EcRPA(2)
|
EcRPA(2) = 3d0*EcRPA(2)
|
||||||
@ -211,7 +223,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
if(BSE) then
|
if(BSE) then
|
||||||
|
|
||||||
call Bethe_Salpeter(TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta, &
|
call Bethe_Salpeter(TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta, &
|
||||||
nBas,nC,nO,nV,nR,nS,ERI,dipole_int,eHF,eG0T0,EcBSE)
|
nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int,eHF,eG0T0,EcBSE)
|
||||||
|
|
||||||
if(exchange_kernel) then
|
if(exchange_kernel) then
|
||||||
|
|
||||||
@ -246,7 +258,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
call ACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,BSE,singlet,triplet,eta, &
|
call ACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,BSE,singlet,triplet,eta, &
|
||||||
nBas,nC,nO,nV,nR,nS,ERI,eHF,eG0T0,EcAC)
|
nBas,nC,nO,nV,nR,nS,ERI_MO,eHF,eG0T0,EcAC)
|
||||||
|
|
||||||
if(exchange_kernel) then
|
if(exchange_kernel) then
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
||||||
dBSE,dTDA,evDyn,singlet,triplet,linearize,eta, &
|
dBSE,dTDA,evDyn,singlet,triplet,linearize,eta, &
|
||||||
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eGW)
|
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eG0W0)
|
||||||
|
|
||||||
! Perform G0W0 calculation
|
! Perform G0W0 calculation
|
||||||
|
|
||||||
@ -53,11 +53,11 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
|||||||
double precision,allocatable :: XmY_RPA(:,:)
|
double precision,allocatable :: XmY_RPA(:,:)
|
||||||
double precision,allocatable :: rho_RPA(:,:,:)
|
double precision,allocatable :: rho_RPA(:,:,:)
|
||||||
|
|
||||||
double precision,allocatable :: eGWlin(:)
|
double precision,allocatable :: eG0W0lin(:)
|
||||||
|
|
||||||
! Output variables
|
! Output variables
|
||||||
|
|
||||||
double precision :: eGW(nBas)
|
double precision :: eG0W0(nBas)
|
||||||
|
|
||||||
! Hello world
|
! Hello world
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
|||||||
|
|
||||||
! Memory allocation
|
! Memory allocation
|
||||||
|
|
||||||
allocate(SigC(nBas),SigX(nBas),Z(nBas),OmRPA(nS),XpY_RPA(nS,nS),XmY_RPA(nS,nS),rho_RPA(nBas,nBas,nS),eGWlin(nBas))
|
allocate(SigC(nBas),SigX(nBas),Z(nBas),OmRPA(nS),XpY_RPA(nS,nS),XmY_RPA(nS,nS),rho_RPA(nBas,nBas,nS),eG0W0lin(nBas))
|
||||||
|
|
||||||
!-------------------!
|
!-------------------!
|
||||||
! Compute screening !
|
! Compute screening !
|
||||||
@ -139,7 +139,7 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
|||||||
! Solve the quasi-particle equation !
|
! Solve the quasi-particle equation !
|
||||||
!-----------------------------------!
|
!-----------------------------------!
|
||||||
|
|
||||||
eGWlin(:) = eHF(:) + Z(:)*(SigX(:) + SigC(:) - Vxc(:))
|
eG0W0lin(:) = eHF(:) + Z(:)*(SigX(:) + SigC(:) - Vxc(:))
|
||||||
|
|
||||||
! Linearized or graphical solution?
|
! Linearized or graphical solution?
|
||||||
|
|
||||||
@ -148,14 +148,14 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
|||||||
write(*,*) ' *** Quasiparticle energies obtained by linearization *** '
|
write(*,*) ' *** Quasiparticle energies obtained by linearization *** '
|
||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
eGW(:) = eGWlin(:)
|
eG0W0(:) = eG0W0lin(:)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
write(*,*) ' *** Quasiparticle energies obtained by root search (experimental) *** '
|
write(*,*) ' *** Quasiparticle energies obtained by root search (experimental) *** '
|
||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
call QP_graph(nBas,nC,nO,nV,nR,nS,eta,eHF,OmRPA,rho_RPA,eGWlin,eGW)
|
call QP_graph(nBas,nC,nO,nV,nR,nS,eta,eHF,OmRPA,rho_RPA,eG0W0lin,eG0W0)
|
||||||
|
|
||||||
! Find all the roots of the QP equation if necessary
|
! Find all the roots of the QP equation if necessary
|
||||||
|
|
||||||
@ -165,18 +165,18 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
|||||||
|
|
||||||
! Compute the RPA correlation energy
|
! Compute the RPA correlation energy
|
||||||
|
|
||||||
call linear_response(ispin,.true.,TDA_W,.false.,eta,nBas,nC,nO,nV,nR,nS,1d0,eGW,ERI_MO,OmRPA, &
|
call linear_response(ispin,.true.,TDA_W,.false.,eta,nBas,nC,nO,nV,nR,nS,1d0,eG0W0,ERI_MO,OmRPA, &
|
||||||
rho_RPA,EcRPA,OmRPA,XpY_RPA,XmY_RPA)
|
rho_RPA,EcRPA,OmRPA,XpY_RPA,XmY_RPA)
|
||||||
|
|
||||||
!--------------!
|
!--------------!
|
||||||
! Dump results !
|
! Dump results !
|
||||||
!--------------!
|
!--------------!
|
||||||
|
|
||||||
call print_G0W0(nBas,nO,eHF,ENuc,ERHF,SigC,Z,eGW,EcRPA,EcGM)
|
call print_G0W0(nBas,nO,eHF,ENuc,ERHF,SigC,Z,eG0W0,EcRPA,EcGM)
|
||||||
|
|
||||||
! Deallocate memory
|
! Deallocate memory
|
||||||
|
|
||||||
deallocate(SigC,Z,OmRPA,XpY_RPA,XmY_RPA,rho_RPA,eGWlin)
|
deallocate(SigC,Z,OmRPA,XpY_RPA,XmY_RPA,rho_RPA,eG0W0lin)
|
||||||
|
|
||||||
! Plot stuff
|
! Plot stuff
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
|||||||
|
|
||||||
if(BSE) then
|
if(BSE) then
|
||||||
|
|
||||||
call Bethe_Salpeter(TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int,eHF,eGW,EcBSE)
|
call Bethe_Salpeter(TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int,eHF,eG0W0,EcBSE)
|
||||||
|
|
||||||
if(exchange_kernel) then
|
if(exchange_kernel) then
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA, &
|
|||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
call ACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,BSE,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,eHF,eGW,EcAC)
|
call ACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,BSE,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,eHF,eG0W0,EcAC)
|
||||||
|
|
||||||
write(*,*)
|
write(*,*)
|
||||||
write(*,*)'-------------------------------------------------------------------------------'
|
write(*,*)'-------------------------------------------------------------------------------'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
||||||
BSE,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet, &
|
BSE,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas, &
|
||||||
eta,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,dipole_int,eHF,eG0T0)
|
nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eG0T0)
|
||||||
|
|
||||||
! Perform eigenvalue self-consistent calculation with a T-matrix self-energy (evGT)
|
! Perform eigenvalue self-consistent calculation with a T-matrix self-energy (evGT)
|
||||||
|
|
||||||
@ -33,8 +33,12 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
integer,intent(in) :: nS
|
integer,intent(in) :: nS
|
||||||
double precision,intent(in) :: ENuc
|
double precision,intent(in) :: ENuc
|
||||||
double precision,intent(in) :: ERHF
|
double precision,intent(in) :: ERHF
|
||||||
|
double precision,intent(in) :: PHF(nBas,nBas)
|
||||||
double precision,intent(in) :: eHF(nBas)
|
double precision,intent(in) :: eHF(nBas)
|
||||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
double precision,intent(in) :: cHF(nBas,nBas)
|
||||||
|
double precision,intent(in) :: Vxc(nBas)
|
||||||
|
double precision,intent(in) :: ERI_AO(nBas,nBas,nBas,nBas)
|
||||||
|
double precision,intent(in) :: ERI_MO(nBas,nBas,nBas,nBas)
|
||||||
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
||||||
double precision,intent(in) :: eG0T0(nBas)
|
double precision,intent(in) :: eG0T0(nBas)
|
||||||
|
|
||||||
@ -68,6 +72,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
double precision,allocatable :: X2s(:,:),X2t(:,:)
|
double precision,allocatable :: X2s(:,:),X2t(:,:)
|
||||||
double precision,allocatable :: Y2s(:,:),Y2t(:,:)
|
double precision,allocatable :: Y2s(:,:),Y2t(:,:)
|
||||||
double precision,allocatable :: rho2s(:,:,:),rho2t(:,:,:)
|
double precision,allocatable :: rho2s(:,:,:),rho2t(:,:,:)
|
||||||
|
double precision,allocatable :: SigX(:)
|
||||||
double precision,allocatable :: SigT(:)
|
double precision,allocatable :: SigT(:)
|
||||||
double precision,allocatable :: Z(:)
|
double precision,allocatable :: Z(:)
|
||||||
|
|
||||||
@ -102,9 +107,13 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
Omega1t(nVVt),X1t(nVVt,nVVt),Y1t(nOOt,nVVt), &
|
Omega1t(nVVt),X1t(nVVt,nVVt),Y1t(nOOt,nVVt), &
|
||||||
Omega2t(nOOt),X2t(nVVt,nOOt),Y2t(nOOt,nOOt), &
|
Omega2t(nOOt),X2t(nVVt,nOOt),Y2t(nOOt,nOOt), &
|
||||||
rho1t(nBas,nO,nVVt),rho2t(nBas,nV,nOOt), &
|
rho1t(nBas,nO,nVVt),rho2t(nBas,nV,nOOt), &
|
||||||
eGT(nBas),eOld(nBas),Z(nBas),SigT(nBas), &
|
eGT(nBas),eOld(nBas),Z(nBas),SigX(nBas),SigT(nBas), &
|
||||||
error_diis(nBas,max_diis),e_diis(nBas,max_diis))
|
error_diis(nBas,max_diis),e_diis(nBas,max_diis))
|
||||||
|
|
||||||
|
! Compute the exchange part of the self-energy
|
||||||
|
|
||||||
|
call self_energy_exchange_diag(nBas,cHF,PHF,ERI_AO,SigX)
|
||||||
|
|
||||||
! Initialization
|
! Initialization
|
||||||
|
|
||||||
nSCF = 0
|
nSCF = 0
|
||||||
@ -131,7 +140,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
|
|
||||||
! Compute linear response
|
! Compute linear response
|
||||||
|
|
||||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:),ERI(:,:,:,:), &
|
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:),ERI_MO(:,:,:,:), &
|
||||||
Omega1s(:),X1s(:,:),Y1s(:,:),Omega2s(:),X2s(:,:),Y2s(:,:),EcRPA(ispin))
|
Omega1s(:),X1s(:,:),Y1s(:,:),Omega2s(:),X2s(:,:),Y2s(:,:),EcRPA(ispin))
|
||||||
|
|
||||||
! EcRPA(ispin) = 1d0*EcRPA(ispin)
|
! EcRPA(ispin) = 1d0*EcRPA(ispin)
|
||||||
@ -148,7 +157,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
|
|
||||||
! Compute linear response
|
! Compute linear response
|
||||||
|
|
||||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:),ERI(:,:,:,:), &
|
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:),ERI_MO(:,:,:,:), &
|
||||||
Omega1t(:),X1t(:,:),Y1t(:,:),Omega2t(:),X2t(:,:),Y2t(:,:),EcRPA(ispin))
|
Omega1t(:),X1t(:,:),Y1t(:,:),Omega2t(:),X2t(:,:),Y2t(:,:),EcRPA(ispin))
|
||||||
|
|
||||||
! EcRPA(ispin) = 2d0*EcRPA(ispin)
|
! EcRPA(ispin) = 2d0*EcRPA(ispin)
|
||||||
@ -169,7 +178,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
xERI = +0d0
|
xERI = +0d0
|
||||||
alpha = +1d0
|
alpha = +1d0
|
||||||
|
|
||||||
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI(:,:,:,:), &
|
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI_MO(:,:,:,:), &
|
||||||
X1s(:,:),Y1s(:,:),rho1s(:,:,:),X2s(:,:),Y2s(:,:),rho2s(:,:,:))
|
X1s(:,:),Y1s(:,:),rho1s(:,:,:),X2s(:,:),Y2s(:,:),rho2s(:,:,:))
|
||||||
|
|
||||||
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT(:), &
|
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT(:), &
|
||||||
@ -183,7 +192,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
xERI = -1d0
|
xERI = -1d0
|
||||||
alpha = +1d0
|
alpha = +1d0
|
||||||
|
|
||||||
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI(:,:,:,:), &
|
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI_MO(:,:,:,:), &
|
||||||
X1t(:,:),Y1t(:,:),rho1t(:,:,:),X2t(:,:),Y2t(:,:),rho2t(:,:,:))
|
X1t(:,:),Y1t(:,:),rho1t(:,:,:),X2t(:,:),Y2t(:,:),rho2t(:,:,:))
|
||||||
|
|
||||||
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT(:), &
|
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT(:), &
|
||||||
@ -200,7 +209,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
! Solve the quasi-particle equation
|
! Solve the quasi-particle equation
|
||||||
!----------------------------------------------
|
!----------------------------------------------
|
||||||
|
|
||||||
eGT(:) = eHF(:) + SigT(:)
|
eGT(:) = eHF(:) + SigX(:) + SigT(:) - Vxc(:)
|
||||||
|
|
||||||
! Convergence criteria
|
! Convergence criteria
|
||||||
|
|
||||||
@ -238,11 +247,11 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
|
|
||||||
ispin = 1
|
ispin = 1
|
||||||
iblock = 3
|
iblock = 3
|
||||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT(:),ERI(:,:,:,:), &
|
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT(:),ERI_MO(:,:,:,:), &
|
||||||
Omega1s(:),X1s(:,:),Y1s(:,:),Omega2s(:),X2s(:,:),Y2s(:,:),EcRPA(ispin))
|
Omega1s(:),X1s(:,:),Y1s(:,:),Omega2s(:),X2s(:,:),Y2s(:,:),EcRPA(ispin))
|
||||||
ispin = 2
|
ispin = 2
|
||||||
iblock = 4
|
iblock = 4
|
||||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT(:),ERI(:,:,:,:), &
|
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT(:),ERI_MO(:,:,:,:), &
|
||||||
Omega1t(:),X1t(:,:),Y1t(:,:),Omega2t(:),X2t(:,:),Y2t(:,:),EcRPA(ispin))
|
Omega1t(:),X1t(:,:),Y1t(:,:),Omega2t(:),X2t(:,:),Y2t(:,:),EcRPA(ispin))
|
||||||
EcRPA(1) = EcRPA(1) - EcRPA(2)
|
EcRPA(1) = EcRPA(1) - EcRPA(2)
|
||||||
EcRPA(2) = 3d0*EcRPA(2)
|
EcRPA(2) = 3d0*EcRPA(2)
|
||||||
@ -262,7 +271,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
if(BSE) then
|
if(BSE) then
|
||||||
|
|
||||||
call Bethe_Salpeter(TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta, &
|
call Bethe_Salpeter(TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta, &
|
||||||
nBas,nC,nO,nV,nR,nS,ERI,dipole_int,eGT,eGT,EcRPA,EcBSE)
|
nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int,eGT,eGT,EcRPA,EcBSE)
|
||||||
|
|
||||||
if(exchange_kernel) then
|
if(exchange_kernel) then
|
||||||
|
|
||||||
@ -297,7 +306,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
call ACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,BSE,singlet,triplet,eta, &
|
call ACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,BSE,singlet,triplet,eta, &
|
||||||
nBas,nC,nO,nV,nR,nS,ERI,eGT,eGT,EcAC)
|
nBas,nC,nO,nV,nR,nS,ERI_MO,eGT,eGT,EcAC)
|
||||||
|
|
||||||
if(exchange_kernel) then
|
if(exchange_kernel) then
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ subroutine evGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,COHSEX,SOSE
|
|||||||
double precision,intent(in) :: PHF(nBas,nBas)
|
double precision,intent(in) :: PHF(nBas,nBas)
|
||||||
double precision,intent(in) :: eHF(nBas)
|
double precision,intent(in) :: eHF(nBas)
|
||||||
double precision,intent(in) :: cHF(nBas,nBas)
|
double precision,intent(in) :: cHF(nBas,nBas)
|
||||||
double precision,intent(in) :: Vxc(nBas,nspin)
|
double precision,intent(in) :: Vxc(nBas)
|
||||||
double precision,intent(in) :: eG0W0(nBas)
|
double precision,intent(in) :: eG0W0(nBas)
|
||||||
double precision,intent(in) :: ERI_AO(nBas,nBas,nBas,nBas)
|
double precision,intent(in) :: ERI_AO(nBas,nBas,nBas,nBas)
|
||||||
double precision,intent(in) :: ERI_MO(nBas,nBas,nBas,nBas)
|
double precision,intent(in) :: ERI_MO(nBas,nBas,nBas,nBas)
|
||||||
@ -176,7 +176,7 @@ subroutine evGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,COHSEX,SOSE
|
|||||||
|
|
||||||
! Solve the quasi-particle equation
|
! Solve the quasi-particle equation
|
||||||
|
|
||||||
eGW(:) = eHF(:) + SigC(:)
|
eGW(:) = eHF(:) + SigX(:) + SigC(:) - Vxc(:)
|
||||||
|
|
||||||
! Convergence criteria
|
! Convergence criteria
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user