mirror of
https://github.com/pfloos/quack
synced 2024-11-03 20:53:53 +01:00
clean up code for GT
This commit is contained in:
parent
7c863d4982
commit
41f48188d5
@ -142,29 +142,27 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
iblock = 3
|
||||
dERI = +1d0
|
||||
xERI = +0d0
|
||||
alpha = +1d0
|
||||
|
||||
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI_MO(:,:,:,:), &
|
||||
X1s(:,:),Y1s(:,:),rho1s(:,:,:),X2s(:,:),Y2s(:,:),rho2s(:,:,:))
|
||||
|
||||
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:), &
|
||||
call self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:), &
|
||||
Omega1s(:),rho1s(:,:,:),Omega2s(:),rho2s(:,:,:),SigT(:))
|
||||
|
||||
call renormalization_factor_Tmatrix(alpha,eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:), &
|
||||
call renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF(:), &
|
||||
Omega1s(:),rho1s(:,:,:),Omega2s(:),rho2s(:,:,:),Z(:))
|
||||
|
||||
iblock = 4
|
||||
dERI = +1d0
|
||||
xERI = -1d0
|
||||
alpha = +1d0
|
||||
|
||||
call excitation_density_Tmatrix(iblock,dERI,xERI,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI_MO(:,:,:,:), &
|
||||
X1t(:,:),Y1t(:,:),rho1t(:,:,:),X2t(:,:),Y2t(:,:),rho2t(:,:,:))
|
||||
|
||||
call self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:), &
|
||||
call self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:), &
|
||||
Omega1t(:),rho1t(:,:,:),Omega2t(:),rho2t(:,:,:),SigT(:))
|
||||
|
||||
call renormalization_factor_Tmatrix(alpha,eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:), &
|
||||
call renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF(:), &
|
||||
Omega1t(:),rho1t(:,:,:),Omega2t(:),rho2t(:,:,:),Z(:))
|
||||
|
||||
Z(:) = 1d0/(1d0 - Z(:))
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine renormalization_factor_Tmatrix(alpha,eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,rho1,Omega2,rho2,Z)
|
||||
subroutine renormalization_factor_Tmatrix(eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,rho1,Omega2,rho2,Z)
|
||||
|
||||
! Compute renormalization factor of the T-matrix self-energy
|
||||
|
||||
@ -7,7 +7,6 @@ subroutine renormalization_factor_Tmatrix(alpha,eta,nBas,nC,nO,nV,nR,nOO,nVV,e,O
|
||||
|
||||
! Input variables
|
||||
|
||||
double precision,intent(in) :: alpha
|
||||
double precision,intent(in) :: eta
|
||||
integer,intent(in) :: nBas,nC,nO,nV,nR
|
||||
integer,intent(in) :: nOO
|
||||
@ -33,7 +32,7 @@ subroutine renormalization_factor_Tmatrix(alpha,eta,nBas,nC,nO,nV,nR,nOO,nVV,e,O
|
||||
do i=nC+1,nO
|
||||
do cd=1,nVV
|
||||
eps = e(p) + e(i) - Omega1(cd)
|
||||
Z(p) = Z(p) - (rho1(p,i,cd)/eps)**2
|
||||
Z(p) = Z(p) - rho1(p,i,cd)**2*(eps/(eps**2 + eta**2))**2
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
@ -44,7 +43,7 @@ subroutine renormalization_factor_Tmatrix(alpha,eta,nBas,nC,nO,nV,nR,nOO,nVV,e,O
|
||||
do a=1,nV-nR
|
||||
do kl=1,nOO
|
||||
eps = e(p) + e(nO+a) - Omega2(kl)
|
||||
Z(p) = Z(p) - (rho2(p,nO+a,kl)/eps)**2
|
||||
Z(p) = Z(p) - rho2(p,nO+a,kl)**2*(eps/(eps**2 + eta**2))**2
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine self_energy_Tmatrix(eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,Omega2,rho1,rho2,SigT)
|
||||
subroutine self_energy_Tmatrix(eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,rho1,Omega2,rho2,SigT)
|
||||
|
||||
! Compute the correlation part of the T-matrix self-energy
|
||||
|
||||
@ -17,9 +17,9 @@ subroutine self_energy_Tmatrix(eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,Omega2,rho1
|
||||
integer,intent(in) :: nVV
|
||||
double precision,intent(in) :: e(nBas)
|
||||
double precision,intent(in) :: Omega1(nVV)
|
||||
double precision,intent(in) :: rho1(nBas,nO,nVV)
|
||||
double precision,intent(in) :: rho1(nBas,nBas,nVV)
|
||||
double precision,intent(in) :: Omega2(nOO)
|
||||
double precision,intent(in) :: rho2(nBas,nV,nOO)
|
||||
double precision,intent(in) :: rho2(nBas,nBas,nOO)
|
||||
|
||||
! Local variables
|
||||
|
||||
@ -28,41 +28,33 @@ subroutine self_energy_Tmatrix(eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,Omega2,rho1
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: SigT(nBas,nBas)
|
||||
|
||||
! Initialize
|
||||
|
||||
SigT = 0d0
|
||||
double precision,intent(out) :: SigT(nBas)
|
||||
|
||||
!----------------------------------------------
|
||||
! Occupied part of the T-matrix self-energy
|
||||
!----------------------------------------------
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do q=nC+1,nBas-nR
|
||||
do i=nC+1,nO
|
||||
cd = 0
|
||||
do c=nO+1,nBas-nR
|
||||
do d=c+1,nBas-nR
|
||||
cd = cd + 1
|
||||
do cd=1,nVV
|
||||
eps = e(p) + e(i) - Omega1(cd)
|
||||
SigT(p,q) = SigT(p,q) + 2d0*rho1(p,i,cd)*rho1(q,i,cd)*eps/(eps**2 + eta**2)
|
||||
enddo
|
||||
SigT(p) = SigT(p) + rho1(p,i,cd)*rho1(q,i,cd)*eps/(eps**2 + eta**2)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
!----------------------------------------------
|
||||
! Virtual part of the T-matrix self-energy
|
||||
!----------------------------------------------
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do q=nC+1,nBas-nR
|
||||
do a=nO+1,nBas-nR
|
||||
kl = 0
|
||||
do k=nC+1,nO
|
||||
do l=k+1,nO
|
||||
kl = kl + 1
|
||||
eps = e(p) + e(a) - Omega2(kl)
|
||||
SigT(p,q) = SigT(p,q) + 2d0*rho2(p,a,kl)*rho2(q,a,kl)*eps/(eps**2 + eta**2)
|
||||
enddo
|
||||
do a=1,nV-nR
|
||||
do kl=1,nOO
|
||||
eps = e(p) + e(nO+a) - Omega2(kl)
|
||||
SigT(p) = SigT(p) + rho2(p,nO+a,kl)*rho2(q,nO+a,kl)*eps/(eps**2 + eta**2)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,rho1,Omega2,rho2,SigT)
|
||||
subroutine self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,rho1,Omega2,rho2,SigT)
|
||||
|
||||
! Compute diagonal of the correlation part of the T-matrix self-energy
|
||||
|
||||
@ -7,7 +7,6 @@ subroutine self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,
|
||||
|
||||
! Input variables
|
||||
|
||||
double precision,intent(in) :: alpha
|
||||
double precision,intent(in) :: eta
|
||||
integer,intent(in) :: nBas
|
||||
integer,intent(in) :: nC
|
||||
@ -32,27 +31,27 @@ subroutine self_energy_Tmatrix_diag(alpha,eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,
|
||||
double precision,intent(out) :: SigT(nBas)
|
||||
|
||||
!----------------------------------------------
|
||||
! Singlet part of the T-matrix self-energy
|
||||
!----------------------------------------------
|
||||
|
||||
! Occupied part of the T-matrix self-energy
|
||||
!----------------------------------------------
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do i=nC+1,nO
|
||||
do cd=1,nVV
|
||||
eps = e(p) + e(i) - Omega1(cd)
|
||||
SigT(p) = SigT(p) + alpha*rho1(p,i,cd)**2/eps
|
||||
SigT(p) = SigT(p) + rho1(p,i,cd)**2*eps/(eps**2 + eta**2)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
!----------------------------------------------
|
||||
! Virtual part of the T-matrix self-energy
|
||||
!----------------------------------------------
|
||||
|
||||
do p=nC+1,nBas-nR
|
||||
do a=1,nV-nR
|
||||
do kl=1,nOO
|
||||
eps = e(p) + e(nO+a) - Omega2(kl)
|
||||
SigT(p) = SigT(p) + alpha*rho2(p,nO+a,kl)**2/eps
|
||||
SigT(p) = SigT(p) + rho2(p,nO+a,kl)**2*eps/(eps**2 + eta**2)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
Loading…
Reference in New Issue
Block a user