mirror of
https://github.com/pfloos/quack
synced 2024-12-22 12:23:42 +01:00
working on ppBSE@GT
This commit is contained in:
parent
13ed518704
commit
68008e5738
@ -13,9 +13,9 @@
|
||||
# G0F2* evGF2* qsGF2* G0F3 evGF3
|
||||
F F F F F
|
||||
# G0W0* evGW* qsGW* ufG0W0 ufGW
|
||||
T F F F F
|
||||
F F F F F
|
||||
# G0T0 evGT qsGT
|
||||
F F F
|
||||
T F F
|
||||
# MCMP2
|
||||
F
|
||||
# * unrestricted version available
|
||||
|
@ -11,7 +11,7 @@
|
||||
# GW: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0 reg
|
||||
256 0.00001 T 5 T 0.0 F F F F F F
|
||||
# GT: maxSCF thresh DIIS n_diis lin eta TDA_T reg
|
||||
10 0.00001 T 5 T 0.0 F F
|
||||
10 0.00001 T 5 T 0.0 T F
|
||||
# ACFDT: AC Kx XBS
|
||||
F F T
|
||||
# BSE: BSE dBSE dTDA evDyn ppBSE
|
||||
|
@ -1,8 +1,8 @@
|
||||
6
|
||||
Nitrosomethane,^1A^\prime,CC3,aug-cc-pVTZ
|
||||
Nitrosomethane
|
||||
C -0.94419297 0.00000000 -0.56740524
|
||||
N -0.00286683 0.00000000 0.57183096
|
||||
O 1.15791903 0.00000000 0.22993880
|
||||
H -0.40928669 0.00000000 -1.51564611
|
||||
H -1.57415127 0.88267715 -0.45733920
|
||||
H -1.57415127 -0.88267715 -0.45733920
|
||||
H -1.57415127 -0.88267715 -0.45733920
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine CCD(maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF,eHF)
|
||||
subroutine CCD(BSE,maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF,eHF)
|
||||
|
||||
! CCD module
|
||||
|
||||
@ -6,6 +6,7 @@ subroutine CCD(maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF,e
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: BSE
|
||||
integer,intent(in) :: maxSCF
|
||||
integer,intent(in) :: max_diis
|
||||
double precision,intent(in) :: thresh
|
||||
@ -84,7 +85,15 @@ subroutine CCD(maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF,e
|
||||
|
||||
allocate(dbERI(nBas,nBas,nBas,nBas))
|
||||
|
||||
call antisymmetrize_ERI(2,nBas,sERI,dbERI)
|
||||
if(BSE) then
|
||||
|
||||
call static_screening(nBas,nC,nO,nV,nR,seHF,sERI,dbERI)
|
||||
|
||||
else
|
||||
|
||||
call antisymmetrize_ERI(2,nBas,sERI,dbERI)
|
||||
|
||||
end if
|
||||
|
||||
deallocate(sERI)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine CCSD(maxSCF,thresh,max_diis,doCCSDT,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF,eHF)
|
||||
subroutine CCSD(BSE,maxSCF,thresh,max_diis,doCCSDT,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF,eHF)
|
||||
|
||||
! CCSD module
|
||||
|
||||
@ -6,6 +6,7 @@ subroutine CCSD(maxSCF,thresh,max_diis,doCCSDT,nBasin,nCin,nOin,nVin,nRin,ERI,EN
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: BSE
|
||||
integer,intent(in) :: maxSCF
|
||||
integer,intent(in) :: max_diis
|
||||
double precision,intent(in) :: thresh
|
||||
@ -104,7 +105,15 @@ subroutine CCSD(maxSCF,thresh,max_diis,doCCSDT,nBasin,nCin,nOin,nVin,nRin,ERI,EN
|
||||
|
||||
allocate(dbERI(nBas,nBas,nBas,nBas))
|
||||
|
||||
call antisymmetrize_ERI(2,nBas,sERI,dbERI)
|
||||
if(BSE) then
|
||||
|
||||
call static_screening(nBas,nC,nO,nV,nR,seHF,sERI,dbERI)
|
||||
|
||||
else
|
||||
|
||||
call antisymmetrize_ERI(2,nBas,sERI,dbERI)
|
||||
|
||||
end if
|
||||
|
||||
deallocate(sERI)
|
||||
|
||||
|
74
src/CC/static_screening.f90
Normal file
74
src/CC/static_screening.f90
Normal file
@ -0,0 +1,74 @@
|
||||
subroutine static_screening(nBas,nC,nO,nV,nR,eW,ERI,dbERI)
|
||||
|
||||
! Compute the four-index tensor of the static screening W
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: nBas
|
||||
integer,intent(in) :: nC
|
||||
integer,intent(in) :: nO
|
||||
integer,intent(in) :: nV
|
||||
integer,intent(in) :: nR
|
||||
|
||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: eW(nBas)
|
||||
|
||||
! Local variables
|
||||
|
||||
double precision :: EcRPA
|
||||
double precision :: eta
|
||||
logical :: TDA
|
||||
double precision :: chi
|
||||
integer :: ispin
|
||||
integer :: nS
|
||||
integer :: p,q,r,s
|
||||
integer :: m
|
||||
|
||||
double precision,allocatable :: Om(:)
|
||||
double precision,allocatable :: XpY(:,:)
|
||||
double precision,allocatable :: XmY(:,:)
|
||||
double precision,allocatable :: rho(:,:,:)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: dbERI(nBas,nBas,nBas,nBas)
|
||||
|
||||
! Initialize
|
||||
|
||||
nS = (nO - nC)*(nV - nR)
|
||||
|
||||
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),rho(nBas,nBas,nS))
|
||||
|
||||
!---------------------------------
|
||||
! Compute (singlet) RPA screening
|
||||
!---------------------------------
|
||||
|
||||
ispin = 3
|
||||
EcRPA = 0d0
|
||||
|
||||
eta = 0d0
|
||||
TDA = .false.
|
||||
|
||||
call linear_response(ispin,.true.,TDA,eta,nBas,nC,nO,nV,nR,nS,1d0,eW,ERI,EcRPA,Om,XpY,XmY)
|
||||
call excitation_density(nBas,nC,nO,nR,nS,ERI,XpY,rho)
|
||||
|
||||
do p=1,nBas
|
||||
do q=1,nBas
|
||||
do r=1,nBas
|
||||
do s=1,nBas
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
chi = chi + rho(p,s,m)*rho(q,r,m)/Om(m)
|
||||
enddo
|
||||
|
||||
dbERI(p,q,r,s)= ERI(p,q,r,s) - ERI(p,q,s,r) + 2d0*chi
|
||||
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
end subroutine static_screening
|
@ -1,5 +1,5 @@
|
||||
subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,nOOt,nVVt, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,rho1s,rho2s,Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,rho1t,rho2t, &
|
||||
subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,nOOab,nVVab,nOOaa,nVVaa, &
|
||||
Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,rho1ab,rho2ab,Om1aa,X1aa,Y1aa,Om2aa,X2aa,Y2aa,rho1aa,rho2aa, &
|
||||
ERI,dipole_int,eT,eGT,EcBSE)
|
||||
|
||||
! Compute the Bethe-Salpeter excitation energies with the T-matrix kernel
|
||||
@ -25,32 +25,32 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
integer,intent(in) :: nR
|
||||
integer,intent(in) :: nS
|
||||
|
||||
integer,intent(in) :: nOOs
|
||||
integer,intent(in) :: nOOt
|
||||
integer,intent(in) :: nVVs
|
||||
integer,intent(in) :: nVVt
|
||||
integer,intent(in) :: nOOab
|
||||
integer,intent(in) :: nOOaa
|
||||
integer,intent(in) :: nVVab
|
||||
integer,intent(in) :: nVVaa
|
||||
|
||||
double precision,intent(in) :: eT(nBas)
|
||||
double precision,intent(in) :: eGT(nBas)
|
||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
||||
|
||||
double precision,intent(in) :: Omega1s(nVVs)
|
||||
double precision,intent(in) :: X1s(nVVs,nVVs)
|
||||
double precision,intent(in) :: Y1s(nOOs,nVVs)
|
||||
double precision,intent(in) :: Omega2s(nOOs)
|
||||
double precision,intent(in) :: X2s(nVVs,nOOs)
|
||||
double precision,intent(in) :: Y2s(nOOs,nOOs)
|
||||
double precision,intent(in) :: rho1s(nBas,nBas,nVVs)
|
||||
double precision,intent(in) :: rho2s(nBas,nBas,nOOs)
|
||||
double precision,intent(in) :: Omega1t(nVVt)
|
||||
double precision,intent(in) :: X1t(nVVt,nVVt)
|
||||
double precision,intent(in) :: Y1t(nOOt,nVVt)
|
||||
double precision,intent(in) :: Omega2t(nOOt)
|
||||
double precision,intent(in) :: X2t(nVVt,nOOt)
|
||||
double precision,intent(in) :: Y2t(nOOt,nOOt)
|
||||
double precision,intent(in) :: rho1t(nBas,nBas,nVVt)
|
||||
double precision,intent(in) :: rho2t(nBas,nBas,nOOt)
|
||||
double precision,intent(in) :: Om1ab(nVVab)
|
||||
double precision,intent(in) :: X1ab(nVVab,nVVab)
|
||||
double precision,intent(in) :: Y1ab(nOOab,nVVab)
|
||||
double precision,intent(in) :: Om2ab(nOOab)
|
||||
double precision,intent(in) :: X2ab(nVVab,nOOab)
|
||||
double precision,intent(in) :: Y2ab(nOOab,nOOab)
|
||||
double precision,intent(in) :: rho1ab(nBas,nBas,nVVab)
|
||||
double precision,intent(in) :: rho2ab(nBas,nBas,nOOab)
|
||||
double precision,intent(in) :: Om1aa(nVVaa)
|
||||
double precision,intent(in) :: X1aa(nVVaa,nVVaa)
|
||||
double precision,intent(in) :: Y1aa(nOOaa,nVVaa)
|
||||
double precision,intent(in) :: Om2aa(nOOaa)
|
||||
double precision,intent(in) :: X2aa(nVVaa,nOOaa)
|
||||
double precision,intent(in) :: Y2aa(nOOaa,nOOaa)
|
||||
double precision,intent(in) :: rho1aa(nBas,nBas,nVVaa)
|
||||
double precision,intent(in) :: rho2aa(nBas,nBas,nOOaa)
|
||||
|
||||
! Local variables
|
||||
|
||||
@ -58,8 +58,8 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
integer :: iblock
|
||||
|
||||
double precision :: EcRPA(nspin)
|
||||
double precision,allocatable :: TAs(:,:),TBs(:,:)
|
||||
double precision,allocatable :: TAt(:,:),TBt(:,:)
|
||||
double precision,allocatable :: TAab(:,:),TBab(:,:)
|
||||
double precision,allocatable :: TAaa(:,:),TBaa(:,:)
|
||||
double precision,allocatable :: OmBSE(:,:)
|
||||
double precision,allocatable :: XpY_BSE(:,:,:)
|
||||
double precision,allocatable :: XmY_BSE(:,:,:)
|
||||
@ -70,7 +70,7 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
|
||||
! Memory allocation
|
||||
|
||||
allocate(TAs(nS,nS),TBs(nS,nS),TAt(nS,nS),TBt(nS,nS), &
|
||||
allocate(TAab(nS,nS),TBab(nS,nS),TAaa(nS,nS),TBaa(nS,nS), &
|
||||
OmBSE(nS,nspin),XpY_BSE(nS,nS,nspin),XmY_BSE(nS,nS,nspin))
|
||||
|
||||
!---------------------------------------!
|
||||
@ -80,13 +80,11 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
ispin = 1
|
||||
iblock = 3
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOs,nVVs,1d0,eT,ERI, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOab,nVVab,1d0,eT,ERI, &
|
||||
Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,EcRPA(ispin))
|
||||
|
||||
! call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI,X1s,Y1s,rho1s,X2s,Y2s,rho2s)
|
||||
|
||||
call static_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,1d0,Omega1s,rho1s,Omega2s,rho2s,TAs)
|
||||
if(.not.TDA) call static_Tmatrix_B(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,1d0,Omega1s,rho1s,Omega2s,rho2s,TBs)
|
||||
call static_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOOab,nVVab,1d0,Om1ab,rho1ab,Om2ab,rho2ab,TAab)
|
||||
if(.not.TDA) call static_Tmatrix_B(eta,nBas,nC,nO,nV,nR,nS,nOOab,nVVab,1d0,Om1ab,rho1ab,Om2ab,rho2ab,TBab)
|
||||
|
||||
!----------------------------------------!
|
||||
! Compute T-matrix for alpha-alpha block !
|
||||
@ -95,13 +93,11 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
ispin = 2
|
||||
iblock = 4
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOt,nVVt,1d0,eT,ERI, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOaa,nVVaa,1d0,eT,ERI, &
|
||||
Om1aa,X1aa,Y1aa,Om2aa,X2aa,Y2aa,EcRPA(ispin))
|
||||
|
||||
! call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI,X1t,Y1t,rho1t,X2t,Y2t,rho2t)
|
||||
|
||||
call static_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,1d0,Omega1t,rho1t,Omega2t,rho2t,TAt)
|
||||
if(.not.TDA) call static_Tmatrix_B(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,1d0,Omega1t,rho1t,Omega2t,rho2t,TBt)
|
||||
call static_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOOaa,nVVaa,1d0,Om1aa,rho1aa,Om2aa,rho2aa,TAaa)
|
||||
if(.not.TDA) call static_Tmatrix_B(eta,nBas,nC,nO,nV,nR,nS,nOOaa,nVVaa,1d0,Om1aa,rho1aa,Om2aa,rho2aa,TBaa)
|
||||
|
||||
!------------------!
|
||||
! Singlet manifold !
|
||||
@ -114,12 +110,11 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
|
||||
! Compute BSE singlet excitation energies
|
||||
|
||||
call linear_response_BSE(ispin,.false.,TDA,.true.,eta,nBas,nC,nO,nV,nR,nS,1d0,eGT,ERI,TAs+TAt,TBs+TBt, &
|
||||
call linear_response_BSE(ispin,.false.,TDA,.true.,eta,nBas,nC,nO,nV,nR,nS,1d0,eGT,ERI,TAab+TAaa,TBab+TBaa, &
|
||||
EcBSE(ispin),OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin))
|
||||
|
||||
call print_excitation('BSE@GT ',ispin,nS,OmBSE(:,ispin))
|
||||
call print_transition_vectors(.true.,nBas,nC,nO,nV,nR,nS,dipole_int, &
|
||||
OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin))
|
||||
call print_transition_vectors(.true.,nBas,nC,nO,nV,nR,nS,dipole_int,OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin))
|
||||
|
||||
if(dBSE) then
|
||||
|
||||
@ -132,10 +127,9 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
! OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin))
|
||||
else
|
||||
|
||||
call Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,nOOt,nVVt, &
|
||||
Omega1s,Omega2s,Omega1t,Omega2t,rho1s,rho2s,rho1t,rho2t,eT,eGT, &
|
||||
dipole_int,OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin), &
|
||||
TAs,TBs,TAt,TBt)
|
||||
call Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOOab,nVVab,nOOaa,nVVaa, &
|
||||
Om1ab,Om2ab,Om1aa,Om2aa,rho1ab,rho2ab,rho1aa,rho2aa,eT,eGT, &
|
||||
dipole_int,OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin),TAab,TAaa)
|
||||
end if
|
||||
|
||||
end if
|
||||
@ -153,11 +147,10 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
|
||||
! Compute BSE triplet excitation energies
|
||||
|
||||
call linear_response_BSE(ispin,.false.,TDA,.true.,eta,nBas,nC,nO,nV,nR,nS,1d0,eGT,ERI,TAt-TAs,TBt-TBs, &
|
||||
call linear_response_BSE(ispin,.false.,TDA,.true.,eta,nBas,nC,nO,nV,nR,nS,1d0,eGT,ERI,TAaa-TAab,TBaa-TBab, &
|
||||
EcBSE(ispin),OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin))
|
||||
call print_excitation('BSE@GT ',ispin,nS,OmBSE(:,ispin))
|
||||
call print_transition_vectors(.false.,nBas,nC,nO,nV,nR,nS,dipole_int, &
|
||||
OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin))
|
||||
call print_transition_vectors(.false.,nBas,nC,nO,nV,nR,nS,dipole_int,OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin))
|
||||
|
||||
if(dBSE) then
|
||||
|
||||
@ -170,10 +163,9 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
! OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin))
|
||||
else
|
||||
|
||||
call Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,nOOt,nVVt, &
|
||||
Omega1s,Omega2s,Omega1t,Omega2t,rho1s,rho2s,rho1t,rho2t,eT,eGT, &
|
||||
dipole_int,OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin), &
|
||||
TAs,TBs,TAt,TBt)
|
||||
call Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOOab,nVVab,nOOaa,nVVaa, &
|
||||
Om1ab,Om2ab,Om1aa,Om2aa,rho1ab,rho2ab,rho1aa,rho2aa,eT,eGT, &
|
||||
dipole_int,OmBSE(:,ispin),XpY_BSE(:,:,ispin),XmY_BSE(:,:,ispin),TAab,TAaa)
|
||||
end if
|
||||
|
||||
end if
|
||||
|
@ -1,6 +1,6 @@
|
||||
subroutine Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,nOOt,nVVt, &
|
||||
Omega1s,Omega2s,Omega1t,Omega2t,rho1s,rho2s,rho1t,rho2t,eT,eGT, &
|
||||
dipole_int,OmBSE,XpY,XmY,TAs,TBs,TAt,TBt)
|
||||
subroutine Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOOab,nVVab,nOOaa,nVVaa, &
|
||||
Om1ab,Om2ab,Om1aa,Om2aa,rho1ab,rho2ab,rho1aa,rho2aa,eT,eGT, &
|
||||
dipole_int,OmBSE,XpY,XmY,TAab,TAaa)
|
||||
|
||||
! Compute dynamical effects via perturbation theory for BSE@GT
|
||||
|
||||
@ -19,10 +19,10 @@ subroutine Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO
|
||||
integer,intent(in) :: nR
|
||||
integer,intent(in) :: nS
|
||||
|
||||
integer,intent(in) :: nOOs
|
||||
integer,intent(in) :: nVVs
|
||||
integer,intent(in) :: nOOt
|
||||
integer,intent(in) :: nVVt
|
||||
integer,intent(in) :: nOOab
|
||||
integer,intent(in) :: nVVab
|
||||
integer,intent(in) :: nOOaa
|
||||
integer,intent(in) :: nVVaa
|
||||
|
||||
double precision,intent(in) :: eT(nBas)
|
||||
double precision,intent(in) :: eGT(nBas)
|
||||
@ -31,19 +31,17 @@ subroutine Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO
|
||||
double precision,intent(in) :: XpY(nS,nS)
|
||||
double precision,intent(in) :: XmY(nS,nS)
|
||||
|
||||
double precision,intent(in) :: Omega1s(nVVs)
|
||||
double precision,intent(in) :: Omega2s(nOOs)
|
||||
double precision,intent(in) :: rho1s(nBas,nBas,nVVs)
|
||||
double precision,intent(in) :: rho2s(nBas,nBas,nOOs)
|
||||
double precision,intent(in) :: Omega1t(nVVt)
|
||||
double precision,intent(in) :: Omega2t(nOOt)
|
||||
double precision,intent(in) :: rho1t(nBas,nBas,nVVt)
|
||||
double precision,intent(in) :: rho2t(nBas,nBas,nOOt)
|
||||
double precision,intent(in) :: Om1ab(nVVab)
|
||||
double precision,intent(in) :: Om2ab(nOOab)
|
||||
double precision,intent(in) :: rho1ab(nBas,nBas,nVVab)
|
||||
double precision,intent(in) :: rho2ab(nBas,nBas,nOOab)
|
||||
double precision,intent(in) :: Om1aa(nVVaa)
|
||||
double precision,intent(in) :: Om2aa(nOOaa)
|
||||
double precision,intent(in) :: rho1aa(nBas,nBas,nVVaa)
|
||||
double precision,intent(in) :: rho2aa(nBas,nBas,nOOaa)
|
||||
|
||||
double precision,intent(in) :: TAs(nS,nS)
|
||||
double precision,intent(in) :: TBs(nS,nS)
|
||||
double precision,intent(in) :: TAt(nS,nS)
|
||||
double precision,intent(in) :: TBt(nS,nS)
|
||||
double precision,intent(in) :: TAab(nS,nS)
|
||||
double precision,intent(in) :: TAaa(nS,nS)
|
||||
|
||||
! Local variables
|
||||
|
||||
@ -57,16 +55,16 @@ subroutine Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO
|
||||
double precision,allocatable :: X(:)
|
||||
double precision,allocatable :: Y(:)
|
||||
|
||||
double precision,allocatable :: dTAs(:,:)
|
||||
double precision,allocatable :: ZAs(:,:)
|
||||
double precision,allocatable :: dTAab(:,:)
|
||||
double precision,allocatable :: ZAab(:,:)
|
||||
|
||||
double precision,allocatable :: dTAt(:,:)
|
||||
double precision,allocatable :: ZAt(:,:)
|
||||
double precision,allocatable :: dTAaa(:,:)
|
||||
double precision,allocatable :: ZAaa(:,:)
|
||||
|
||||
! Memory allocation
|
||||
|
||||
maxS = min(nS,maxS)
|
||||
allocate(OmDyn(maxS),ZDyn(maxS),X(nS),Y(nS),dTAs(nS,nS),ZAs(nS,nS),dTAt(nS,nS),ZAt(nS,nS))
|
||||
allocate(OmDyn(maxS),ZDyn(maxS),X(nS),Y(nS),dTAab(nS,nS),ZAab(nS,nS),dTAaa(nS,nS),ZAaa(nS,nS))
|
||||
|
||||
if(dTDA) then
|
||||
write(*,*)
|
||||
@ -84,11 +82,11 @@ subroutine Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO
|
||||
|
||||
! Compute dynamical T-matrix for alpha-beta block
|
||||
|
||||
call dynamic_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,1d0,eGT,Omega1s,Omega2s,rho1s,rho2s,OmBSE(ia),dTAs,ZAs)
|
||||
call dynamic_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOOab,nVVab,1d0,eGT,Om1ab,Om2ab,rho1ab,rho2ab,OmBSE(ia),dTAab,ZAab)
|
||||
|
||||
! Compute dynamical T-matrix for alpha-beta block
|
||||
|
||||
call dynamic_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,1d0,eGT,Omega1t,Omega2t,rho1t,rho2t,OmBSE(ia),dTAt,ZAt)
|
||||
call dynamic_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOOaa,nVVaa,1d0,eGT,Om1aa,Om2aa,rho1aa,rho2aa,OmBSE(ia),dTAaa,ZAaa)
|
||||
|
||||
X(:) = 0.5d0*(XpY(ia,:) + XmY(ia,:))
|
||||
Y(:) = 0.5d0*(XpY(ia,:) - XmY(ia,:))
|
||||
@ -96,13 +94,13 @@ subroutine Bethe_Salpeter_Tmatrix_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO
|
||||
! First-order correction
|
||||
|
||||
if(ispin == 1) then
|
||||
ZDyn(ia) = - dot_product(X,matmul(ZAt+ZAs,X))
|
||||
OmDyn(ia) = - dot_product(X,matmul(dTAt+dTAs,X)) + dot_product(X,matmul(TAt+TAs,X))
|
||||
ZDyn(ia) = - dot_product(X,matmul(ZAaa+ZAab,X))
|
||||
OmDyn(ia) = - dot_product(X,matmul(dTAaa+dTAab,X)) + dot_product(X,matmul(TAaa+TAab,X))
|
||||
end if
|
||||
|
||||
if(ispin == 2) then
|
||||
ZDyn(ia) = - dot_product(X,matmul(ZAt-ZAs,X))
|
||||
OmDyn(ia) = - dot_product(X,matmul(dTAt-dTAs,X)) + dot_product(X,matmul(TAt-TAs,X))
|
||||
ZDyn(ia) = - dot_product(X,matmul(ZAaa-ZAab,X))
|
||||
OmDyn(ia) = - dot_product(X,matmul(dTAaa-dTAab,X)) + dot_product(X,matmul(TAaa-TAab,X))
|
||||
end if
|
||||
|
||||
ZDyn(ia) = 1d0/(1d0 - ZDyn(ia))
|
||||
|
199
src/GT/Bethe_Salpeter_Tmatrix_pp.f90
Normal file
199
src/GT/Bethe_Salpeter_Tmatrix_pp.f90
Normal file
@ -0,0 +1,199 @@
|
||||
subroutine Bethe_Salpeter_Tmatrix_pp(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nOOab,nVVab,nOOaa,nVVaa, &
|
||||
Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,rho1ab,rho2ab,Om1aa,X1aa,Y1aa,Om2aa,X2aa,Y2aa,rho1aa,rho2aa, &
|
||||
ERI,dipole_int,eT,eGT,EcBSE)
|
||||
|
||||
! Compute the Bethe-Salpeter excitation energies with the T-matrix kernel
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: TDA_T
|
||||
logical,intent(in) :: TDA
|
||||
logical,intent(in) :: dBSE
|
||||
logical,intent(in) :: dTDA
|
||||
logical,intent(in) :: evDyn
|
||||
logical,intent(in) :: singlet
|
||||
logical,intent(in) :: triplet
|
||||
|
||||
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) :: nOOab
|
||||
integer,intent(in) :: nOOaa
|
||||
integer,intent(in) :: nVVab
|
||||
integer,intent(in) :: nVVaa
|
||||
|
||||
double precision,intent(in) :: eT(nBas)
|
||||
double precision,intent(in) :: eGT(nBas)
|
||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
||||
|
||||
double precision,intent(in) :: Om1ab(nVVab)
|
||||
double precision,intent(in) :: X1ab(nVVab,nVVab)
|
||||
double precision,intent(in) :: Y1ab(nOOab,nVVab)
|
||||
double precision,intent(in) :: Om2ab(nOOab)
|
||||
double precision,intent(in) :: X2ab(nVVab,nOOab)
|
||||
double precision,intent(in) :: Y2ab(nOOab,nOOab)
|
||||
double precision,intent(in) :: rho1ab(nBas,nBas,nVVab)
|
||||
double precision,intent(in) :: rho2ab(nBas,nBas,nOOab)
|
||||
double precision,intent(in) :: Om1aa(nVVaa)
|
||||
double precision,intent(in) :: X1aa(nVVaa,nVVaa)
|
||||
double precision,intent(in) :: Y1aa(nOOaa,nVVaa)
|
||||
double precision,intent(in) :: Om2aa(nOOaa)
|
||||
double precision,intent(in) :: X2aa(nVVaa,nOOaa)
|
||||
double precision,intent(in) :: Y2aa(nOOaa,nOOaa)
|
||||
double precision,intent(in) :: rho1aa(nBas,nBas,nVVaa)
|
||||
double precision,intent(in) :: rho2aa(nBas,nBas,nOOaa)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: ispin
|
||||
integer :: iblock
|
||||
|
||||
integer :: nOOs
|
||||
integer :: nOOt
|
||||
integer :: nVVs
|
||||
integer :: nVVt
|
||||
|
||||
double precision :: EcRPA(nspin)
|
||||
double precision,allocatable :: TBab(:,:),TCab(:,:),TDab(:,:)
|
||||
double precision,allocatable :: TBaa(:,:),TCaa(:,:),TDaa(:,:)
|
||||
|
||||
double precision,allocatable :: Om1s(:),Om1t(:)
|
||||
double precision,allocatable :: X1s(:,:),X1t(:,:)
|
||||
double precision,allocatable :: Y1s(:,:),Y1t(:,:)
|
||||
double precision,allocatable :: Om2s(:),Om2t(:)
|
||||
double precision,allocatable :: X2s(:,:),X2t(:,:)
|
||||
double precision,allocatable :: Y2s(:,:),Y2t(:,:)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: EcBSE(nspin)
|
||||
|
||||
|
||||
!------------------!
|
||||
! Singlet manifold !
|
||||
!------------------!
|
||||
|
||||
if(singlet) then
|
||||
|
||||
ispin = 1
|
||||
|
||||
nOOs = nO*(nO+1)/2
|
||||
nVVs = nV*(nV+1)/2
|
||||
|
||||
!---------------------------------------!
|
||||
! Compute T-matrix for alpha-beta block !
|
||||
!---------------------------------------!
|
||||
|
||||
iblock = 3
|
||||
|
||||
EcRPA(ispin) = 0d0
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOab,nVVab,1d0,eT,ERI,Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,EcRPA(ispin))
|
||||
|
||||
allocate(TBab(nVVs,nOOs),TCab(nVVs,nVVs),TDab(nOOs,nOOs))
|
||||
|
||||
if(.not.TDA) call static_Tmatrix_B_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOab,nVVab,nOOs,nVVs,1d0,Om1ab,rho1ab,Om2ab,rho2ab,TBab)
|
||||
call static_Tmatrix_C_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOab,nVVab,nOOs,nVVs,1d0,Om1ab,rho1ab,Om2ab,rho2ab,TCab)
|
||||
call static_Tmatrix_D_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOab,nVVab,nOOs,nVVs,1d0,Om1ab,rho1ab,Om2ab,rho2ab,TDab)
|
||||
|
||||
!----------------------------------------!
|
||||
! Compute T-matrix for alpha-alpha block !
|
||||
!----------------------------------------!
|
||||
|
||||
iblock = 4
|
||||
EcRPA(ispin) = 0d0
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOaa,nVVaa,1d0,eT,ERI,Om1aa,X1aa,Y1aa,Om2aa,X2aa,Y2aa,EcRPA(ispin))
|
||||
|
||||
allocate(TBaa(nVVs,nOOs),TCaa(nVVs,nVVs),TDaa(nOOs,nOOs))
|
||||
|
||||
if(.not.TDA) call static_Tmatrix_B_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,nOOs,nVVs,1d0,Om1aa,rho1aa,Om2aa,rho2aa,TBaa)
|
||||
call static_Tmatrix_C_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,nOOs,nVVs,1d0,Om1aa,rho1aa,Om2aa,rho2aa,TCaa)
|
||||
call static_Tmatrix_D_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,nOOs,nVVs,1d0,Om1aa,rho1aa,Om2aa,rho2aa,TDaa)
|
||||
|
||||
!----------------------------------!
|
||||
! pp/hh sectors for singlet states !
|
||||
!----------------------------------!
|
||||
|
||||
EcBSE(ispin) = 0d0
|
||||
|
||||
allocate(Om1s(nVVs),X1s(nVVs,nVVs),Y1s(nOOs,nVVs),Om2s(nOOs),X2s(nVVs,nOOs),Y2s(nOOs,nOOs))
|
||||
|
||||
call linear_response_pp_BSE(ispin,TDA,.true.,nBas,nC,nO,nV,nR,nOOs,nVVs,1d0,eGT,ERI, &
|
||||
TBaa+TBab,TCaa+TCab,TDaa+TDab,Om1s,X1s,Y1s,Om2s,X2s,Y2s,EcBSE(ispin))
|
||||
|
||||
call print_transition_vectors_pp(.true.,nBas,nC,nO,nV,nR,nOOs,nVVs,dipole_int,Om1s,X1s,Y1s,Om2s,X2s,Y2s)
|
||||
|
||||
deallocate(Om1s,X1s,Y1s,Om2s,X2s,Y2s,TBab,TCab,TDab,TBaa,TCaa,TDaa)
|
||||
|
||||
end if
|
||||
|
||||
!------------------!
|
||||
! Triplet manifold !
|
||||
!------------------!
|
||||
|
||||
if(triplet) then
|
||||
|
||||
ispin = 2
|
||||
|
||||
nOOt = nO*(nO-1)/2
|
||||
nVVt = nV*(nV-1)/2
|
||||
|
||||
!---------------------------------------!
|
||||
! Compute T-matrix for alpha-beta block !
|
||||
!---------------------------------------!
|
||||
|
||||
iblock = 3
|
||||
EcRPA(ispin) = 0d0
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOab,nVVab,1d0,eT,ERI,Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,EcRPA(ispin))
|
||||
|
||||
allocate(TBab(nVVt,nOOt),TCab(nVVt,nVVt),TDab(nOOt,nOOt))
|
||||
|
||||
if(.not.TDA) call static_Tmatrix_B_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOab,nVVab,nOOt,nVVt,1d0,Om1ab,rho1ab,Om2ab,rho2ab,TBab)
|
||||
call static_Tmatrix_C_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOab,nVVab,nOOt,nVVt,1d0,Om1ab,rho1ab,Om2ab,rho2ab,TCab)
|
||||
call static_Tmatrix_D_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOab,nVVab,nOOt,nVVt,1d0,Om1ab,rho1ab,Om2ab,rho2ab,TDab)
|
||||
|
||||
!----------------------------------------!
|
||||
! Compute T-matrix for alpha-alpha block !
|
||||
!----------------------------------------!
|
||||
|
||||
ispin = 2
|
||||
iblock = 4
|
||||
|
||||
EcRPA(ispin) = 0d0
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOaa,nVVaa,1d0,eT,ERI,Om1aa,X1aa,Y1aa,Om2aa,X2aa,Y2aa,EcRPA(ispin))
|
||||
|
||||
allocate(TBaa(nVVt,nOOt),TCaa(nVVt,nVVt),TDaa(nOOt,nOOt))
|
||||
|
||||
if(.not.TDA) call static_Tmatrix_B_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,nOOt,nVVt,1d0,Om1aa,rho1aa,Om2aa,rho2aa,TBaa)
|
||||
call static_Tmatrix_C_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,nOOt,nVVt,1d0,Om1aa,rho1aa,Om2aa,rho2aa,TCaa)
|
||||
call static_Tmatrix_D_pp(ispin,eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,nOOt,nVVt,1d0,Om1aa,rho1aa,Om2aa,rho2aa,TDaa)
|
||||
|
||||
!----------------------------------!
|
||||
! pp/hh sectors for triplet states !
|
||||
!----------------------------------!
|
||||
|
||||
EcBSE(ispin) = 0d0
|
||||
|
||||
allocate(Om1t(nVVt),X1t(nVVt,nVVt),Y1t(nOOt,nVVt),Om2t(nOOt),X2t(nVVt,nOOt),Y2t(nOOt,nOOt))
|
||||
|
||||
call linear_response_pp_BSE(ispin,TDA,.true.,nBas,nC,nO,nV,nR,nOOt,nVVt,1d0,eGT,ERI, &
|
||||
TBaa-TBab,TCaa-TCab,TDaa-TDab,Om1t,X1t,Y1t,Om2t,X2t,Y2t,EcBSE(ispin))
|
||||
|
||||
call print_transition_vectors_pp(.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,dipole_int,Om1t,X1t,Y1t,Om2t,X2t,Y2t)
|
||||
|
||||
deallocate(Om1t,X1t,Y1t,Om2t,X2t,Y2t,TBab,TCab,TDab,TBaa,TCaa,TDaa)
|
||||
|
||||
end if
|
||||
|
||||
end subroutine Bethe_Salpeter_Tmatrix_pp
|
131
src/GT/G0T0.f90
131
src/GT/G0T0.f90
@ -1,5 +1,5 @@
|
||||
subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet, &
|
||||
linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eG0T0)
|
||||
subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,ppBSE,singlet,triplet, &
|
||||
linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eGT)
|
||||
|
||||
! Perform one-shot calculation with a T-matrix self-energy (G0T0)
|
||||
|
||||
@ -12,6 +12,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
logical,intent(in) :: exchange_kernel
|
||||
logical,intent(in) :: doXBS
|
||||
logical,intent(in) :: BSE
|
||||
logical,intent(in) :: ppBSE
|
||||
logical,intent(in) :: TDA_T
|
||||
logical,intent(in) :: TDA
|
||||
logical,intent(in) :: dBSE
|
||||
@ -43,27 +44,28 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
integer :: ispin
|
||||
integer :: iblock
|
||||
integer :: nOOs,nOOt
|
||||
integer :: nVVs,nVVt
|
||||
integer :: nOOab,nOOaa
|
||||
integer :: nVVab,nVVaa
|
||||
double precision :: EcRPA(nspin)
|
||||
double precision :: EcBSE(nspin)
|
||||
double precision :: EcAC(nspin)
|
||||
double precision :: EcppBSE(nspin)
|
||||
double precision :: EcGM
|
||||
double precision,allocatable :: Omega1s(:),Omega1t(:)
|
||||
double precision,allocatable :: X1s(:,:),X1t(:,:)
|
||||
double precision,allocatable :: Y1s(:,:),Y1t(:,:)
|
||||
double precision,allocatable :: rho1s(:,:,:),rho1t(:,:,:)
|
||||
double precision,allocatable :: Omega2s(:),Omega2t(:)
|
||||
double precision,allocatable :: X2s(:,:),X2t(:,:)
|
||||
double precision,allocatable :: Y2s(:,:),Y2t(:,:)
|
||||
double precision,allocatable :: rho2s(:,:,:),rho2t(:,:,:)
|
||||
double precision,allocatable :: Om1ab(:),Om1aa(:)
|
||||
double precision,allocatable :: X1ab(:,:),X1aa(:,:)
|
||||
double precision,allocatable :: Y1ab(:,:),Y1aa(:,:)
|
||||
double precision,allocatable :: rho1ab(:,:,:),rho1aa(:,:,:)
|
||||
double precision,allocatable :: Om2ab(:),Om2aa(:)
|
||||
double precision,allocatable :: X2ab(:,:),X2aa(:,:)
|
||||
double precision,allocatable :: Y2ab(:,:),Y2aa(:,:)
|
||||
double precision,allocatable :: rho2ab(:,:,:),rho2aa(:,:,:)
|
||||
double precision,allocatable :: SigX(:)
|
||||
double precision,allocatable :: SigT(:)
|
||||
double precision,allocatable :: Z(:)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: eG0T0(nBas)
|
||||
double precision,intent(out) :: eGT(nBas)
|
||||
|
||||
! Hello world
|
||||
|
||||
@ -75,22 +77,20 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
! Dimensions of the pp-RPA linear reponse matrices
|
||||
|
||||
nOOs = nO*nO
|
||||
nVVs = nV*nV
|
||||
! nOOs = nO*(nO + 1)/2
|
||||
! nVVs = nV*(nV + 1)/2
|
||||
nOOab = nO*nO
|
||||
nVVab = nV*nV
|
||||
|
||||
nOOt = nO*(nO - 1)/2
|
||||
nVVt = nV*(nV - 1)/2
|
||||
nOOaa = nO*(nO - 1)/2
|
||||
nVVaa = nV*(nV - 1)/2
|
||||
|
||||
! Memory allocation
|
||||
|
||||
allocate(Omega1s(nVVs),X1s(nVVs,nVVs),Y1s(nOOs,nVVs), &
|
||||
Omega2s(nOOs),X2s(nVVs,nOOs),Y2s(nOOs,nOOs), &
|
||||
rho1s(nBas,nBas,nVVs),rho2s(nBas,nBas,nOOs), &
|
||||
Omega1t(nVVt),X1t(nVVt,nVVt),Y1t(nOOt,nVVt), &
|
||||
Omega2t(nOOt),X2t(nVVt,nOOt),Y2t(nOOt,nOOt), &
|
||||
rho1t(nBas,nBas,nVVt),rho2t(nBas,nBas,nOOt), &
|
||||
allocate(Om1ab(nVVab),X1ab(nVVab,nVVab),Y1ab(nOOab,nVVab), &
|
||||
Om2ab(nOOab),X2ab(nVVab,nOOab),Y2ab(nOOab,nOOab), &
|
||||
rho1ab(nBas,nBas,nVVab),rho2ab(nBas,nBas,nOOab), &
|
||||
Om1aa(nVVaa),X1aa(nVVaa,nVVaa),Y1aa(nOOaa,nVVaa), &
|
||||
Om2aa(nOOaa),X2aa(nVVaa,nOOaa),Y2aa(nOOaa,nOOaa), &
|
||||
rho1aa(nBas,nBas,nVVaa),rho2aa(nBas,nBas,nOOaa), &
|
||||
SigX(nBas),SigT(nBas),Z(nBas))
|
||||
|
||||
!----------------------------------------------
|
||||
@ -99,15 +99,14 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
ispin = 1
|
||||
iblock = 3
|
||||
! iblock = 1
|
||||
|
||||
! Compute linear response
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOs,nVVs,1d0,eHF,ERI_MO, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOab,nVVab,1d0,eHF,ERI_MO, &
|
||||
Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,EcRPA(ispin))
|
||||
|
||||
call print_excitation('pp-RPA (N+2)',iblock,nVVs,Omega1s(:))
|
||||
call print_excitation('pp-RPA (N-2)',iblock,nOOs,Omega2s(:))
|
||||
call print_excitation('pp-RPA (N+2)',iblock,nVVab,Om1ab(:))
|
||||
call print_excitation('pp-RPA (N-2)',iblock,nOOab,Om2ab(:))
|
||||
|
||||
!----------------------------------------------
|
||||
! alpha-alpha block
|
||||
@ -118,11 +117,11 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
! Compute linear response
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOt,nVVt,1d0,eHF,ERI_MO, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOaa,nVVaa,1d0,eHF,ERI_MO, &
|
||||
Om1aa,X1aa,Y1aa,Om2aa,X2aa,Y2aa,EcRPA(ispin))
|
||||
|
||||
call print_excitation('pp-RPA (N+2)',iblock,nVVt,Omega1t(:))
|
||||
call print_excitation('pp-RPA (N-2)',iblock,nOOt,Omega2t(:))
|
||||
call print_excitation('pp-RPA (N+2)',iblock,nVVaa,Om1aa(:))
|
||||
call print_excitation('pp-RPA (N-2)',iblock,nOOaa,Om2aa(:))
|
||||
|
||||
!----------------------------------------------
|
||||
! Compute T-matrix version of the self-energy
|
||||
@ -133,35 +132,34 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
Z(:) = 0d0
|
||||
|
||||
iblock = 3
|
||||
! iblock = 1
|
||||
|
||||
call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI_MO,X1s,Y1s,rho1s,X2s,Y2s,rho2s)
|
||||
call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOab,nVVab,ERI_MO,X1ab,Y1ab,rho1ab,X2ab,Y2ab,rho2ab)
|
||||
|
||||
if(regularize) then
|
||||
|
||||
call regularized_self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF,Omega1s,rho1s,Omega2s,rho2s,EcGM,SigT)
|
||||
call regularized_renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF,Omega1s,rho1s,Omega2s,rho2s,Z)
|
||||
call regularized_self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOab,nVVab,eHF,Om1ab,rho1ab,Om2ab,rho2ab,EcGM,SigT)
|
||||
call regularized_renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOab,nVVab,eHF,Om1ab,rho1ab,Om2ab,rho2ab,Z)
|
||||
|
||||
else
|
||||
|
||||
call self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF,Omega1s,rho1s,Omega2s,rho2s,EcGM,SigT)
|
||||
call renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF,Omega1s,rho1s,Omega2s,rho2s,Z)
|
||||
call self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOab,nVVab,eHF,Om1ab,rho1ab,Om2ab,rho2ab,EcGM,SigT)
|
||||
call renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOab,nVVab,eHF,Om1ab,rho1ab,Om2ab,rho2ab,Z)
|
||||
|
||||
end if
|
||||
|
||||
iblock = 4
|
||||
|
||||
call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI_MO,X1t,Y1t,rho1t,X2t,Y2t,rho2t)
|
||||
call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOaa,nVVaa,ERI_MO,X1aa,Y1aa,rho1aa,X2aa,Y2aa,rho2aa)
|
||||
|
||||
if(regularize) then
|
||||
|
||||
call regularized_self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF,Omega1t,rho1t,Omega2t,rho2t,EcGM,SigT)
|
||||
call regularized_renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF,Omega1t,rho1t,Omega2t,rho2t,Z)
|
||||
call regularized_self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,eHF,Om1aa,rho1aa,Om2aa,rho2aa,EcGM,SigT)
|
||||
call regularized_renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,eHF,Om1aa,rho1aa,Om2aa,rho2aa,Z)
|
||||
|
||||
else
|
||||
|
||||
call self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF,Omega1t,rho1t,Omega2t,rho2t,EcGM,SigT)
|
||||
call renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF,Omega1t,rho1t,Omega2t,rho2t,Z)
|
||||
call self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,eHF,Om1aa,rho1aa,Om2aa,rho2aa,EcGM,SigT)
|
||||
call renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOaa,nVVaa,eHF,Om1aa,rho1aa,Om2aa,rho2aa,Z)
|
||||
|
||||
end if
|
||||
|
||||
@ -179,11 +177,11 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
if(linearize) then
|
||||
|
||||
eG0T0(:) = eHF(:) + Z(:)*(SigX(:) + SigT(:) - Vxc(:))
|
||||
eGT(:) = eHF(:) + Z(:)*(SigX(:) + SigT(:) - Vxc(:))
|
||||
|
||||
else
|
||||
|
||||
eG0T0(:) = eHF(:) + SigX(:) + SigT(:) - Vxc(:)
|
||||
eGT(:) = eHF(:) + SigX(:) + SigT(:) - Vxc(:)
|
||||
|
||||
end if
|
||||
|
||||
@ -195,27 +193,27 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
ispin = 1
|
||||
iblock = 3
|
||||
! iblock = 1
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOs,nVVs,1d0,eG0T0,ERI_MO, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOab,nVVab,1d0,eGT,ERI_MO, &
|
||||
Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,EcRPA(ispin))
|
||||
ispin = 2
|
||||
iblock = 4
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOt,nVVt,1d0,eG0T0,ERI_MO, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
|
||||
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOaa,nVVaa,1d0,eGT,ERI_MO, &
|
||||
Om1aa,X1aa,Y1aa,Om2aa,X2aa,Y2aa,EcRPA(ispin))
|
||||
|
||||
EcRPA(1) = EcRPA(1) - EcRPA(2)
|
||||
EcRPA(2) = 3d0*EcRPA(2)
|
||||
|
||||
call print_G0T0(nBas,nO,eHF,ENuc,ERHF,SigT,Z,eG0T0,EcGM,EcRPA)
|
||||
call print_G0T0(nBas,nO,eHF,ENuc,ERHF,SigT,Z,eGT,EcGM,EcRPA)
|
||||
|
||||
! Perform BSE calculation
|
||||
|
||||
if(BSE) then
|
||||
|
||||
call Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,nOOt,nVVt, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,rho1s,rho2s,Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,rho1t,rho2t, &
|
||||
ERI_MO,dipole_int,eHF,eG0T0,EcBSE)
|
||||
call Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,nOOab,nVVab,nOOaa,nVVaa, &
|
||||
Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,rho1ab,rho2ab,Om1aa,X1aa,Y1aa,Om2aa,X2aa,Y2aa,rho1aa,rho2aa, &
|
||||
ERI_MO,dipole_int,eHF,eGT,EcBSE)
|
||||
|
||||
if(exchange_kernel) then
|
||||
|
||||
@ -250,8 +248,8 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
end if
|
||||
|
||||
call ACFDT_Tmatrix(exchange_kernel,doXBS,.false.,TDA_T,TDA,BSE,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS, &
|
||||
nOOs,nVVs,nOOt,nVVt,Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,rho1s,rho2s,Omega1t,X1t,Y1t, &
|
||||
Omega2t,X2t,Y2t,rho1t,rho2t,ERI_MO,eHF,eG0T0,EcAC)
|
||||
nOOab,nVVab,nOOaa,nVVaa,Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,rho1ab,rho2ab,Om1aa,X1aa,Y1aa, &
|
||||
Om2aa,X2aa,Y2aa,rho1aa,rho2aa,ERI_MO,eHF,eGT,EcAC)
|
||||
|
||||
if(exchange_kernel) then
|
||||
|
||||
@ -273,4 +271,21 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
end if
|
||||
|
||||
if(ppBSE) then
|
||||
|
||||
call Bethe_Salpeter_Tmatrix_pp(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nOOab,nVVab,nOOaa,nVVaa, &
|
||||
Om1ab,X1ab,Y1ab,Om2ab,X2ab,Y2ab,rho1ab,rho2ab,Om1aa,X1aa,Y1aa,Om2aa,X2aa,Y2aa,rho1aa,rho2aa, &
|
||||
ERI_MO,dipole_int,eHF,eGT,EcppBSE)
|
||||
|
||||
write(*,*)
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@ppBSE@G0T0 correlation energy (singlet) =',EcppBSE(1),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@ppBSE@G0T0 correlation energy (triplet) =',EcppBSE(2),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@ppBSE@G0T0 correlation energy =',EcppBSE(1) + EcppBSE(2),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@ppBSE@G0T0 total energy =',ENuc + ERHF + EcppBSE(1) + EcppBSE(2),' au'
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,*)
|
||||
|
||||
end if
|
||||
|
||||
end subroutine G0T0
|
||||
|
@ -1,6 +1,6 @@
|
||||
subroutine static_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,Omega1,rho1,Omega2,rho2,TA)
|
||||
|
||||
! Compute the OOVV block of the static T-matrix for the resonant block
|
||||
! Compute the OOVV block of the static T-matrix
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
@ -47,18 +47,16 @@ subroutine static_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,Omega1,rho1,O
|
||||
|
||||
do cd=1,nVV
|
||||
eps = + Omega1(cd)
|
||||
! chi = chi + lambda*rho1(i,b,cd)*rho1(a,j,cd)*eps/(eps**2 + eta**2)
|
||||
chi = chi + rho1(i,b,cd)*rho1(a,j,cd)*eps/(eps**2 + eta**2)
|
||||
|
||||
enddo
|
||||
|
||||
do kl=1,nOO
|
||||
eps = - Omega2(kl)
|
||||
! chi = chi + lambda*rho2(i,j,kl)*rho2(a,b,kl)*eps/(eps**2 + eta**2)
|
||||
chi = chi + rho2(i,b,kl)*rho2(a,j,kl)*eps/(eps**2 + eta**2)
|
||||
enddo
|
||||
|
||||
TA(ia,jb) = TA(ia,jb) + lambda*chi
|
||||
TA(ia,jb) = lambda*chi
|
||||
|
||||
enddo
|
||||
enddo
|
||||
|
@ -1,6 +1,6 @@
|
||||
subroutine static_Tmatrix_B(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,Omega1,rho1,Omega2,rho2,TB)
|
||||
|
||||
! Compute the OVVO block of the static T-matrix for the coupling block
|
||||
! Compute the OVVO block of the static T-matrix
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
@ -47,17 +47,15 @@ subroutine static_Tmatrix_B(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,Omega1,rho1,O
|
||||
|
||||
do cd=1,nVV
|
||||
eps = + Omega1(cd)
|
||||
! chi = chi + lambda*rho1(i,b,cd)*rho1(a,j,cd)*Omega1(cd)/Omega1(cd)**2 + eta**2
|
||||
chi = chi + rho1(i,j,cd)*rho1(a,b,cd)*eps/(eps**2 + eta**2)
|
||||
enddo
|
||||
|
||||
do kl=1,nOO
|
||||
eps = - Omega2(kl)
|
||||
! chi = chi + lambda*rho2(i,b,kl)*rho2(a,j,kl)*Omega2(kl)/Omega2(kl)**2 + eta**2
|
||||
chi = chi + rho2(i,j,kl)*rho2(a,b,kl)*eps/(eps**2 + eta**2)
|
||||
enddo
|
||||
|
||||
TB(ia,jb) = TB(ia,jb) + lambda*chi
|
||||
TB(ia,jb) = lambda*chi
|
||||
|
||||
enddo
|
||||
enddo
|
||||
|
151
src/GT/static_Tmatrix_B_pp.f90
Normal file
151
src/GT/static_Tmatrix_B_pp.f90
Normal file
@ -0,0 +1,151 @@
|
||||
subroutine static_Tmatrix_B_pp(ispin,eta,nBas,nC,nO,nV,nR,nOO,nVV,nOOx,nVVx,lambda,Om1,rho1,Om2,rho2,TB)
|
||||
|
||||
! Compute the VVOO block of the static T-matrix
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: ispin
|
||||
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) :: nOO
|
||||
integer,intent(in) :: nVV
|
||||
integer,intent(in) :: nOOx
|
||||
integer,intent(in) :: nVVx
|
||||
double precision,intent(in) :: lambda
|
||||
double precision,intent(in) :: Om1(nVV)
|
||||
double precision,intent(in) :: rho1(nBas,nBas,nVV)
|
||||
double precision,intent(in) :: Om2(nOO)
|
||||
double precision,intent(in) :: rho2(nBas,nBas,nOO)
|
||||
|
||||
! Local variables
|
||||
|
||||
double precision :: chi
|
||||
double precision :: eps
|
||||
integer :: i,j,a,b,ij,ab,cd,kl
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: TB(nVVx,nOOx)
|
||||
|
||||
!===============!
|
||||
! singlet block !
|
||||
!===============!
|
||||
|
||||
if(ispin == 1) then
|
||||
|
||||
ab = 0
|
||||
do a=nO+1,nBas-nR
|
||||
do b=a,nBas-nR
|
||||
ab = ab + 1
|
||||
|
||||
ij = 0
|
||||
do i=nC+1,nO
|
||||
do j=i,nO
|
||||
ij = ij + 1
|
||||
|
||||
chi = 0d0
|
||||
|
||||
do cd=1,nVV
|
||||
eps = + Om1(cd)
|
||||
chi = chi + rho1(a,b,cd)*rho1(i,j,cd)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
do kl=1,nOO
|
||||
eps = - Om2(kl)
|
||||
chi = chi + rho2(a,b,kl)*rho2(i,j,kl)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
TB(ab,ij) = lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
!===============!
|
||||
! triplet block !
|
||||
!===============!
|
||||
|
||||
if(ispin == 2 .or. ispin == 4) then
|
||||
|
||||
ab = 0
|
||||
do a=nO+1,nBas-nR
|
||||
do b=a+1,nBas-nR
|
||||
ab = ab + 1
|
||||
|
||||
ij = 0
|
||||
do i=nC+1,nO
|
||||
do j=i+1,nO
|
||||
ij = ij + 1
|
||||
|
||||
chi = 0d0
|
||||
|
||||
do cd=1,nVV
|
||||
eps = + Om1(cd)
|
||||
chi = chi + rho1(a,b,cd)*rho1(i,j,cd)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
do kl=1,nOO
|
||||
eps = - Om2(kl)
|
||||
chi = chi + rho2(a,b,kl)*rho2(i,j,kl)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
TB(ab,ij) = lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
!==================!
|
||||
! alpha-beta block !
|
||||
!==================!
|
||||
|
||||
if(ispin == 3) then
|
||||
|
||||
ab = 0
|
||||
do a=nO+1,nBas-nR
|
||||
do b=nO+1,nBas-nR
|
||||
ab = ab + 1
|
||||
|
||||
ij = 0
|
||||
do i=nC+1,nO
|
||||
do j=nC+1,nO
|
||||
ij = ij + 1
|
||||
|
||||
chi = 0d0
|
||||
|
||||
do cd=1,nVV
|
||||
eps = + Om1(cd)
|
||||
chi = chi + rho1(a,b,cd)*rho1(i,j,cd)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
do kl=1,nOO
|
||||
eps = - Om2(kl)
|
||||
chi = chi + rho2(a,b,kl)*rho2(i,j,kl)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
TB(ab,ij) = lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
end subroutine static_Tmatrix_B_pp
|
152
src/GT/static_Tmatrix_C_pp.f90
Normal file
152
src/GT/static_Tmatrix_C_pp.f90
Normal file
@ -0,0 +1,152 @@
|
||||
subroutine static_Tmatrix_C_pp(ispin,eta,nBas,nC,nO,nV,nR,nOO,nVV,nOOx,nVVx,lambda,Om1,rho1,Om2,rho2,TC)
|
||||
|
||||
! Compute the VVVV block of the static T-matrix
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: ispin
|
||||
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) :: nOO
|
||||
integer,intent(in) :: nVV
|
||||
integer,intent(in) :: nOOx
|
||||
integer,intent(in) :: nVVx
|
||||
double precision,intent(in) :: lambda
|
||||
double precision,intent(in) :: Om1(nVV)
|
||||
double precision,intent(in) :: rho1(nBas,nBas,nVV)
|
||||
double precision,intent(in) :: Om2(nOO)
|
||||
double precision,intent(in) :: rho2(nBas,nBas,nOO)
|
||||
|
||||
! Local variables
|
||||
|
||||
double precision,external :: Kronecker_delta
|
||||
double precision :: chi
|
||||
double precision :: eps
|
||||
integer :: a,b,c,d,ab,cd,ef,mn
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: TC(nVVx,nVVx)
|
||||
|
||||
!===============!
|
||||
! singlet block !
|
||||
!===============!
|
||||
|
||||
if(ispin == 1) then
|
||||
|
||||
ab = 0
|
||||
do a=nO+1,nBas-nR
|
||||
do b=a,nBas-nR
|
||||
ab = ab + 1
|
||||
|
||||
cd = 0
|
||||
do c=nO+1,nBas-nR
|
||||
do d=c,nBas-nR
|
||||
cd = cd + 1
|
||||
|
||||
chi = 0d0
|
||||
|
||||
do ef=1,nVV
|
||||
eps = + Om1(ef)
|
||||
chi = chi + rho1(a,b,ef)*rho1(c,d,ef)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
do mn=1,nOO
|
||||
eps = - Om2(mn)
|
||||
chi = chi + rho2(a,b,mn)*rho2(c,d,mn)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
TC(ab,cd) = lambda*chi/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(c,d)))
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
!===============!
|
||||
! triplet block !
|
||||
!===============!
|
||||
|
||||
if(ispin == 2 .or. ispin == 4) then
|
||||
|
||||
ab = 0
|
||||
do a=nO+1,nBas-nR
|
||||
do b=a+1,nBas-nR
|
||||
ab = ab + 1
|
||||
|
||||
cd = 0
|
||||
do c=nO+1,nBas-nR
|
||||
do d=c+1,nBas-nR
|
||||
cd = cd + 1
|
||||
|
||||
chi = 0d0
|
||||
|
||||
do ef=1,nVV
|
||||
eps = + Om1(ef)
|
||||
chi = chi + rho1(a,b,ef)*rho1(c,d,ef)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
do mn=1,nOO
|
||||
eps = - Om2(mn)
|
||||
chi = chi + rho2(a,b,mn)*rho2(c,d,mn)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
TC(ab,cd) = lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
!==================!
|
||||
! alpha-beta block !
|
||||
!==================!
|
||||
|
||||
if(ispin == 3) then
|
||||
|
||||
ab = 0
|
||||
do a=nO+1,nBas-nR
|
||||
do b=nO+1,nBas-nR
|
||||
ab = ab + 1
|
||||
|
||||
cd = 0
|
||||
do c=nO+1,nBas-nR
|
||||
do d=nO+1,nBas-nR
|
||||
cd = cd + 1
|
||||
|
||||
chi = 0d0
|
||||
|
||||
do ef=1,nVV
|
||||
eps = + Om1(ef)
|
||||
chi = chi + rho1(a,b,ef)*rho1(c,d,ef)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
do mn=1,nOO
|
||||
eps = - Om2(mn)
|
||||
chi = chi + rho2(a,b,mn)*rho2(c,d,mn)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
TC(ab,cd) = lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
end subroutine static_Tmatrix_C_pp
|
152
src/GT/static_Tmatrix_D_pp.f90
Normal file
152
src/GT/static_Tmatrix_D_pp.f90
Normal file
@ -0,0 +1,152 @@
|
||||
subroutine static_Tmatrix_D_pp(ispin,eta,nBas,nC,nO,nV,nR,nOO,nVV,nOOx,nVVx,lambda,Om1,rho1,Om2,rho2,TD)
|
||||
|
||||
! Compute the OOOO block of the static T-matrix
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: ispin
|
||||
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) :: nOO
|
||||
integer,intent(in) :: nVV
|
||||
integer,intent(in) :: nOOx
|
||||
integer,intent(in) :: nVVx
|
||||
double precision,intent(in) :: lambda
|
||||
double precision,intent(in) :: Om1(nVV)
|
||||
double precision,intent(in) :: rho1(nBas,nBas,nVV)
|
||||
double precision,intent(in) :: Om2(nOO)
|
||||
double precision,intent(in) :: rho2(nBas,nBas,nOO)
|
||||
|
||||
! Local variables
|
||||
|
||||
double precision :: chi
|
||||
double precision :: eps
|
||||
integer :: i,j,k,l,ij,kl,ef,mn
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: TD(nOOx,nOOx)
|
||||
|
||||
!===============!
|
||||
! singlet block !
|
||||
!===============!
|
||||
|
||||
if(ispin == 1) then
|
||||
|
||||
ij = 0
|
||||
do i=nC+1,nO
|
||||
do j=i,nO
|
||||
ij = ij + 1
|
||||
|
||||
kl = 0
|
||||
do k=nC+1,nO
|
||||
do l=k,nO
|
||||
kl = kl + 1
|
||||
|
||||
chi = 0d0
|
||||
|
||||
do ef=1,nVV
|
||||
eps = + Om1(ef)
|
||||
chi = chi + rho1(i,j,ef)*rho1(k,l,ef)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
do mn=1,nOO
|
||||
eps = - Om2(mn)
|
||||
chi = chi + rho2(i,j,mn)*rho2(k,l,mn)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
TD(ij,kl) = lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
!===============!
|
||||
! triplet block !
|
||||
!===============!
|
||||
|
||||
if(ispin == 2 .or. ispin == 4) then
|
||||
|
||||
ij = 0
|
||||
do i=nC+1,nO
|
||||
do j=i+1,nO
|
||||
ij = ij + 1
|
||||
|
||||
kl = 0
|
||||
do k=nC+1,nO
|
||||
do l=k+1,nO
|
||||
kl = kl + 1
|
||||
|
||||
chi = 0d0
|
||||
|
||||
do ef=1,nVV
|
||||
eps = + Om1(ef)
|
||||
chi = chi + rho1(i,j,ef)*rho1(k,l,ef)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
do mn=1,nOO
|
||||
eps = - Om2(mn)
|
||||
chi = chi + rho2(i,j,mn)*rho2(k,l,mn)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
TD(ij,kl) = lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
!==================!
|
||||
! alpha-beta block !
|
||||
!==================!
|
||||
|
||||
if(ispin == 3) then
|
||||
|
||||
ij = 0
|
||||
do i=nC+1,nO
|
||||
do j=nC+1,nO
|
||||
ij = ij + 1
|
||||
|
||||
kl = 0
|
||||
do k=nC+1,nO
|
||||
do l=nC+1,nO
|
||||
kl = kl + 1
|
||||
|
||||
chi = 0d0
|
||||
|
||||
do ef=1,nVV
|
||||
eps = + Om1(ef)
|
||||
chi = chi + rho1(i,j,ef)*rho1(k,l,ef)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
do mn=1,nOO
|
||||
eps = - Om2(mn)
|
||||
chi = chi + rho2(i,j,mn)*rho2(k,l,mn)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
|
||||
TD(ij,kl) = lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
|
||||
end if
|
||||
|
||||
end subroutine static_Tmatrix_D_pp
|
@ -75,6 +75,11 @@ subroutine Bethe_Salpeter_pp(TDA_W,TDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,E
|
||||
|
||||
if(singlet) then
|
||||
|
||||
write(*,*) '****************'
|
||||
write(*,*) '*** Singlets ***'
|
||||
write(*,*) '****************'
|
||||
write(*,*)
|
||||
|
||||
ispin = 1
|
||||
EcBSE(ispin) = 0d0
|
||||
|
||||
@ -109,6 +114,11 @@ subroutine Bethe_Salpeter_pp(TDA_W,TDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,E
|
||||
|
||||
if(triplet) then
|
||||
|
||||
write(*,*) '****************'
|
||||
write(*,*) '*** Triplets ***'
|
||||
write(*,*) '****************'
|
||||
write(*,*)
|
||||
|
||||
ispin = 2
|
||||
EcBSE(ispin) = 0d0
|
||||
|
||||
|
99
src/GW/Bethe_Salpeter_pp_so.f90
Normal file
99
src/GW/Bethe_Salpeter_pp_so.f90
Normal file
@ -0,0 +1,99 @@
|
||||
subroutine Bethe_Salpeter_pp_so(TDA_W,TDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI,dipole_int,eW,eGW,EcBSE)
|
||||
|
||||
! Compute the Bethe-Salpeter excitation energies at the pp level
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: TDA_W
|
||||
logical,intent(in) :: TDA
|
||||
logical,intent(in) :: singlet
|
||||
logical,intent(in) :: triplet
|
||||
|
||||
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) :: eW(nBas)
|
||||
double precision,intent(in) :: eGW(nBas)
|
||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: ispin
|
||||
integer :: isp_W
|
||||
|
||||
integer :: nOO
|
||||
integer :: nVV
|
||||
|
||||
double precision :: EcRPA
|
||||
double precision,allocatable :: OmRPA(:)
|
||||
double precision,allocatable :: XpY_RPA(:,:)
|
||||
double precision,allocatable :: XmY_RPA(:,:)
|
||||
double precision,allocatable :: rho_RPA(:,:,:)
|
||||
|
||||
double precision,allocatable :: Omega1(:)
|
||||
double precision,allocatable :: X1(:,:)
|
||||
double precision,allocatable :: Y1(:,:)
|
||||
|
||||
double precision,allocatable :: Omega2(:)
|
||||
double precision,allocatable :: X2(:,:)
|
||||
double precision,allocatable :: Y2(:,:)
|
||||
|
||||
double precision,allocatable :: WB(:,:)
|
||||
double precision,allocatable :: WC(:,:)
|
||||
double precision,allocatable :: WD(:,:)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: EcBSE(nspin)
|
||||
|
||||
!---------------------------------
|
||||
! Compute RPA screening
|
||||
!---------------------------------
|
||||
|
||||
isp_W = 3
|
||||
EcRPA = 0d0
|
||||
|
||||
! Memory allocation
|
||||
|
||||
allocate(OmRPA(nS),XpY_RPA(nS,nS),XmY_RPA(nS,nS),rho_RPA(nBas,nBas,nS))
|
||||
|
||||
call linear_response(isp_W,.true.,TDA_W,eta,nBas,nC,nO,nV,nR,nS,1d0,eW,ERI, &
|
||||
EcRPA,OmRPA,XpY_RPA,XmY_RPA)
|
||||
call excitation_density(nBas,nC,nO,nR,nS,ERI,XpY_RPA,rho_RPA)
|
||||
|
||||
write(*,*) '****************'
|
||||
write(*,*) '*** SpinOrbs ***'
|
||||
write(*,*) '****************'
|
||||
write(*,*)
|
||||
|
||||
ispin = 1
|
||||
EcBSE(:) = 0d0
|
||||
|
||||
nOO = nO*(nO-1)/2
|
||||
nVV = nV*(nV-1)/2
|
||||
|
||||
allocate(Omega1(nVV),X1(nVV,nVV),Y1(nOO,nVV), &
|
||||
Omega2(nOO),X2(nVV,nOO),Y2(nOO,nOO), &
|
||||
WB(nVV,nOO),WC(nVV,nVV),WD(nOO,nOO))
|
||||
|
||||
if(.not.TDA) call static_screening_WB_pp(4,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,1d0,ERI,OmRPA,rho_RPA,WB)
|
||||
call static_screening_WC_pp(4,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,1d0,ERI,OmRPA,rho_RPA,WC)
|
||||
call static_screening_WD_pp(4,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,1d0,ERI,OmRPA,rho_RPA,WD)
|
||||
|
||||
! Compute BSE excitation energies
|
||||
|
||||
call linear_response_pp_BSE(4,TDA,.true.,nBas,nC,nO,nV,nR,nOO,nVV,1d0,eGW,ERI,WB,WC,WD, &
|
||||
Omega1,X1,Y1,Omega2,X2,Y2,EcBSE(ispin))
|
||||
|
||||
call print_excitation('pp-BSE (N+2)',isp_W,nVV,Omega1)
|
||||
call print_excitation('pp-BSE (N-2)',isp_W,nOO,Omega2)
|
||||
|
||||
end subroutine Bethe_Salpeter_pp_so
|
@ -1,6 +1,6 @@
|
||||
subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,ppBSE, &
|
||||
singlet,triplet,linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,ERHF, &
|
||||
ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eG0W0)
|
||||
ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eGW)
|
||||
|
||||
! Perform G0W0 calculation
|
||||
|
||||
@ -60,11 +60,20 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evD
|
||||
double precision,allocatable :: XmY_RPA(:,:)
|
||||
double precision,allocatable :: rho_RPA(:,:,:)
|
||||
|
||||
double precision,allocatable :: eG0W0lin(:)
|
||||
double precision,allocatable :: eGWlin(:)
|
||||
|
||||
integer :: nBas2
|
||||
integer :: nC2
|
||||
integer :: nO2
|
||||
integer :: nV2
|
||||
integer :: nR2
|
||||
integer :: nS2
|
||||
|
||||
double precision,allocatable :: seHF(:),seGW(:),sERI(:,:,:,:)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision :: eG0W0(nBas)
|
||||
double precision :: eGW(nBas)
|
||||
|
||||
! Hello world
|
||||
|
||||
@ -105,7 +114,7 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evD
|
||||
|
||||
! Memory allocation
|
||||
|
||||
allocate(SigC(nBas),SigX(nBas),Z(nBas),OmRPA(nS),XpY_RPA(nS,nS),XmY_RPA(nS,nS),rho_RPA(nBas,nBas,nS),eG0W0lin(nBas))
|
||||
allocate(SigC(nBas),SigX(nBas),Z(nBas),OmRPA(nS),XpY_RPA(nS,nS),XmY_RPA(nS,nS),rho_RPA(nBas,nBas,nS),eGWlin(nBas))
|
||||
|
||||
!-------------------!
|
||||
! Compute screening !
|
||||
@ -144,7 +153,7 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evD
|
||||
! Solve the quasi-particle equation !
|
||||
!-----------------------------------!
|
||||
|
||||
eG0W0lin(:) = eHF(:) + Z(:)*(SigX(:) + SigC(:) - Vxc(:))
|
||||
eGWlin(:) = eHF(:) + Z(:)*(SigX(:) + SigC(:) - Vxc(:))
|
||||
|
||||
! Linearized or graphical solution?
|
||||
|
||||
@ -153,14 +162,14 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evD
|
||||
write(*,*) ' *** Quasiparticle energies obtained by linearization *** '
|
||||
write(*,*)
|
||||
|
||||
eG0W0(:) = eG0W0lin(:)
|
||||
eGW(:) = eGWlin(:)
|
||||
|
||||
else
|
||||
|
||||
write(*,*) ' *** Quasiparticle energies obtained by root search (experimental) *** '
|
||||
write(*,*)
|
||||
|
||||
call QP_graph(nBas,nC,nO,nV,nR,nS,eta,eHF,SigX,Vxc,OmRPA,rho_RPA,eG0W0lin,eG0W0)
|
||||
call QP_graph(nBas,nC,nO,nV,nR,nS,eta,eHF,SigX,Vxc,OmRPA,rho_RPA,eGWlin,eGW)
|
||||
|
||||
! Find all the roots of the QP equation if necessary
|
||||
|
||||
@ -170,18 +179,18 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evD
|
||||
|
||||
! Compute the RPA correlation energy
|
||||
|
||||
call linear_response(ispin,.true.,TDA_W,eta,nBas,nC,nO,nV,nR,nS,1d0,eG0W0,ERI_MO, &
|
||||
call linear_response(ispin,.true.,TDA_W,eta,nBas,nC,nO,nV,nR,nS,1d0,eGW,ERI_MO, &
|
||||
EcRPA,OmRPA,XpY_RPA,XmY_RPA)
|
||||
|
||||
!--------------!
|
||||
! Dump results !
|
||||
!--------------!
|
||||
|
||||
call print_G0W0(nBas,nO,eHF,ENuc,ERHF,SigC,Z,eG0W0,EcRPA,EcGM)
|
||||
call print_G0W0(nBas,nO,eHF,ENuc,ERHF,SigC,Z,eGW,EcRPA,EcGM)
|
||||
|
||||
! Deallocate memory
|
||||
|
||||
deallocate(SigC,Z,OmRPA,XpY_RPA,XmY_RPA,rho_RPA,eG0W0lin)
|
||||
deallocate(SigC,Z,OmRPA,XpY_RPA,XmY_RPA,rho_RPA,eGWlin)
|
||||
|
||||
! Plot stuff
|
||||
|
||||
@ -191,7 +200,7 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evD
|
||||
|
||||
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,eG0W0,EcBSE)
|
||||
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)
|
||||
|
||||
if(exchange_kernel) then
|
||||
|
||||
@ -202,10 +211,10 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evD
|
||||
|
||||
write(*,*)
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@BSE@G0W0 correlation energy (singlet) =',EcBSE(1)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@BSE@G0W0 correlation energy (triplet) =',EcBSE(2)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@BSE@G0W0 correlation energy =',EcBSE(1) + EcBSE(2)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@BSE@G0W0 total energy =',ENuc + ERHF + EcBSE(1) + EcBSE(2)
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@BSE@G0W0 correlation energy (singlet) =',EcBSE(1),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@BSE@G0W0 correlation energy (triplet) =',EcBSE(2),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@BSE@G0W0 correlation energy =',EcBSE(1) + EcBSE(2),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@BSE@G0W0 total energy =',ENuc + ERHF + EcBSE(1) + EcBSE(2),' au'
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,*)
|
||||
|
||||
@ -225,14 +234,14 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evD
|
||||
|
||||
end if
|
||||
|
||||
call ACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,BSE,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,eHF,eG0W0,EcAC)
|
||||
call ACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,BSE,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,eHF,eGW,EcAC)
|
||||
|
||||
write(*,*)
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,'(2X,A50,F20.10)') 'AC@BSE@G0W0 correlation energy (singlet) =',EcAC(1)
|
||||
write(*,'(2X,A50,F20.10)') 'AC@BSE@G0W0 correlation energy (triplet) =',EcAC(2)
|
||||
write(*,'(2X,A50,F20.10)') 'AC@BSE@G0W0 correlation energy =',EcAC(1) + EcAC(2)
|
||||
write(*,'(2X,A50,F20.10)') 'AC@BSE@G0W0 total energy =',ENuc + ERHF + EcAC(1) + EcAC(2)
|
||||
write(*,'(2X,A50,F20.10,A3)') 'AC@BSE@G0W0 correlation energy (singlet) =',EcAC(1),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'AC@BSE@G0W0 correlation energy (triplet) =',EcAC(2),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'AC@BSE@G0W0 correlation energy =',EcAC(1) + EcAC(2),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'AC@BSE@G0W0 total energy =',ENuc + ERHF + EcAC(1) + EcAC(2),' au'
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,*)
|
||||
|
||||
@ -242,17 +251,32 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evD
|
||||
|
||||
if(ppBSE) then
|
||||
|
||||
call Bethe_Salpeter_pp(TDA_W,TDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int,eHF,eG0W0,EcppBSE)
|
||||
call Bethe_Salpeter_pp(TDA_W,TDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int,eHF,eGW,EcppBSE)
|
||||
|
||||
write(*,*)
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 correlation energy (singlet) =',EcppBSE(1)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 correlation energy (triplet) =',3d0*EcppBSE(2)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 correlation energy =',EcppBSE(1) + 3d0*EcppBSE(2)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 total energy =',ENuc + ERHF + EcppBSE(1) + 3d0*EcppBSE(2)
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@ppBSE@G0W0 correlation energy (singlet) =',EcppBSE(1),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@ppBSE@G0W0 correlation energy (triplet) =',3d0*EcppBSE(2),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@ppBSE@G0W0 correlation energy =',EcppBSE(1) + 3d0*EcppBSE(2),' au'
|
||||
write(*,'(2X,A50,F20.10,A3)') 'Tr@ppBSE@G0W0 total energy =',ENuc + ERHF + EcppBSE(1) + 3d0*EcppBSE(2),' au'
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,*)
|
||||
|
||||
! nBas2 = 2*nBas
|
||||
! nO2 = 2*nO
|
||||
! nV2 = 2*nV
|
||||
! nC2 = 2*nC
|
||||
! nR2 = 2*nR
|
||||
! nS2 = nO2*nV2
|
||||
!
|
||||
! allocate(seHF(nBas2),seGW(nBas2),sERI(nBas2,nBas2,nBas2,nBas2))
|
||||
!
|
||||
! call spatial_to_spin_MO_energy(nBas,eHF,nBas2,seHF)
|
||||
! call spatial_to_spin_MO_energy(nBas,eGW,nBas2,seGW)
|
||||
! call spatial_to_spin_ERI(nBas,ERI_MO,nBas2,sERI)
|
||||
!
|
||||
! call Bethe_Salpeter_pp_so(TDA_W,TDA,singlet,triplet,eta,nBas2,nC2,nO2,nV2,nR2,nS2,sERI,dipole_int,seHF,seGW,EcppBSE)
|
||||
|
||||
end if
|
||||
|
||||
end subroutine G0W0
|
||||
|
@ -1,6 +1,5 @@
|
||||
subroutine evGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA, &
|
||||
G0W,GW0,dBSE,dTDA,evDyn,singlet,triplet,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,ERHF, &
|
||||
ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eG0W0)
|
||||
subroutine evGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,G0W,GW0,dBSE,dTDA,evDyn,ppBSE, &
|
||||
singlet,triplet,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eG0W0)
|
||||
|
||||
! Perform self-consistent eigenvalue-only GW calculation
|
||||
|
||||
@ -24,6 +23,7 @@ subroutine evGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,COHSEX,BSE,
|
||||
logical,intent(in) :: dBSE
|
||||
logical,intent(in) :: dTDA
|
||||
logical,intent(in) :: evDyn
|
||||
logical,intent(in) :: ppBSE
|
||||
logical,intent(in) :: G0W
|
||||
logical,intent(in) :: GW0
|
||||
logical,intent(in) :: singlet
|
||||
@ -57,6 +57,7 @@ subroutine evGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,COHSEX,BSE,
|
||||
double precision :: EcRPA
|
||||
double precision :: EcBSE(nspin)
|
||||
double precision :: EcAC(nspin)
|
||||
double precision :: EcppBSE(nspin)
|
||||
double precision :: EcGM
|
||||
double precision :: alpha
|
||||
double precision,allocatable :: error_diis(:,:)
|
||||
@ -71,6 +72,15 @@ subroutine evGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,COHSEX,BSE,
|
||||
double precision,allocatable :: XmY_RPA(:,:)
|
||||
double precision,allocatable :: rho_RPA(:,:,:)
|
||||
|
||||
integer :: nBas2
|
||||
integer :: nC2
|
||||
integer :: nO2
|
||||
integer :: nV2
|
||||
integer :: nR2
|
||||
integer :: nS2
|
||||
|
||||
double precision,allocatable :: seHF(:),seGW(:),sERI(:,:,:,:)
|
||||
|
||||
! Hello world
|
||||
|
||||
write(*,*)
|
||||
@ -309,4 +319,34 @@ subroutine evGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,COHSEX,BSE,
|
||||
|
||||
end if
|
||||
|
||||
if(ppBSE) then
|
||||
|
||||
call Bethe_Salpeter_pp(TDA_W,TDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI_MO,dipole_int,eHF,eGW,EcppBSE)
|
||||
|
||||
write(*,*)
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 correlation energy (singlet) =',EcppBSE(1)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 correlation energy (triplet) =',3d0*EcppBSE(2)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 correlation energy =',EcppBSE(1) + 3d0*EcppBSE(2)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 total energy =',ENuc + ERHF + EcppBSE(1) + 3d0*EcppBSE(2)
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,*)
|
||||
|
||||
nBas2 = 2*nBas
|
||||
nO2 = 2*nO
|
||||
nV2 = 2*nV
|
||||
nC2 = 2*nC
|
||||
nR2 = 2*nR
|
||||
nS2 = nO2*nV2
|
||||
|
||||
allocate(seHF(nBas2),seGW(nBas2),sERI(nBas2,nBas2,nBas2,nBas2))
|
||||
|
||||
call spatial_to_spin_MO_energy(nBas,eHF,nBas2,seHF)
|
||||
call spatial_to_spin_MO_energy(nBas,eGW,nBas2,seGW)
|
||||
call spatial_to_spin_ERI(nBas,ERI_MO,nBas2,sERI)
|
||||
|
||||
call Bethe_Salpeter_pp_so(TDA_W,TDA,singlet,triplet,eta,nBas2,nC2,nO2,nV2,nR2,nS2,sERI,dipole_int,seHF,seGW,EcppBSE)
|
||||
|
||||
end if
|
||||
|
||||
end subroutine evGW
|
||||
|
72
src/GW/renormalization_factor_so.f90
Normal file
72
src/GW/renormalization_factor_so.f90
Normal file
@ -0,0 +1,72 @@
|
||||
subroutine renormalization_factor_so(COHSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,Z)
|
||||
|
||||
! Compute renormalization factor for GW
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: COHSEX
|
||||
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) :: e(nBas)
|
||||
double precision,intent(in) :: Omega(nS)
|
||||
double precision,intent(in) :: rho(nBas,nBas,nS)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: p,i,a,jb
|
||||
double precision :: eps
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: Z(nBas)
|
||||
|
||||
! Initialize
|
||||
|
||||
Z(:) = 0d0
|
||||
|
||||
! static COHSEX approximation
|
||||
|
||||
if(COHSEX) then
|
||||
|
||||
Z(:) = 1d0
|
||||
return
|
||||
|
||||
else
|
||||
|
||||
! Occupied part of the correlation self-energy
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do i=nC+1,nO
|
||||
do jb=1,nS
|
||||
eps = e(p) - e(i) + Omega(jb)
|
||||
Z(p) = Z(p) - 1d0*rho(p,i,jb)**2*(eps/(eps**2 + eta**2))**2
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
! Virtual part of the correlation self-energy
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do a=nO+1,nBas-nR
|
||||
do jb=1,nS
|
||||
eps = e(p) - e(a) - Omega(jb)
|
||||
Z(p) = Z(p) - 1d0*rho(p,a,jb)**2*(eps/(eps**2 + eta**2))**2
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
! Compute renormalization factor from derivative of SigC
|
||||
|
||||
Z(:) = 1d0/(1d0 - Z(:))
|
||||
|
||||
end subroutine renormalization_factor_so
|
111
src/GW/self_energy_correlation_diag_so.f90
Normal file
111
src/GW/self_energy_correlation_diag_so.f90
Normal file
@ -0,0 +1,111 @@
|
||||
subroutine self_energy_correlation_diag_so(COHSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,EcGM,SigC)
|
||||
|
||||
! Compute diagonal of the correlation part of the self-energy
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: COHSEX
|
||||
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) :: e(nBas)
|
||||
double precision,intent(in) :: Omega(nS)
|
||||
double precision,intent(in) :: rho(nBas,nBas,nS)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: i,a,p,q,jb
|
||||
double precision :: eps
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: SigC(nBas)
|
||||
double precision,intent(out) :: EcGM
|
||||
|
||||
! Initialize
|
||||
|
||||
SigC(:) = 0d0
|
||||
|
||||
!-----------------------------
|
||||
! COHSEX static self-energy
|
||||
!-----------------------------
|
||||
|
||||
if(COHSEX) then
|
||||
|
||||
! COHSEX: SEX part of the COHSEX correlation self-energy
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do i=nC+1,nO
|
||||
do jb=1,nS
|
||||
SigC(p) = SigC(p) + 2d0*rho(p,i,jb)**2/Omega(jb)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
! COHSEX: COH part of the COHSEX correlation self-energy
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do q=nC+1,nBas-nR
|
||||
do jb=1,nS
|
||||
SigC(p) = SigC(p) - rho(p,q,jb)**2/Omega(jb)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
! GM correlation energy
|
||||
|
||||
EcGM = 0d0
|
||||
do i=nC+1,nO
|
||||
EcGM = EcGM - SigC(i)
|
||||
end do
|
||||
|
||||
!-----------------------------
|
||||
! GW self-energy
|
||||
!-----------------------------
|
||||
|
||||
else
|
||||
|
||||
! Occupied part of the correlation self-energy
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do i=nC+1,nO
|
||||
do jb=1,nS
|
||||
eps = e(p) - e(i) + Omega(jb)
|
||||
SigC(p) = SigC(p) + rho(p,i,jb)**2*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
! Virtual part of the correlation self-energy
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do a=nO+1,nBas-nR
|
||||
do jb=1,nS
|
||||
eps = e(p) - e(a) - Omega(jb)
|
||||
SigC(p) = SigC(p) + rho(p,a,jb)**2*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
! GM correlation energy
|
||||
|
||||
EcGM = 0d0
|
||||
do i=nC+1,nO
|
||||
do a=nO+1,nBas-nR
|
||||
do jb=1,nS
|
||||
eps = e(a) - e(i) + Omega(jb)
|
||||
EcGM = EcGM - 2d0*rho(a,i,jb)*rho(a,i,jb)*eps/(eps**2 + eta**2)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
end subroutine self_energy_correlation_diag_so
|
213
src/GW/soG0W0.f90
Normal file
213
src/GW/soG0W0.f90
Normal file
@ -0,0 +1,213 @@
|
||||
subroutine soG0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,ppBSE, &
|
||||
singlet,triplet,linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,ERHF, &
|
||||
ERI_AO,ERI_MO,dipole_int,PHF,cHF,eHF,Vxc,eGW)
|
||||
|
||||
! Perform G0W0 calculation in the spin-orbital basis
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
include 'quadrature.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: doACFDT
|
||||
logical,intent(in) :: exchange_kernel
|
||||
logical,intent(in) :: doXBS
|
||||
logical,intent(in) :: COHSEX
|
||||
logical,intent(in) :: BSE
|
||||
logical,intent(in) :: ppBSE
|
||||
logical,intent(in) :: TDA_W
|
||||
logical,intent(in) :: TDA
|
||||
logical,intent(in) :: dBSE
|
||||
logical,intent(in) :: dTDA
|
||||
logical,intent(in) :: evDyn
|
||||
logical,intent(in) :: singlet
|
||||
logical,intent(in) :: triplet
|
||||
logical,intent(in) :: linearize
|
||||
double precision,intent(in) :: eta
|
||||
logical,intent(in) :: regularize
|
||||
|
||||
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) :: ENuc
|
||||
double precision,intent(in) :: ERHF
|
||||
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) :: Vxc(nBas)
|
||||
double precision,intent(in) :: eHF(nBas)
|
||||
double precision,intent(in) :: cHF(nBas,nBas)
|
||||
double precision,intent(in) :: PHF(nBas,nBas)
|
||||
|
||||
! Local variables
|
||||
|
||||
logical :: print_W = .true.
|
||||
integer :: ispin
|
||||
double precision :: EcRPA
|
||||
double precision :: EcBSE(nspin)
|
||||
double precision :: EcAC(nspin)
|
||||
double precision :: EcppBSE(nspin)
|
||||
double precision :: EcGM
|
||||
double precision,allocatable :: SigC(:)
|
||||
double precision,allocatable :: Z(:)
|
||||
double precision,allocatable :: OmRPA(:)
|
||||
double precision,allocatable :: XpY_RPA(:,:)
|
||||
double precision,allocatable :: XmY_RPA(:,:)
|
||||
double precision,allocatable :: rho_RPA(:,:,:)
|
||||
|
||||
double precision,allocatable :: eGWlin(:)
|
||||
|
||||
integer :: nBas2
|
||||
integer :: nC2
|
||||
integer :: nO2
|
||||
integer :: nV2
|
||||
integer :: nR2
|
||||
integer :: nS2
|
||||
|
||||
double precision,allocatable :: seHF(:),seGW(:),sERI(:,:,:,:)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision :: eGW(nBas)
|
||||
|
||||
! Hello world
|
||||
|
||||
write(*,*)
|
||||
write(*,*)'************************************************'
|
||||
write(*,*)'| One-shot soG0W0 calculation |'
|
||||
write(*,*)'************************************************'
|
||||
write(*,*)
|
||||
|
||||
! Initialization
|
||||
|
||||
EcRPA = 0d0
|
||||
|
||||
! COHSEX approximation
|
||||
|
||||
if(COHSEX) then
|
||||
write(*,*) 'COHSEX approximation activated!'
|
||||
write(*,*)
|
||||
end if
|
||||
|
||||
! TDA for W
|
||||
|
||||
if(TDA_W) then
|
||||
write(*,*) 'Tamm-Dancoff approximation for dynamic screening!'
|
||||
write(*,*)
|
||||
end if
|
||||
|
||||
! TDA
|
||||
|
||||
if(TDA) then
|
||||
write(*,*) 'Tamm-Dancoff approximation activated!'
|
||||
write(*,*)
|
||||
end if
|
||||
|
||||
! spatial to spin transformation
|
||||
|
||||
nBas2 = 2*nBas
|
||||
nO2 = 2*nO
|
||||
nV2 = 2*nV
|
||||
nC2 = 2*nC
|
||||
nR2 = 2*nR
|
||||
nS2 = nO2*nV2
|
||||
|
||||
allocate(seHF(nBas2),seGW(nBas2),sERI(nBas2,nBas2,nBas2,nBas2))
|
||||
|
||||
call spatial_to_spin_MO_energy(nBas,eHF,nBas2,seHF)
|
||||
call spatial_to_spin_MO_energy(nBas,eGW,nBas2,seGW)
|
||||
call spatial_to_spin_ERI(nBas,ERI_MO,nBas2,sERI)
|
||||
|
||||
! Spin manifold
|
||||
|
||||
ispin = 3
|
||||
|
||||
! Memory allocation
|
||||
|
||||
allocate(SigC(nBas2),Z(nBas2),OmRPA(nS2),XpY_RPA(nS2,nS2),XmY_RPA(nS2,nS2),rho_RPA(nBas2,nBas2,nS2),eGWlin(nBas2))
|
||||
|
||||
!-------------------!
|
||||
! Compute screening !
|
||||
!-------------------!
|
||||
|
||||
call linear_response(ispin,.true.,TDA_W,eta,nBas2,nC2,nO2,nV2,nR2,nS2,1d0, &
|
||||
seHF,sERI,EcRPA,OmRPA,XpY_RPA,XmY_RPA)
|
||||
|
||||
if(print_W) call print_excitation('RPA@HF ',ispin,nS2,OmRPA)
|
||||
|
||||
!--------------------------!
|
||||
! Compute spectral weights !
|
||||
!--------------------------!
|
||||
|
||||
call excitation_density(nBas2,nC2,nO2,nR2,nS2,sERI,XpY_RPA,rho_RPA)
|
||||
|
||||
!------------------------!
|
||||
! Compute GW self-energy !
|
||||
!------------------------!
|
||||
|
||||
if(regularize) then
|
||||
|
||||
call regularized_self_energy_correlation_diag(COHSEX,eta,nBas,nC,nO,nV,nR,nS,eHF,OmRPA,rho_RPA,EcGM,SigC)
|
||||
call regularized_renormalization_factor(COHSEX,eta,nBas,nC,nO,nV,nR,nS,eHF,OmRPA,rho_RPA,Z)
|
||||
|
||||
else
|
||||
|
||||
call self_energy_correlation_diag_so(COHSEX,eta,nBas2,nC2,nO2,nV2,nR2,nS2,seHF,OmRPA,rho_RPA,EcGM,SigC)
|
||||
call renormalization_factor_so(COHSEX,eta,nBas2,nC2,nO2,nV2,nR2,nS2,seHF,OmRPA,rho_RPA,Z)
|
||||
|
||||
end if
|
||||
|
||||
!-----------------------------------!
|
||||
! Solve the quasi-particle equation !
|
||||
!-----------------------------------!
|
||||
|
||||
eGWlin(:) = seHF(:) + Z(:)*SigC(:)
|
||||
|
||||
! Linearized or graphical solution?
|
||||
|
||||
if(linearize) then
|
||||
|
||||
write(*,*) ' *** Quasiparticle energies obtained by linearization *** '
|
||||
write(*,*)
|
||||
|
||||
seGW(:) = eGWlin(:)
|
||||
|
||||
end if
|
||||
|
||||
! Compute the RPA correlation energy
|
||||
|
||||
call linear_response(ispin,.true.,TDA_W,eta,nBas2,nC2,nO2,nV2,nR2,nS2,1d0,seGW,sERI, &
|
||||
EcRPA,OmRPA,XpY_RPA,XmY_RPA)
|
||||
|
||||
!--------------!
|
||||
! Dump results !
|
||||
!--------------!
|
||||
|
||||
call print_G0W0(nBas2,nO2,seHF,ENuc,ERHF,SigC,Z,seGW,EcRPA,EcGM)
|
||||
|
||||
! Deallocate memory
|
||||
|
||||
deallocate(SigC,Z,OmRPA,XpY_RPA,XmY_RPA,rho_RPA,eGWlin)
|
||||
|
||||
! Perform BSE calculation
|
||||
|
||||
if(ppBSE) then
|
||||
|
||||
call Bethe_Salpeter_pp_so(TDA_W,TDA,singlet,triplet,eta,nBas2,nC2,nO2,nV2,nR2,nS2,sERI,dipole_int,seHF,seGW,EcppBSE)
|
||||
|
||||
write(*,*)
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 correlation energy (singlet) =',EcppBSE(1)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 correlation energy (triplet) =',3d0*EcppBSE(2)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 correlation energy =',EcppBSE(1) + 3d0*EcppBSE(2)
|
||||
write(*,'(2X,A50,F20.10)') 'Tr@ppBSE@G0W0 total energy =',ENuc + ERHF + EcppBSE(1) + 3d0*EcppBSE(2)
|
||||
write(*,*)'-------------------------------------------------------------------------------'
|
||||
write(*,*)
|
||||
|
||||
end if
|
||||
|
||||
end subroutine soG0W0
|
@ -55,10 +55,11 @@ subroutine static_screening_WB_pp(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,E
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(a,j,m)*rho(b,i,m)*Omega(m)/eps
|
||||
chi = chi + rho(a,i,m)*rho(b,j,m)*Omega(m)/eps &
|
||||
+ rho(a,j,m)*rho(b,i,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WB(ab,ij) = WB(ab,ij) + 4d0*lambda*chi/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(i,j)))
|
||||
WB(ab,ij) = + 4d0*lambda*chi/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(i,j)))
|
||||
|
||||
end do
|
||||
end do
|
||||
@ -85,10 +86,42 @@ subroutine static_screening_WB_pp(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,E
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(a,j,m)*rho(b,i,m)*Omega(m)/eps
|
||||
chi = chi + rho(a,i,m)*rho(b,j,m)*Omega(m)/eps &
|
||||
- rho(a,j,m)*rho(b,i,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WB(ab,ij) = WB(ab,ij) - 4d0*lambda*chi
|
||||
WB(ab,ij) = + 4d0*lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
!---------------!
|
||||
! SpinOrb block !
|
||||
!---------------!
|
||||
|
||||
if(ispin == 4) then
|
||||
|
||||
ab = 0
|
||||
do a=nO+1,nBas-nR
|
||||
do b=a+1,nBas-nR
|
||||
ab = ab + 1
|
||||
ij = 0
|
||||
do i=nC+1,nO
|
||||
do j=i+1,nO
|
||||
ij = ij + 1
|
||||
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(a,i,m)*rho(b,j,m)*Omega(m)/eps &
|
||||
- rho(a,j,m)*rho(b,i,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WB(ab,ij) = + 2d0*lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
@ -52,13 +52,14 @@ subroutine static_screening_WC_pp(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,E
|
||||
do d=c,nBas-nR
|
||||
cd = cd + 1
|
||||
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(a,d,m)*rho(b,c,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WC(ab,cd) = WC(ab,cd) + 4d0*lambda*chi/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(c,d)))
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(a,c,m)*rho(b,d,m)*Omega(m)/eps &
|
||||
- rho(a,d,m)*rho(b,c,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WC(ab,cd) = + 4d0*lambda*chi/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(c,d)))
|
||||
|
||||
end do
|
||||
end do
|
||||
@ -85,10 +86,42 @@ subroutine static_screening_WC_pp(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,E
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(a,d,m)*rho(b,c,m)*Omega(m)/eps
|
||||
chi = chi + rho(a,c,m)*rho(b,d,m)*Omega(m)/eps &
|
||||
- rho(a,d,m)*rho(b,c,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WC(ab,cd) = WC(ab,cd) - 4d0*lambda*chi
|
||||
WC(ab,cd) = + 4d0*lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
!---------------!
|
||||
! SpinOrb block !
|
||||
!---------------!
|
||||
|
||||
if(ispin == 4) then
|
||||
|
||||
ab = 0
|
||||
do a=nO+1,nBas-nR
|
||||
do b=a+1,nBas-nR
|
||||
ab = ab + 1
|
||||
cd = 0
|
||||
do c=nO+1,nBas-nR
|
||||
do d=c+1,nBas-nR
|
||||
cd = cd + 1
|
||||
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(a,c,m)*rho(b,d,m)*Omega(m)/eps &
|
||||
- rho(a,d,m)*rho(b,c,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WC(ab,cd) = + 2d0*lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
@ -55,10 +55,11 @@ subroutine static_screening_WD_pp(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,E
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(i,l,m)*rho(j,k,m)*Omega(m)/eps
|
||||
chi = chi + rho(i,k,m)*rho(j,l,m)*Omega(m)/eps &
|
||||
+ rho(i,l,m)*rho(j,k,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WD(ij,kl) = WD(ij,kl) + 4d0*lambda*chi/sqrt((1d0 + Kronecker_delta(i,j))*(1d0 + Kronecker_delta(k,l)))
|
||||
WD(ij,kl) = + 4d0*lambda*chi/sqrt((1d0 + Kronecker_delta(i,j))*(1d0 + Kronecker_delta(k,l)))
|
||||
|
||||
end do
|
||||
end do
|
||||
@ -85,10 +86,42 @@ subroutine static_screening_WD_pp(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,E
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(i,l,m)*rho(j,k,m)*Omega(m)/eps
|
||||
chi = chi + rho(i,k,m)*rho(j,l,m)*Omega(m)/eps &
|
||||
- rho(i,l,m)*rho(j,k,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WD(ij,kl) = WD(ij,kl) - 4d0*lambda*chi
|
||||
WD(ij,kl) = + 4d0*lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
!---------------!
|
||||
! SpinOrb block !
|
||||
!---------------!
|
||||
|
||||
if(ispin == 4) then
|
||||
|
||||
ij = 0
|
||||
do i=nC+1,nO
|
||||
do j=i+1,nO
|
||||
ij = ij + 1
|
||||
kl = 0
|
||||
do k=nC+1,nO
|
||||
do l=k+1,nO
|
||||
kl = kl + 1
|
||||
|
||||
chi = 0d0
|
||||
do m=1,nS
|
||||
eps = Omega(m)**2 + eta**2
|
||||
chi = chi + rho(i,k,m)*rho(j,l,m)*Omega(m)/eps &
|
||||
- rho(i,l,m)*rho(j,k,m)*Omega(m)/eps
|
||||
enddo
|
||||
|
||||
WD(ij,kl) = + 2d0*lambda*chi
|
||||
|
||||
end do
|
||||
end do
|
||||
|
@ -69,7 +69,7 @@ subroutine linear_response_pp(ispin,TDA,nBas,nC,nO,nV,nR,nOO,nVV,lambda,e,ERI,Om
|
||||
X1(:,:) = +C(:,:)
|
||||
Y1(:,:) = 0d0
|
||||
if(nVV > 0) call diagonalize_matrix(nVV,X1,Omega1)
|
||||
|
||||
|
||||
X2(:,:) = 0d0
|
||||
Y2(:,:) = -D(:,:)
|
||||
if(nOO > 0) call diagonalize_matrix(nOO,Y2,Omega2)
|
||||
|
@ -28,7 +28,7 @@ subroutine oscillator_strength(nBas,nC,nO,nV,nR,nS,maxS,dipole_int,Omega,XpY,XmY
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision :: os(nS)
|
||||
double precision,intent(out) :: os(nS)
|
||||
|
||||
! Memory allocation
|
||||
|
||||
|
125
src/LR/oscillator_strength_pp.f90
Normal file
125
src/LR/oscillator_strength_pp.f90
Normal file
@ -0,0 +1,125 @@
|
||||
subroutine oscillator_strength_pp(nBas,nC,nO,nV,nR,nOO,nVV,maxOO,maxVV,dipole_int,Omega1,X1,Y1,Omega2,X2,Y2,os1,os2)
|
||||
|
||||
! Compute linear response
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: nBas
|
||||
integer,intent(in) :: nC
|
||||
integer,intent(in) :: nO
|
||||
integer,intent(in) :: nV
|
||||
integer,intent(in) :: nR
|
||||
integer,intent(in) :: nOO
|
||||
integer,intent(in) :: nVV
|
||||
integer,intent(in) :: maxOO
|
||||
integer,intent(in) :: maxVV
|
||||
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
||||
double precision,intent(in) :: Omega1(nVV)
|
||||
double precision,intent(in) :: X1(nVV,nVV)
|
||||
double precision,intent(in) :: Y1(nOO,nVV)
|
||||
double precision,intent(in) :: Omega2(nOO)
|
||||
double precision,intent(in) :: X2(nVV,nOO)
|
||||
double precision,intent(in) :: Y2(nOO,nOO)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: a,b,c,d,ab,cd
|
||||
integer :: i,j,k,l,ij,kl
|
||||
integer :: ixyz
|
||||
|
||||
double precision,allocatable :: f1(:,:)
|
||||
double precision,allocatable :: f2(:,:)
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: os1(nVV)
|
||||
double precision,intent(out) :: os2(nOO)
|
||||
|
||||
! Memory allocation
|
||||
|
||||
allocate(f1(maxVV,ncart),f2(maxOO,ncart))
|
||||
|
||||
! Initialization
|
||||
|
||||
f1(:,:) = 0d0
|
||||
f2(:,:) = 0d0
|
||||
|
||||
! Compute dipole moments and oscillator strengths
|
||||
|
||||
do ab=1,maxVV
|
||||
do ixyz=1,ncart
|
||||
|
||||
cd = 0
|
||||
do c=nO+1,nBas-nR
|
||||
do d=c,nBas-nR
|
||||
cd = cd + 1
|
||||
f1(ab,ixyz) = f1(ab,ixyz) + dipole_int(c,d,ixyz)*X1(cd,ab)
|
||||
end do
|
||||
end do
|
||||
|
||||
kl = 0
|
||||
do k=nC+1,nO
|
||||
do l=k,nO
|
||||
kl = kl + 1
|
||||
f1(ab,ixyz) = f1(ab,ixyz) + dipole_int(k,l,ixyz)*Y1(kl,ab)
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
f1(:,:) = sqrt(2d0)*f1(:,:)
|
||||
|
||||
do ab=1,maxVV
|
||||
os1(ab) = +2d0/3d0*abs(Omega1(ab))*sum(f1(ab,:)**2)
|
||||
end do
|
||||
|
||||
|
||||
do ij=1,maxOO
|
||||
do ixyz=1,ncart
|
||||
|
||||
cd = 0
|
||||
do c=nO+1,nBas-nR
|
||||
do d=c,nBas-nR
|
||||
cd = cd + 1
|
||||
f2(ij,ixyz) = f2(ij,ixyz) + dipole_int(c,d,ixyz)*X2(cd,ij)
|
||||
end do
|
||||
end do
|
||||
|
||||
kl = 0
|
||||
do k=nC+1,nO
|
||||
do l=k,nO
|
||||
kl = kl + 1
|
||||
f2(ij,ixyz) = f2(ij,ixyz) + dipole_int(k,l,ixyz)*Y2(kl,ij)
|
||||
end do
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
f2(:,:) = sqrt(2d0)*f2(:,:)
|
||||
|
||||
do ij=1,maxOO
|
||||
os2(ij) = 2d0/3d0*abs(Omega2(ij))*sum(f2(ij,:)**2)
|
||||
end do
|
||||
|
||||
write(*,*) '---------------------------------------------------------------'
|
||||
write(*,*) ' Transition dipole moment N -> N+2 (au) '
|
||||
write(*,*) '---------------------------------------------------------------'
|
||||
write(*,'(A3,5A12)') '#','X','Y','Z','dip. str.','osc. str.'
|
||||
write(*,*) '---------------------------------------------------------------'
|
||||
do ab=1,maxVV
|
||||
write(*,'(I3,5F12.6)') ab,(f1(ab,ixyz),ixyz=1,ncart),sum(f1(ab,:)**2),os1(ab)
|
||||
end do
|
||||
write(*,*)
|
||||
write(*,*) '---------------------------------------------------------------'
|
||||
write(*,*) ' Transition dipole moment N -> N-2 (au) '
|
||||
write(*,*) '---------------------------------------------------------------'
|
||||
do ij=1,maxOO
|
||||
write(*,'(I3,5F12.6)') ij,(f2(ij,ixyz),ixyz=1,ncart),sum(f2(ij,:)**2),os2(ij)
|
||||
end do
|
||||
write(*,*) '---------------------------------------------------------------'
|
||||
write(*,*)
|
||||
|
||||
end subroutine oscillator_strength_pp
|
@ -33,7 +33,7 @@ subroutine print_excitation(method,ispin,nS,Omega)
|
||||
'|','State','|',' Excitation energy (au) ','|',' Excitation energy (eV) ','|'
|
||||
write(*,*)'-------------------------------------------------------------'
|
||||
|
||||
do ia=1,min(nS,maxS)
|
||||
do ia=1,maxS
|
||||
write(*,'(1X,A1,1X,I5,1X,A1,1X,F23.6,1X,A1,1X,F23.6,1X,A1,1X)') &
|
||||
'|',ia,'|',Omega(ia),'|',Omega(ia)*HaToeV,'|'
|
||||
enddo
|
||||
|
@ -15,13 +15,13 @@ subroutine print_transition_vectors_pp(spin_allowed,nBas,nC,nO,nV,nR,nOO,nVV,dip
|
||||
integer,intent(in) :: nR
|
||||
integer,intent(in) :: nOO
|
||||
integer,intent(in) :: nVV
|
||||
double precision :: dipole_int(nBas,nBas,ncart)
|
||||
double precision,intent(out) :: Omega1(nVV)
|
||||
double precision,intent(out) :: X1(nVV,nVV)
|
||||
double precision,intent(out) :: Y1(nOO,nVV)
|
||||
double precision,intent(out) :: Omega2(nOO)
|
||||
double precision,intent(out) :: X2(nVV,nOO)
|
||||
double precision,intent(out) :: Y2(nOO,nOO)
|
||||
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
||||
double precision,intent(in) :: Omega1(nVV)
|
||||
double precision,intent(in) :: X1(nVV,nVV)
|
||||
double precision,intent(in) :: Y1(nOO,nVV)
|
||||
double precision,intent(in) :: Omega2(nOO)
|
||||
double precision,intent(in) :: X2(nVV,nOO)
|
||||
double precision,intent(in) :: Y2(nOO,nOO)
|
||||
|
||||
! Local variables
|
||||
|
||||
@ -46,12 +46,18 @@ subroutine print_transition_vectors_pp(spin_allowed,nBas,nC,nO,nV,nR,nOO,nVV,dip
|
||||
os1(:) = 0d0
|
||||
os2(:) = 0d0
|
||||
|
||||
! if(spin_allowed) call oscillator_strength(nBas,nC,nO,nV,nR,nS,maxS,dipole_int,Omega,XpY,XmY,os)
|
||||
if(spin_allowed) &
|
||||
call oscillator_strength_pp(nBas,nC,nO,nV,nR,nOO,nVV,maxOO,maxVV,dipole_int,Omega1,X1,Y1,Omega2,X2,Y2,os1,os2)
|
||||
|
||||
!-----------------------------------------------!
|
||||
! Print details about excitations for pp sector !
|
||||
!-----------------------------------------------!
|
||||
|
||||
write(*,*) '*****************************'
|
||||
write(*,*) '*** (N+2)-electron states ***'
|
||||
write(*,*) '*****************************'
|
||||
write(*,*)
|
||||
|
||||
do ab=1,maxVV
|
||||
|
||||
! <S**2> values
|
||||
@ -63,7 +69,7 @@ subroutine print_transition_vectors_pp(spin_allowed,nBas,nC,nO,nV,nR,nOO,nVV,dip
|
||||
end if
|
||||
|
||||
print*,'-------------------------------------------------------------'
|
||||
write(*,'(A20,I3,A2,F10.4,A3,A6,F6.4,A11,F6.4)') &
|
||||
write(*,'(A20,I3,A2,F10.6,A3,A6,F6.4,A11,F6.4)') &
|
||||
' p-p excitation n. ',ab,': ',Omega1(ab)*HaToeV,' eV',' f = ',os1(ab),' <S**2> = ',S2
|
||||
print*,'-------------------------------------------------------------'
|
||||
|
||||
@ -111,13 +117,18 @@ subroutine print_transition_vectors_pp(spin_allowed,nBas,nC,nO,nV,nR,nOO,nVV,dip
|
||||
|
||||
! Thomas-Reiche-Kuhn sum rule
|
||||
|
||||
write(*,'(A50,F10.6)') 'Thomas-Reiche-Kuhn sum rule for p-p sector = ',sum(os1(:))
|
||||
if(nVV > 0) write(*,'(A50,F10.6)') 'Thomas-Reiche-Kuhn sum rule for p-p sector = ',sum(os1(:))
|
||||
write(*,*)
|
||||
|
||||
!-----------------------------------------------!
|
||||
! Print details about excitations for hh sector !
|
||||
!-----------------------------------------------!
|
||||
|
||||
write(*,*) '*****************************'
|
||||
write(*,*) '*** (N-2)-electron states ***'
|
||||
write(*,*) '*****************************'
|
||||
write(*,*)
|
||||
|
||||
do ij=nOO,nOO-maxOO+1,-1
|
||||
|
||||
! <S**2> values
|
||||
@ -129,7 +140,7 @@ subroutine print_transition_vectors_pp(spin_allowed,nBas,nC,nO,nV,nR,nOO,nVV,dip
|
||||
end if
|
||||
|
||||
print*,'-------------------------------------------------------------'
|
||||
write(*,'(A20,I3,A2,F10.4,A3,A6,F6.4,A11,F6.4)') &
|
||||
write(*,'(A20,I3,A2,F10.6,A3,A6,F6.4,A11,F6.4)') &
|
||||
' h-h excitation n. ',ij,': ',Omega2(ij)*HaToeV,' eV',' f = ',os2(ij),' <S**2> = ',S2
|
||||
print*,'-------------------------------------------------------------'
|
||||
|
||||
@ -177,7 +188,7 @@ subroutine print_transition_vectors_pp(spin_allowed,nBas,nC,nO,nV,nR,nOO,nVV,dip
|
||||
|
||||
! Thomas-Reiche-Kuhn sum rule
|
||||
|
||||
write(*,'(A50,F10.6)') 'Thomas-Reiche-Kuhn sum rule for h-h sector = ',sum(os2(:))
|
||||
if(nOO > 0) write(*,'(A50,F10.6)') 'Thomas-Reiche-Kuhn sum rule for h-h sector = ',sum(os2(:))
|
||||
write(*,*)
|
||||
|
||||
end subroutine print_transition_vectors_pp
|
||||
|
@ -575,14 +575,23 @@ program QuAcK
|
||||
if(doCCD) then
|
||||
|
||||
call cpu_time(start_CCD)
|
||||
call CCD(maxSCF_CC,thresh_CC,n_diis_CC,nBas,nC,nO,nV,nR, &
|
||||
ERI_MO,ENuc,ERHF,eHF)
|
||||
call CCD(.false.,maxSCF_CC,thresh_CC,n_diis_CC,nBas,nC,nO,nV,nR,ERI_MO,ENuc,ERHF,eHF)
|
||||
call cpu_time(end_CCD)
|
||||
|
||||
t_CCD = end_CCD - start_CCD
|
||||
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CCD = ',t_CCD,' seconds'
|
||||
write(*,*)
|
||||
|
||||
call cpu_time(start_CCD)
|
||||
call G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,ppBSE,singlet,triplet, &
|
||||
linGW,eta_GW,regGW,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO,PHF,cHF,eHF,Vxc,eG0W0)
|
||||
call CCD(.true.,maxSCF_CC,thresh_CC,n_diis_CC,nBas,nC,nO,nV,nR,ERI_MO,ENuc,ERHF,eG0W0)
|
||||
call cpu_time(end_CCD)
|
||||
|
||||
t_CCD = end_CCD - start_CCD
|
||||
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CCD@BSE = ',t_CCD,' seconds'
|
||||
write(*,*)
|
||||
|
||||
end if
|
||||
|
||||
!------------------------------------------------------------------------
|
||||
@ -611,8 +620,18 @@ program QuAcK
|
||||
if(doCCSD) then
|
||||
|
||||
call cpu_time(start_CCSD)
|
||||
call CCSD(maxSCF_CC,thresh_CC,n_diis_CC,doCCSDT,nBas,nC,nO,nV,nR, &
|
||||
ERI_MO,ENuc,ERHF,eHF)
|
||||
call CCSD(.false.,maxSCF_CC,thresh_CC,n_diis_CC,doCCSDT,nBas,nC,nO,nV,nR,ERI_MO,ENuc,ERHF,eHF)
|
||||
call cpu_time(end_CCSD)
|
||||
|
||||
t_CCSD = end_CCSD - start_CCSD
|
||||
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for CCSD or CCSD(T)= ',t_CCSD,' seconds'
|
||||
write(*,*)
|
||||
|
||||
call cpu_time(start_CCSD)
|
||||
call G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,ppBSE,singlet,triplet, &
|
||||
linGW,eta_GW,regGW,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO,PHF,cHF,eHF,Vxc,eG0W0)
|
||||
|
||||
call CCSD(.true.,maxSCF_CC,thresh_CC,n_diis_CC,doCCSDT,nBas,nC,nO,nV,nR,ERI_MO,ENuc,ERHF,eG0W0)
|
||||
call cpu_time(end_CCSD)
|
||||
|
||||
t_CCSD = end_CCSD - start_CCSD
|
||||
@ -1038,6 +1057,8 @@ program QuAcK
|
||||
else
|
||||
call G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,ppBSE,singlet,triplet, &
|
||||
linGW,eta_GW,regGW,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO,PHF,cHF,eHF,Vxc,eG0W0)
|
||||
! call soG0W0(doACFDT,exchange_kernel,doXBS,COHSEX,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,ppBSE,singlet,triplet, &
|
||||
! linGW,eta_GW,regGW,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO,PHF,cHF,eHF,Vxc,eG0W0)
|
||||
end if
|
||||
|
||||
end if
|
||||
@ -1066,8 +1087,8 @@ program QuAcK
|
||||
|
||||
else
|
||||
|
||||
call evGW(maxSCF_GW,thresh_GW,n_diis_GW,doACFDT,exchange_kernel,doXBS,COHSEX, &
|
||||
BSE,TDA_W,TDA,G0W,GW0,dBSE,dTDA,evDyn,singlet,triplet,eta_GW,regGW, &
|
||||
call evGW(maxSCF_GW,thresh_GW,n_diis_GW,doACFDT,exchange_kernel,doXBS,COHSEX, &
|
||||
BSE,TDA_W,TDA,G0W,GW0,dBSE,dTDA,evDyn,ppBSE,singlet,triplet,eta_GW,regGW, &
|
||||
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO,PHF,cHF,eHF,Vxc,eG0W0)
|
||||
end if
|
||||
call cpu_time(end_evGW)
|
||||
@ -1164,8 +1185,8 @@ program QuAcK
|
||||
else
|
||||
|
||||
! call soG0T0(eta_GT,nBas,nC,nO,nV,nR,ENuc,ERHF,ERI_MO,eHF)
|
||||
call G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet, &
|
||||
linGT,eta_GT,regGT,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO, &
|
||||
call G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,ppBSE,singlet,triplet, &
|
||||
linGT,eta_GT,regGT,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO, &
|
||||
PHF,cHF,eHF,Vxc,eG0T0)
|
||||
|
||||
end if
|
||||
|
@ -49,16 +49,21 @@ subroutine ppRPA(TDA,doACFDT,singlet,triplet,nBas,nC,nO,nV,nR,ENuc,ERHF,ERI,dipo
|
||||
! Initialization
|
||||
|
||||
Ec_ppRPA(:) = 0d0
|
||||
EcAC(:) = 0d0
|
||||
EcAC(:) = 0d0
|
||||
|
||||
! Useful quantities
|
||||
|
||||
nS = nO*nV
|
||||
nS = nO*nV
|
||||
|
||||
! Singlet manifold
|
||||
|
||||
if(singlet) then
|
||||
|
||||
write(*,*) '****************'
|
||||
write(*,*) '*** Singlets ***'
|
||||
write(*,*) '****************'
|
||||
write(*,*)
|
||||
|
||||
ispin = 1
|
||||
|
||||
nOO = nO*(nO+1)/2
|
||||
@ -69,11 +74,11 @@ subroutine ppRPA(TDA,doACFDT,singlet,triplet,nBas,nC,nO,nV,nR,ENuc,ERHF,ERI,dipo
|
||||
call linear_response_pp(ispin,TDA,nBas,nC,nO,nV,nR,nOO,nVV,1d0,e,ERI, &
|
||||
Omega1,X1,Y1,Omega2,X2,Y2,Ec_ppRPA(ispin))
|
||||
|
||||
! call print_excitation('pp-RPA (N+2)',ispin,nVV,Omega1)
|
||||
! call print_excitation('pp-RPA (N-2)',ispin,nOO,Omega2)
|
||||
|
||||
call print_transition_vectors_pp(.true.,nBas,nC,nO,nV,nR,nOO,nVV,dipole_int,Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
|
||||
! call print_excitation('pp-BSE (N+2)',ispin,nVV,Omega1)
|
||||
! call print_excitation('pp-BSE (N-2)',ispin,nOO,Omega2)
|
||||
|
||||
deallocate(Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
|
||||
endif
|
||||
@ -82,6 +87,11 @@ subroutine ppRPA(TDA,doACFDT,singlet,triplet,nBas,nC,nO,nV,nR,ENuc,ERHF,ERI,dipo
|
||||
|
||||
if(triplet) then
|
||||
|
||||
write(*,*) '****************'
|
||||
write(*,*) '*** Triplets ***'
|
||||
write(*,*) '****************'
|
||||
write(*,*)
|
||||
|
||||
ispin = 2
|
||||
|
||||
nOO = nO*(nO-1)/2
|
||||
@ -92,11 +102,11 @@ subroutine ppRPA(TDA,doACFDT,singlet,triplet,nBas,nC,nO,nV,nR,ENuc,ERHF,ERI,dipo
|
||||
call linear_response_pp(ispin,TDA,nBas,nC,nO,nV,nR,nOO,nVV,1d0,e,ERI, &
|
||||
Omega1,X1,Y1,Omega2,X2,Y2,Ec_ppRPA(ispin))
|
||||
|
||||
! call print_excitation('pp-RPA (N+2)',ispin,nVV,Omega1)
|
||||
! call print_excitation('pp-RPA (N-2)',ispin,nOO,Omega2)
|
||||
|
||||
call print_transition_vectors_pp(.false.,nBas,nC,nO,nV,nR,nOO,nVV,dipole_int,Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
|
||||
! call print_excitation('pp-BSE (N+2)',ispin,nVV,Omega1)
|
||||
! call print_excitation('pp-BSE (N-2)',ispin,nOO,Omega2)
|
||||
|
||||
deallocate(Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
|
||||
endif
|
||||
@ -132,5 +142,4 @@ subroutine ppRPA(TDA,doACFDT,singlet,triplet,nBas,nC,nO,nV,nR,ENuc,ERHF,ERI,dipo
|
||||
|
||||
end if
|
||||
|
||||
|
||||
end subroutine ppRPA
|
||||
|
Loading…
Reference in New Issue
Block a user