2021-12-17 11:41:40 +01:00
|
|
|
subroutine G0F2(BSE,TDA,dBSE,dTDA,evDyn,singlet,triplet,linearize,eta,regularize, &
|
|
|
|
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,dipole_int,eHF)
|
2020-03-19 10:21:18 +01:00
|
|
|
|
|
|
|
! Perform a one-shot second-order Green function calculation
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2020-06-01 17:14:42 +02:00
|
|
|
logical,intent(in) :: BSE
|
|
|
|
logical,intent(in) :: TDA
|
2020-06-15 23:04:07 +02:00
|
|
|
logical,intent(in) :: dBSE
|
|
|
|
logical,intent(in) :: dTDA
|
2020-06-16 14:02:14 +02:00
|
|
|
logical,intent(in) :: evDyn
|
2021-03-05 22:34:48 +01:00
|
|
|
logical,intent(in) :: singlet
|
|
|
|
logical,intent(in) :: triplet
|
2020-03-19 10:21:18 +01:00
|
|
|
logical,intent(in) :: linearize
|
2020-06-01 17:14:42 +02:00
|
|
|
double precision,intent(in) :: eta
|
2021-12-17 11:41:40 +01:00
|
|
|
logical,intent(in) :: regularize
|
2020-03-19 10:21:18 +01:00
|
|
|
integer,intent(in) :: nBas
|
|
|
|
integer,intent(in) :: nO
|
|
|
|
integer,intent(in) :: nC
|
|
|
|
integer,intent(in) :: nV
|
|
|
|
integer,intent(in) :: nR
|
2020-06-01 17:14:42 +02:00
|
|
|
integer,intent(in) :: nS
|
|
|
|
double precision,intent(in) :: ENuc
|
|
|
|
double precision,intent(in) :: ERHF
|
|
|
|
double precision,intent(in) :: eHF(nBas)
|
|
|
|
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
2020-09-28 21:25:25 +02:00
|
|
|
double precision,intent(in) :: dipole_int(nBas,nBas,ncart)
|
2020-03-19 10:21:18 +01:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
2021-03-06 23:08:43 +01:00
|
|
|
double precision :: Ec
|
2020-06-01 17:14:42 +02:00
|
|
|
double precision :: EcBSE(nspin)
|
2020-03-19 10:21:18 +01:00
|
|
|
double precision,allocatable :: eGF2(:)
|
2021-03-06 15:27:35 +01:00
|
|
|
double precision,allocatable :: SigC(:)
|
2020-03-19 10:21:18 +01:00
|
|
|
double precision,allocatable :: Z(:)
|
|
|
|
|
|
|
|
! Hello world
|
|
|
|
|
|
|
|
write(*,*)
|
|
|
|
write(*,*)'************************************************'
|
|
|
|
write(*,*)'| One-shot second-order Green function |'
|
|
|
|
write(*,*)'************************************************'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
! Memory allocation
|
|
|
|
|
2021-03-06 15:27:35 +01:00
|
|
|
allocate(SigC(nBas),Z(nBas),eGF2(nBas))
|
2020-03-19 10:21:18 +01:00
|
|
|
|
2020-03-21 16:31:39 +01:00
|
|
|
if(linearize) then
|
|
|
|
|
|
|
|
write(*,*) '*** Quasiparticle equation will be linearized ***'
|
|
|
|
write(*,*)
|
2020-03-19 10:21:18 +01:00
|
|
|
|
2020-03-21 16:31:39 +01:00
|
|
|
end if
|
2020-03-19 10:21:18 +01:00
|
|
|
|
2020-03-21 16:31:39 +01:00
|
|
|
! Frequency-dependent second-order contribution
|
|
|
|
|
2021-12-17 13:36:26 +01:00
|
|
|
if(regularize) then
|
|
|
|
|
|
|
|
call regularized_self_energy_GF2_diag(eta,nBas,nC,nO,nV,nR,nS,eHF,eHF,ERI,SigC,Z)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
call self_energy_GF2_diag(eta,nBas,nC,nO,nV,nR,nS,eHF,eHF,ERI,SigC,Z)
|
|
|
|
|
|
|
|
end if
|
2020-03-19 10:21:18 +01:00
|
|
|
|
|
|
|
if(linearize) then
|
|
|
|
|
2021-03-06 15:27:35 +01:00
|
|
|
eGF2(:) = eHF(:) + Z(:)*SigC(:)
|
2020-03-19 10:21:18 +01:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2021-03-06 15:27:35 +01:00
|
|
|
eGF2(:) = eHF(:) + SigC(:)
|
2020-03-19 10:21:18 +01:00
|
|
|
|
|
|
|
end if
|
2020-03-21 16:31:39 +01:00
|
|
|
|
2020-03-19 10:21:18 +01:00
|
|
|
! Print results
|
|
|
|
|
2021-03-07 22:44:37 +01:00
|
|
|
call MP2(nBas,nC,nO,nV,nR,ERI,ENuc,EHF,eGF2,Ec)
|
2021-03-06 23:08:43 +01:00
|
|
|
call print_G0F2(nBas,nO,eHF,SigC,eGF2,Z,ENuc,ERHF,Ec)
|
2020-03-19 10:21:18 +01:00
|
|
|
|
2020-06-01 17:14:42 +02:00
|
|
|
! Perform BSE2 calculation
|
|
|
|
|
|
|
|
if(BSE) then
|
|
|
|
|
2021-03-05 22:34:48 +01:00
|
|
|
call BSE2(TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,ERI,dipole_int,eHF,eGF2,EcBSE)
|
2020-06-01 17:14:42 +02:00
|
|
|
|
|
|
|
end if
|
2020-06-03 12:24:38 +02:00
|
|
|
|
2020-03-19 10:21:18 +01:00
|
|
|
end subroutine G0F2
|