mirror of
https://github.com/pfloos/quack
synced 2024-12-22 12:23:42 +01:00
clean up pp-RPA
This commit is contained in:
parent
27181b85e4
commit
6f11f0909f
@ -13,9 +13,9 @@
|
||||
# G0F2* evGF2* qsGF2* G0F3 evGF3
|
||||
F F F F F
|
||||
# G0W0* evGW* qsGW* ufG0W0 ufGW
|
||||
T F F T T
|
||||
T F F F F
|
||||
# G0T0 evGT qsGT
|
||||
F F F
|
||||
F F T
|
||||
# MCMP2
|
||||
F
|
||||
# * unrestricted version available
|
||||
|
@ -9,7 +9,7 @@
|
||||
# GF: maxSCF thresh DIIS n_diis lin eta renorm
|
||||
256 0.00001 T 5 T 0.0 3
|
||||
# GW/GT: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0
|
||||
256 0.00001 T 5 T 0.0 F F T F F
|
||||
256 0.00001 T 5 T 0.0 F F F F F
|
||||
# ACFDT: AC Kx XBS
|
||||
F F T
|
||||
# BSE: BSE dBSE dTDA evDyn
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine linear_response_pp(ispin,ortho_eigvec,BSE,nBas,nC,nO,nV,nR,nOO,nVV, &
|
||||
subroutine linear_response_pp(ispin,nBas,nC,nO,nV,nR,nOO,nVV, &
|
||||
e,ERI,Omega1,X1,Y1,Omega2,X2,Y2,EcRPA)
|
||||
|
||||
! Compute the p-p channel of the linear response: see Scuseria et al. JCP 139, 104113 (2013)
|
||||
@ -8,8 +8,6 @@ subroutine linear_response_pp(ispin,ortho_eigvec,BSE,nBas,nC,nO,nV,nR,nOO,nVV, &
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: ortho_eigvec
|
||||
logical,intent(in) :: BSE
|
||||
integer,intent(in) :: ispin,nBas,nC,nO,nV,nR
|
||||
integer,intent(in) :: nOO
|
||||
integer,intent(in) :: nVV
|
||||
@ -127,7 +125,7 @@ subroutine linear_response_pp(ispin,ortho_eigvec,BSE,nBas,nC,nO,nV,nR,nOO,nVV, &
|
||||
|
||||
! Split the various quantities in p-p and h-h parts
|
||||
|
||||
call sort_ppRPA(ortho_eigvec,nOO,nVV,Omega(:),Z(:,:),Omega1(:),X1(:,:),Y1(:,:),Omega2(:),X2(:,:),Y2(:,:))
|
||||
call sort_ppRPA(nOO,nVV,Omega(:),Z(:,:),Omega1(:),X1(:,:),Y1(:,:),Omega2(:),X2(:,:),Y2(:,:))
|
||||
|
||||
! call matout(32,1,(Omega1(:) - Omega1(1))*HaToeV)
|
||||
|
||||
|
@ -83,7 +83,7 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
ispin = 1
|
||||
iblock = 3
|
||||
|
||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eT,ERI, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,eT,ERI, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
|
||||
! call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI,X1s,Y1s,rho1s,X2s,Y2s,rho2s)
|
||||
@ -98,7 +98,7 @@ subroutine Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,
|
||||
ispin = 2
|
||||
iblock = 4
|
||||
|
||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eT,ERI, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,eT,ERI, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
|
||||
! call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI,X1t,Y1t,rho1t,X2t,Y2t,rho2t)
|
||||
|
@ -103,7 +103,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
! Compute linear response
|
||||
|
||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,eHF,ERI_MO, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
|
||||
! EcRPA(ispin) = 1d0*EcRPA(ispin)
|
||||
@ -120,7 +120,7 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
! Compute linear response
|
||||
|
||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,eHF,ERI_MO, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
|
||||
! EcRPA(ispin) = 2d0*EcRPA(ispin)
|
||||
@ -183,11 +183,11 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
||||
|
||||
ispin = 1
|
||||
iblock = 3
|
||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eG0T0,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,eG0T0,ERI_MO, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
ispin = 2
|
||||
iblock = 4
|
||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eG0T0,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,eG0T0,ERI_MO, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
EcRPA(1) = EcRPA(1) - EcRPA(2)
|
||||
EcRPA(2) = 3d0*EcRPA(2)
|
||||
|
@ -132,7 +132,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
||||
|
||||
! Compute linear response
|
||||
|
||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT,ERI_MO, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
|
||||
!----------------------------------------------
|
||||
@ -144,7 +144,7 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
||||
|
||||
! Compute linear response
|
||||
|
||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT,ERI_MO, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
|
||||
!----------------------------------------------
|
||||
@ -222,11 +222,11 @@ subroutine evGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, &
|
||||
|
||||
ispin = 1
|
||||
iblock = 3
|
||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT,ERI_MO, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
ispin = 2
|
||||
iblock = 4
|
||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT,ERI_MO, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
EcRPA(1) = EcRPA(1) - EcRPA(2)
|
||||
EcRPA(2) = 3d0*EcRPA(2)
|
||||
|
@ -188,13 +188,13 @@ subroutine qsGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE,TDA_T,T
|
||||
ispin = 1
|
||||
iblock = 3
|
||||
|
||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT,ERI_MO, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
|
||||
ispin = 2
|
||||
iblock = 4
|
||||
|
||||
call linear_response_pp(iblock,.true.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT,ERI_MO, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
|
||||
! Compute correlation part of the self-energy
|
||||
@ -305,11 +305,11 @@ subroutine qsGT(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE,TDA_T,T
|
||||
|
||||
ispin = 1
|
||||
iblock = 3
|
||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,eGT,ERI_MO, &
|
||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(ispin))
|
||||
ispin = 2
|
||||
iblock = 4
|
||||
call linear_response_pp(iblock,.false.,.false.,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT,ERI_MO, &
|
||||
call linear_response_pp(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,eGT,ERI_MO, &
|
||||
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(ispin))
|
||||
EcRPA(1) = EcRPA(1) - EcRPA(2)
|
||||
EcRPA(2) = 3d0*EcRPA(2)
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine sort_ppRPA(ortho_eigvec,nOO,nVV,Omega,Z,Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
subroutine sort_ppRPA(nOO,nVV,Omega,Z,Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
|
||||
! Compute the metric matrix for pp-RPA
|
||||
|
||||
@ -7,7 +7,6 @@ subroutine sort_ppRPA(ortho_eigvec,nOO,nVV,Omega,Z,Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: ortho_eigvec
|
||||
integer,intent(in) :: nOO
|
||||
integer,intent(in) :: nVV
|
||||
double precision,intent(in) :: Omega(nOO+nVV)
|
||||
@ -117,8 +116,6 @@ subroutine sort_ppRPA(ortho_eigvec,nOO,nVV,Omega,Z,Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
|
||||
! Orthogonalize eigenvectors
|
||||
|
||||
if(ortho_eigvec) then
|
||||
|
||||
! ! Find degenerate eigenvalues
|
||||
|
||||
deg1 = 1
|
||||
@ -213,8 +210,6 @@ subroutine sort_ppRPA(ortho_eigvec,nOO,nVV,Omega,Z,Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
! Z1 = matmul(Z1,O1)
|
||||
! Z2 = matmul(Z2,O2)
|
||||
|
||||
end if
|
||||
|
||||
! Define submatrices X1, Y1, X2, & Y2
|
||||
|
||||
X1(1:nVV,1:nVV) = + Z1( 1: nVV,1:nVV)
|
||||
|
Loading…
Reference in New Issue
Block a user