mirror of
https://github.com/pfloos/quack
synced 2025-01-09 20:48:40 +01:00
there is a bug in UG0W0
This commit is contained in:
parent
09a33729fe
commit
f30c5a9cb1
@ -1,4 +1,4 @@
|
|||||||
subroutine UG0W0(dotest,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip, &
|
subroutine UG0W0(dotest,doACFDT,exchange_kernel,doXBS,dophBSE,TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip, &
|
||||||
linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,EUHF,S,ERI_aaaa,ERI_aabb,ERI_bbbb, &
|
linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,EUHF,S,ERI_aaaa,ERI_aabb,ERI_bbbb, &
|
||||||
dipole_int_aa,dipole_int_bb,cHF,eHF)
|
dipole_int_aa,dipole_int_bb,cHF,eHF)
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ subroutine UG0W0(dotest,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,sp
|
|||||||
logical,intent(in) :: doACFDT
|
logical,intent(in) :: doACFDT
|
||||||
logical,intent(in) :: exchange_kernel
|
logical,intent(in) :: exchange_kernel
|
||||||
logical,intent(in) :: doXBS
|
logical,intent(in) :: doXBS
|
||||||
logical,intent(in) :: BSE
|
logical,intent(in) :: dophBSE
|
||||||
logical,intent(in) :: TDA_W
|
logical,intent(in) :: TDA_W
|
||||||
logical,intent(in) :: TDA
|
logical,intent(in) :: TDA
|
||||||
logical,intent(in) :: dBSE
|
logical,intent(in) :: dBSE
|
||||||
@ -52,7 +52,6 @@ subroutine UG0W0(dotest,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,sp
|
|||||||
double precision :: EcRPA
|
double precision :: EcRPA
|
||||||
double precision :: EcGM(nspin)
|
double precision :: EcGM(nspin)
|
||||||
double precision :: EcBSE(nspin)
|
double precision :: EcBSE(nspin)
|
||||||
double precision :: EcAC(nspin)
|
|
||||||
double precision,allocatable :: SigC(:,:)
|
double precision,allocatable :: SigC(:,:)
|
||||||
double precision,allocatable :: Z(:,:)
|
double precision,allocatable :: Z(:,:)
|
||||||
integer :: nSa,nSb,nSt
|
integer :: nSa,nSb,nSt
|
||||||
@ -185,7 +184,7 @@ subroutine UG0W0(dotest,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,sp
|
|||||||
|
|
||||||
! Perform BSE calculation
|
! Perform BSE calculation
|
||||||
|
|
||||||
if(BSE) then
|
if(dophBSE) then
|
||||||
|
|
||||||
call UGW_phBSE(TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip,eta,nBas,nC,nO,nV,nR,nS,S, &
|
call UGW_phBSE(TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip,eta,nBas,nC,nO,nV,nR,nS,S, &
|
||||||
ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,cHF,eHF,eGW,EcBSE)
|
ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,cHF,eHF,eGW,EcBSE)
|
||||||
@ -203,10 +202,10 @@ subroutine UG0W0(dotest,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,sp
|
|||||||
|
|
||||||
write(*,*)
|
write(*,*)
|
||||||
write(*,*)'-------------------------------------------------------------------------------'
|
write(*,*)'-------------------------------------------------------------------------------'
|
||||||
write(*,'(2X,A50,F20.10)') 'Tr@BSE@UG0W0 correlation energy (spin-conserved) =',EcBSE(1)
|
write(*,'(2X,A50,F20.10,A3)') 'Tr@BSE@UG0W0 correlation energy (spin-conserved) =',EcBSE(1),' au'
|
||||||
write(*,'(2X,A50,F20.10)') 'Tr@BSE@UG0W0 correlation energy (spin-flip) =',EcBSE(2)
|
write(*,'(2X,A50,F20.10,A3)') 'Tr@BSE@UG0W0 correlation energy (spin-flip) =',EcBSE(2),' au'
|
||||||
write(*,'(2X,A50,F20.10)') 'Tr@BSE@UG0W0 correlation energy =',EcBSE(1) + EcBSE(2)
|
write(*,'(2X,A50,F20.10,A3)') 'Tr@BSE@UG0W0 correlation energy =',sum(EcBSE),' au'
|
||||||
write(*,'(2X,A50,F20.10)') 'Tr@BSE@UG0W0 total energy =',ENuc + EUHF + EcBSE(1) + EcBSE(2)
|
write(*,'(2X,A50,F20.10,A3)') 'Tr@BSE@UG0W0 total energy =',ENuc + EUHF + sum(EcBSE),' au'
|
||||||
write(*,*)'-------------------------------------------------------------------------------'
|
write(*,*)'-------------------------------------------------------------------------------'
|
||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
@ -226,15 +225,15 @@ subroutine UG0W0(dotest,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,sp
|
|||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
call UGW_phACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,BSE,spin_conserved,spin_flip,eta, &
|
call UGW_phACFDT(exchange_kernel,doXBS,.true.,TDA_W,TDA,dophBSE,spin_conserved,spin_flip,eta, &
|
||||||
nBas,nC,nO,nV,nR,nS,ERI_aaaa,ERI_aabb,ERI_bbbb,eHF,eGW,EcAC)
|
nBas,nC,nO,nV,nR,nS,ERI_aaaa,ERI_aabb,ERI_bbbb,eHF,eGW,EcBSE)
|
||||||
|
|
||||||
write(*,*)
|
write(*,*)
|
||||||
write(*,*)'-------------------------------------------------------------------------------'
|
write(*,*)'-------------------------------------------------------------------------------'
|
||||||
write(*,'(2X,A50,F20.10)') 'AC@BSE@UG0W0 correlation energy (spin-conserved) =',EcAC(1)
|
write(*,'(2X,A50,F20.10,A3)') 'AC@BSE@UG0W0 correlation energy (spin-conserved) =',EcBSE(1),' au'
|
||||||
write(*,'(2X,A50,F20.10)') 'AC@BSE@UG0W0 correlation energy (spin-flip) =',EcAC(2)
|
write(*,'(2X,A50,F20.10,A3)') 'AC@BSE@UG0W0 correlation energy (spin-flip) =',EcBSE(2),' au'
|
||||||
write(*,'(2X,A50,F20.10)') 'AC@BSE@UG0W0 correlation energy =',EcAC(1) + EcAC(2)
|
write(*,'(2X,A50,F20.10,A3)') 'AC@BSE@UG0W0 correlation energy =',sum(EcBSE),' au'
|
||||||
write(*,'(2X,A50,F20.10)') 'AC@BSE@UG0W0 total energy =',ENuc + EUHF + EcAC(1) + EcAC(2)
|
write(*,'(2X,A50,F20.10,A3)') 'AC@BSE@UG0W0 total energy =',ENuc + EUHF + sum(EcBSE),' au'
|
||||||
write(*,*)'-------------------------------------------------------------------------------'
|
write(*,*)'-------------------------------------------------------------------------------'
|
||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
subroutine UGW(dotest,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW,maxSCF,thresh,max_diis,doACFDT, &
|
subroutine UGW(dotest,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW,maxSCF,thresh,max_diis,doACFDT, &
|
||||||
exchange_kernel,doXBS,dophBSE,dophBSE2,doppBSE,TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip, &
|
exchange_kernel,doXBS,dophBSE,dophBSE2,doppBSE,TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip, &
|
||||||
linearize,eta,regularize,nNuc,ZNuc,rNuc,ENuc,nBas,nC,nO,nV,nR,nS,EHF,S,X,T,V,Hc, &
|
linearize,eta,regularize,nNuc,ZNuc,rNuc,ENuc,nBas,nC,nO,nV,nR,nS,EUHF,S,X,T,V,Hc, &
|
||||||
ERI_AO,ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_AO,dipole_int_aa,dipole_int_bb,PHF,cHF,epsHF)
|
ERI_AO,ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_AO,dipole_int_aa,dipole_int_bb,PHF,cHF,eHF)
|
||||||
|
|
||||||
! GW module
|
! GW module
|
||||||
|
|
||||||
@ -50,8 +50,8 @@ subroutine UGW(dotest,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW,maxSCF,thre
|
|||||||
integer,intent(in) :: nR(nspin)
|
integer,intent(in) :: nR(nspin)
|
||||||
integer,intent(in) :: nS(nspin)
|
integer,intent(in) :: nS(nspin)
|
||||||
|
|
||||||
double precision,intent(in) :: EHF
|
double precision,intent(in) :: EUHF
|
||||||
double precision,intent(in) :: epsHF(nBas,nspin)
|
double precision,intent(in) :: eHF(nBas,nspin)
|
||||||
double precision,intent(in) :: cHF(nBas,nBas,nspin)
|
double precision,intent(in) :: cHF(nBas,nBas,nspin)
|
||||||
double precision,intent(in) :: PHF(nBas,nBas,nspin)
|
double precision,intent(in) :: PHF(nBas,nBas,nspin)
|
||||||
double precision,intent(in) :: S(nBas,nBas)
|
double precision,intent(in) :: S(nBas,nBas)
|
||||||
@ -79,8 +79,8 @@ subroutine UGW(dotest,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW,maxSCF,thre
|
|||||||
|
|
||||||
call wall_time(start_GW)
|
call wall_time(start_GW)
|
||||||
call UG0W0(dotest,doACFDT,exchange_kernel,doXBS,dophBSE,TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip, &
|
call UG0W0(dotest,doACFDT,exchange_kernel,doXBS,dophBSE,TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip, &
|
||||||
linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,EHF,S,ERI_aaaa,ERI_aabb,ERI_bbbb, &
|
linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,EUHF,S,ERI_aaaa,ERI_aabb,ERI_bbbb, &
|
||||||
dipole_int_aa,dipole_int_bb,cHF,epsHF)
|
dipole_int_aa,dipole_int_bb,cHF,eHF)
|
||||||
call wall_time(end_GW)
|
call wall_time(end_GW)
|
||||||
|
|
||||||
t_GW = end_GW - start_GW
|
t_GW = end_GW - start_GW
|
||||||
@ -97,8 +97,8 @@ subroutine UGW(dotest,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW,maxSCF,thre
|
|||||||
|
|
||||||
call wall_time(start_GW)
|
call wall_time(start_GW)
|
||||||
call evUGW(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,TDA_W,TDA,dBSE,dTDA, &
|
call evUGW(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,TDA_W,TDA,dBSE,dTDA, &
|
||||||
spin_conserved,spin_flip,linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,EHF,S, &
|
spin_conserved,spin_flip,linearize,eta,regularize,nBas,nC,nO,nV,nR,nS,ENuc,EUHF,S, &
|
||||||
ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,cHF,epsHF)
|
ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,cHF,eHF)
|
||||||
call wall_time(end_GW)
|
call wall_time(end_GW)
|
||||||
|
|
||||||
t_GW = end_GW - start_GW
|
t_GW = end_GW - start_GW
|
||||||
@ -115,8 +115,8 @@ subroutine UGW(dotest,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW,maxSCF,thre
|
|||||||
|
|
||||||
call wall_time(start_GW)
|
call wall_time(start_GW)
|
||||||
call qsUGW(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip, &
|
call qsUGW(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,TDA_W,TDA,dBSE,dTDA,spin_conserved,spin_flip, &
|
||||||
eta,regularize,nNuc,ZNuc,rNuc,ENuc,nBas,nC,nO,nV,nR,nS,EHF,S,X,T,V,Hc,ERI_AO,ERI_aaaa,ERI_aabb,ERI_bbbb, &
|
eta,regularize,nNuc,ZNuc,rNuc,ENuc,nBas,nC,nO,nV,nR,nS,EUHF,S,X,T,V,Hc,ERI_AO,ERI_aaaa,ERI_aabb,ERI_bbbb, &
|
||||||
dipole_int_AO,dipole_int_aa,dipole_int_bb,PHF,cHF,epsHF)
|
dipole_int_AO,dipole_int_aa,dipole_int_bb,PHF,cHF,eHF)
|
||||||
call wall_time(end_GW)
|
call wall_time(end_GW)
|
||||||
|
|
||||||
t_GW = end_GW - start_GW
|
t_GW = end_GW - start_GW
|
||||||
|
@ -44,8 +44,6 @@ subroutine phLR(TDA,nS,Aph,Bph,EcRPA,Om,XpY,XmY)
|
|||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
! Build A + B and A - B matrices
|
|
||||||
|
|
||||||
ApB(:,:) = Aph(:,:) + Bph(:,:)
|
ApB(:,:) = Aph(:,:) + Bph(:,:)
|
||||||
AmB(:,:) = Aph(:,:) - Bph(:,:)
|
AmB(:,:) = Aph(:,:) - Bph(:,:)
|
||||||
|
|
||||||
|
@ -55,8 +55,6 @@ subroutine phULR(TDA,nSa,nSb,nSt,Aph,Bph,EcRPA,Om,XpY,XmY)
|
|||||||
! call UGW_phBSE_static_kernel_B(ispin,nBas,nC,nO,nV,nR,nSa,nSb,nSt,nS_sc,lambda, &
|
! call UGW_phBSE_static_kernel_B(ispin,nBas,nC,nO,nV,nR,nSa,nSb,nSt,nS_sc,lambda, &
|
||||||
! ERI_aaaa,ERI_aabb,ERI_bbbb,Om,rho,Bph)
|
! ERI_aaaa,ERI_aabb,ERI_bbbb,Om,rho,Bph)
|
||||||
|
|
||||||
! Build A + B and A - B matrices
|
|
||||||
|
|
||||||
ApB(:,:) = Aph(:,:) + Bph(:,:)
|
ApB(:,:) = Aph(:,:) + Bph(:,:)
|
||||||
AmB(:,:) = Aph(:,:) - Bph(:,:)
|
AmB(:,:) = Aph(:,:) - Bph(:,:)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine phULR_A(ispin,dRPA,nBas,nC,nO,nV,nR,nSa,nSb,nSt,lambda,e,ERI_aaaa,ERI_aabb,ERI_bbbb,Aph)
|
subroutine phULR_A(ispin,dRPA,nBas,nC,nO,nV,nR,nSa,nSb,nSt,lambda,eHF,ERI_aaaa,ERI_aabb,ERI_bbbb,Aph)
|
||||||
|
|
||||||
! Compute linear response
|
! Compute linear response
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ subroutine phULR_A(ispin,dRPA,nBas,nC,nO,nV,nR,nSa,nSb,nSt,lambda,e,ERI_aaaa,ERI
|
|||||||
integer,intent(in) :: nSb
|
integer,intent(in) :: nSb
|
||||||
integer,intent(in) :: nSt
|
integer,intent(in) :: nSt
|
||||||
double precision,intent(in) :: lambda
|
double precision,intent(in) :: lambda
|
||||||
double precision,intent(in) :: e(nBas,nspin)
|
double precision,intent(in) :: eHF(nBas,nspin)
|
||||||
double precision,intent(in) :: ERI_aaaa(nBas,nBas,nBas,nBas)
|
double precision,intent(in) :: ERI_aaaa(nBas,nBas,nBas,nBas)
|
||||||
double precision,intent(in) :: ERI_aabb(nBas,nBas,nBas,nBas)
|
double precision,intent(in) :: ERI_aabb(nBas,nBas,nBas,nBas)
|
||||||
double precision,intent(in) :: ERI_bbbb(nBas,nBas,nBas,nBas)
|
double precision,intent(in) :: ERI_bbbb(nBas,nBas,nBas,nBas)
|
||||||
@ -56,7 +56,7 @@ subroutine phULR_A(ispin,dRPA,nBas,nC,nO,nV,nR,nSa,nSb,nSt,lambda,e,ERI_aaaa,ERI
|
|||||||
do b=nO(1)+1,nBas-nR(1)
|
do b=nO(1)+1,nBas-nR(1)
|
||||||
jb = jb + 1
|
jb = jb + 1
|
||||||
|
|
||||||
Aph(ia,jb) = (e(a,1) - e(i,1))*Kronecker_delta(i,j)*Kronecker_delta(a,b) &
|
Aph(ia,jb) = (eHF(a,1) - eHF(i,1))*Kronecker_delta(i,j)*Kronecker_delta(a,b) &
|
||||||
+ lambda*ERI_aaaa(i,b,a,j) - (1d0 - delta_dRPA)*lambda*ERI_aaaa(i,b,j,a)
|
+ lambda*ERI_aaaa(i,b,a,j) - (1d0 - delta_dRPA)*lambda*ERI_aaaa(i,b,j,a)
|
||||||
|
|
||||||
end do
|
end do
|
||||||
@ -111,7 +111,7 @@ subroutine phULR_A(ispin,dRPA,nBas,nC,nO,nV,nR,nSa,nSb,nSt,lambda,e,ERI_aaaa,ERI
|
|||||||
do b=nO(2)+1,nBas-nR(2)
|
do b=nO(2)+1,nBas-nR(2)
|
||||||
jb = jb + 1
|
jb = jb + 1
|
||||||
|
|
||||||
Aph(nSa+ia,nSa+jb) = (e(a,2) - e(i,2))*Kronecker_delta(i,j)*Kronecker_delta(a,b) &
|
Aph(nSa+ia,nSa+jb) = (eHF(a,2) - eHF(i,2))*Kronecker_delta(i,j)*Kronecker_delta(a,b) &
|
||||||
+ lambda*ERI_bbbb(i,b,a,j) - (1d0 - delta_dRPA)*lambda*ERI_bbbb(i,b,j,a)
|
+ lambda*ERI_bbbb(i,b,a,j) - (1d0 - delta_dRPA)*lambda*ERI_bbbb(i,b,j,a)
|
||||||
|
|
||||||
end do
|
end do
|
||||||
@ -139,7 +139,7 @@ subroutine phULR_A(ispin,dRPA,nBas,nC,nO,nV,nR,nSa,nSb,nSt,lambda,e,ERI_aaaa,ERI
|
|||||||
do j=nC(1)+1,nO(1)
|
do j=nC(1)+1,nO(1)
|
||||||
do b=nO(2)+1,nBas-nR(2)
|
do b=nO(2)+1,nBas-nR(2)
|
||||||
jb = jb + 1
|
jb = jb + 1
|
||||||
Aph(ia,jb) = (e(a,2) - e(i,1))*Kronecker_delta(i,j)*Kronecker_delta(a,b) &
|
Aph(ia,jb) = (eHF(a,2) - eHF(i,1))*Kronecker_delta(i,j)*Kronecker_delta(a,b) &
|
||||||
- (1d0 - delta_dRPA)*lambda*ERI_aabb(i,b,j,a)
|
- (1d0 - delta_dRPA)*lambda*ERI_aabb(i,b,j,a)
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
@ -157,7 +157,7 @@ subroutine phULR_A(ispin,dRPA,nBas,nC,nO,nV,nR,nSa,nSb,nSt,lambda,e,ERI_aaaa,ERI
|
|||||||
do b=nO(1)+1,nBas-nR(1)
|
do b=nO(1)+1,nBas-nR(1)
|
||||||
jb = jb + 1
|
jb = jb + 1
|
||||||
|
|
||||||
Aph(nSa+ia,nSa+jb) = (e(a,1) - e(i,2))*Kronecker_delta(i,j)*Kronecker_delta(a,b) &
|
Aph(nSa+ia,nSa+jb) = (eHF(a,1) - eHF(i,2))*Kronecker_delta(i,j)*Kronecker_delta(a,b) &
|
||||||
- (1d0 - delta_dRPA)*lambda*ERI_aabb(b,i,a,j)
|
- (1d0 - delta_dRPA)*lambda*ERI_aabb(b,i,a,j)
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine RRPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_kernel,singlet,triplet, &
|
subroutine RRPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_kernel,singlet,triplet, &
|
||||||
nBas,nC,nO,nV,nR,nS,ENuc,EHF,ERI,dipole_int,epsHF,cHF,S)
|
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,dipole_int,eHF,cHF,S)
|
||||||
|
|
||||||
! Random-phase approximation module
|
! Random-phase approximation module
|
||||||
|
|
||||||
@ -27,8 +27,8 @@ subroutine RRPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_ker
|
|||||||
integer,intent(in) :: nR(nspin)
|
integer,intent(in) :: nR(nspin)
|
||||||
integer,intent(in) :: nS(nspin)
|
integer,intent(in) :: nS(nspin)
|
||||||
double precision,intent(in) :: ENuc
|
double precision,intent(in) :: ENuc
|
||||||
double precision,intent(in) :: EHF
|
double precision,intent(in) :: ERHF
|
||||||
double precision,intent(in) :: epsHF(nBas)
|
double precision,intent(in) :: eHF(nBas)
|
||||||
double precision,intent(in) :: cHF(nBas,nBas)
|
double precision,intent(in) :: cHF(nBas,nBas)
|
||||||
double precision,intent(in) :: S(nBas,nBas)
|
double precision,intent(in) :: S(nBas,nBas)
|
||||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||||
@ -45,7 +45,7 @@ subroutine RRPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_ker
|
|||||||
if(dophRPA) then
|
if(dophRPA) then
|
||||||
|
|
||||||
call wall_time(start_RPA)
|
call wall_time(start_RPA)
|
||||||
call phRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,nV,nR,nS,ENuc,EHF,ERI,dipole_int,epsHF)
|
call phRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,dipole_int,eHF)
|
||||||
call wall_time(end_RPA)
|
call wall_time(end_RPA)
|
||||||
|
|
||||||
t_RPA = end_RPA - start_RPA
|
t_RPA = end_RPA - start_RPA
|
||||||
@ -61,7 +61,7 @@ subroutine RRPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_ker
|
|||||||
if(dophRPAx) then
|
if(dophRPAx) then
|
||||||
|
|
||||||
call wall_time(start_RPA)
|
call wall_time(start_RPA)
|
||||||
call phRRPAx(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,nV,nR,nS,ENuc,EHF,ERI,dipole_int,epsHF)
|
call phRRPAx(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,dipole_int,eHF)
|
||||||
call wall_time(end_RPA)
|
call wall_time(end_RPA)
|
||||||
|
|
||||||
t_RPA = end_RPA - start_RPA
|
t_RPA = end_RPA - start_RPA
|
||||||
@ -77,7 +77,7 @@ subroutine RRPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_ker
|
|||||||
if(docrRPA) then
|
if(docrRPA) then
|
||||||
|
|
||||||
call wall_time(start_RPA)
|
call wall_time(start_RPA)
|
||||||
call crRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,nV,nR,nS,ENuc,EHF,ERI,dipole_int,epsHF)
|
call crRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,dipole_int,eHF)
|
||||||
call wall_time(end_RPA)
|
call wall_time(end_RPA)
|
||||||
|
|
||||||
t_RPA = end_RPA - start_RPA
|
t_RPA = end_RPA - start_RPA
|
||||||
@ -93,7 +93,7 @@ subroutine RRPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_ker
|
|||||||
if(doppRPA) then
|
if(doppRPA) then
|
||||||
|
|
||||||
call wall_time(start_RPA)
|
call wall_time(start_RPA)
|
||||||
call ppRRPA(dotest,TDA,doACFDT,singlet,triplet,nBas,nC,nO,nV,nR,ENuc,EHF,ERI,dipole_int,epsHF)
|
call ppRRPA(dotest,TDA,doACFDT,singlet,triplet,nBas,nC,nO,nV,nR,ENuc,ERHF,ERI,dipole_int,eHF)
|
||||||
call wall_time(end_RPA)
|
call wall_time(end_RPA)
|
||||||
|
|
||||||
t_RPA = end_RPA - start_RPA
|
t_RPA = end_RPA - start_RPA
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine URPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_kernel,spin_conserved,spin_flip, &
|
subroutine URPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_kernel,spin_conserved,spin_flip, &
|
||||||
nBas,nC,nO,nV,nR,nS,ENuc,EHF,ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,epsHF,cHF,S)
|
nBas,nC,nO,nV,nR,nS,ENuc,EUHF,ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,eHF,cHF,S)
|
||||||
|
|
||||||
! Random-phase approximation module
|
! Random-phase approximation module
|
||||||
|
|
||||||
@ -27,8 +27,8 @@ subroutine URPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_ker
|
|||||||
integer,intent(in) :: nR(nspin)
|
integer,intent(in) :: nR(nspin)
|
||||||
integer,intent(in) :: nS(nspin)
|
integer,intent(in) :: nS(nspin)
|
||||||
double precision,intent(in) :: ENuc
|
double precision,intent(in) :: ENuc
|
||||||
double precision,intent(in) :: EHF
|
double precision,intent(in) :: EUHF
|
||||||
double precision,intent(in) :: epsHF(nBas,nspin)
|
double precision,intent(in) :: eHF(nBas,nspin)
|
||||||
double precision,intent(in) :: cHF(nBas,nBas,nspin)
|
double precision,intent(in) :: cHF(nBas,nBas,nspin)
|
||||||
double precision,intent(in) :: S(nBas,nBas)
|
double precision,intent(in) :: S(nBas,nBas)
|
||||||
double precision,intent(in) :: ERI_aaaa(nBas,nBas,nBas,nBas)
|
double precision,intent(in) :: ERI_aaaa(nBas,nBas,nBas,nBas)
|
||||||
@ -48,8 +48,8 @@ subroutine URPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_ker
|
|||||||
if(dophRPA) then
|
if(dophRPA) then
|
||||||
|
|
||||||
call wall_time(start_RPA)
|
call wall_time(start_RPA)
|
||||||
call phURPA(dotest,TDA,doACFDT,exchange_kernel,spin_conserved,spin_flip,nBas,nC,nO,nV,nR,nS,ENuc,EHF, &
|
call phURPA(dotest,TDA,doACFDT,exchange_kernel,spin_conserved,spin_flip,nBas,nC,nO,nV,nR,nS,ENuc,EUHF, &
|
||||||
ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,epsHF,cHF,S)
|
ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,eHF,cHF,S)
|
||||||
call wall_time(end_RPA)
|
call wall_time(end_RPA)
|
||||||
|
|
||||||
t_RPA = end_RPA - start_RPA
|
t_RPA = end_RPA - start_RPA
|
||||||
@ -65,8 +65,8 @@ subroutine URPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_ker
|
|||||||
if(dophRPAx) then
|
if(dophRPAx) then
|
||||||
|
|
||||||
call wall_time(start_RPA)
|
call wall_time(start_RPA)
|
||||||
call phURPAx(dotest,TDA,doACFDT,exchange_kernel,spin_conserved,spin_flip,nBas,nC,nO,nV,nR,nS,ENuc,EHF, &
|
call phURPAx(dotest,TDA,doACFDT,exchange_kernel,spin_conserved,spin_flip,nBas,nC,nO,nV,nR,nS,ENuc,EUHF, &
|
||||||
ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,epsHF,cHF,S)
|
ERI_aaaa,ERI_aabb,ERI_bbbb,dipole_int_aa,dipole_int_bb,eHF,cHF,S)
|
||||||
call wall_time(end_RPA)
|
call wall_time(end_RPA)
|
||||||
|
|
||||||
t_RPA = end_RPA - start_RPA
|
t_RPA = end_RPA - start_RPA
|
||||||
@ -98,7 +98,7 @@ subroutine URPA(dotest,dophRPA,dophRPAx,docrRPA,doppRPA,TDA,doACFDT,exchange_ker
|
|||||||
if(doppRPA) then
|
if(doppRPA) then
|
||||||
|
|
||||||
call wall_time(start_RPA)
|
call wall_time(start_RPA)
|
||||||
call ppURPA(dotest,TDA,doACFDT,spin_conserved,spin_flip,nBas,nC,nO,nV,nR,ENuc,EHF,ERI_aaaa,ERI_aabb,ERI_bbbb,epsHF)
|
call ppURPA(dotest,TDA,doACFDT,spin_conserved,spin_flip,nBas,nC,nO,nV,nR,ENuc,EUHF,ERI_aaaa,ERI_aabb,ERI_bbbb,eHF)
|
||||||
call wall_time(end_RPA)
|
call wall_time(end_RPA)
|
||||||
|
|
||||||
t_RPA = end_RPA - start_RPA
|
t_RPA = end_RPA - start_RPA
|
||||||
|
@ -57,8 +57,7 @@ subroutine crGRPA(dotest,TDA,nBas,nC,nO,nV,nR,nS,ENuc,EGHF,ERI,dipole_int,eHF)
|
|||||||
|
|
||||||
! Memory allocation
|
! Memory allocation
|
||||||
|
|
||||||
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS))
|
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS),Bph(nS,nS))
|
||||||
if(.not.TDA) allocate(Bph(nS,nS))
|
|
||||||
|
|
||||||
ispin = 3
|
ispin = 3
|
||||||
|
|
||||||
|
@ -61,8 +61,7 @@ subroutine crRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,
|
|||||||
|
|
||||||
! Memory allocation
|
! Memory allocation
|
||||||
|
|
||||||
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS))
|
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS),Bph(nS,nS))
|
||||||
if(.not.TDA) allocate(Bph(nS,nS))
|
|
||||||
|
|
||||||
! Singlet manifold
|
! Singlet manifold
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@ subroutine phGRPA(dotest,TDA,nBas,nC,nO,nV,nR,nS,ENuc,EGHF,ERI,dipole_int,eHF)
|
|||||||
|
|
||||||
! Memory allocation
|
! Memory allocation
|
||||||
|
|
||||||
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS))
|
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS),Bph(nS,nS))
|
||||||
if(.not.TDA) allocate(Bph(nS,nS))
|
|
||||||
|
|
||||||
ispin = 3
|
ispin = 3
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@ subroutine phGRPAx(dotest,TDA,nBas,nC,nO,nV,nR,nS,ENuc,EGHF,ERI,dipole_int,eHF)
|
|||||||
|
|
||||||
! Memory allocation
|
! Memory allocation
|
||||||
|
|
||||||
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS))
|
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS),Bph(nS,nS))
|
||||||
if(.not.TDA) allocate(Bph(nS,nS))
|
|
||||||
|
|
||||||
ispin = 3
|
ispin = 3
|
||||||
|
|
||||||
|
@ -61,8 +61,7 @@ subroutine phRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,
|
|||||||
|
|
||||||
! Memory allocation
|
! Memory allocation
|
||||||
|
|
||||||
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS))
|
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS),Bph(nS,nS))
|
||||||
if(.not.TDA) allocate(Bph(nS,nS))
|
|
||||||
|
|
||||||
! Singlet manifold
|
! Singlet manifold
|
||||||
|
|
||||||
@ -74,7 +73,7 @@ subroutine phRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,
|
|||||||
if(.not.TDA) call phLR_B(ispin,dRPA,nBas,nC,nO,nV,nR,nS,1d0,ERI,Bph)
|
if(.not.TDA) call phLR_B(ispin,dRPA,nBas,nC,nO,nV,nR,nS,1d0,ERI,Bph)
|
||||||
|
|
||||||
call phLR(TDA,nS,Aph,Bph,EcRPA(ispin),Om,XpY,XmY)
|
call phLR(TDA,nS,Aph,Bph,EcRPA(ispin),Om,XpY,XmY)
|
||||||
call print_excitation_energies('phRPA@HF',ispin,nS,Om)
|
call print_excitation_energies('phRPA@RHF',ispin,nS,Om)
|
||||||
call phLR_transition_vectors(.true.,nBas,nC,nO,nV,nR,nS,dipole_int,Om,XpY,XmY)
|
call phLR_transition_vectors(.true.,nBas,nC,nO,nV,nR,nS,dipole_int,Om,XpY,XmY)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
@ -89,7 +88,7 @@ subroutine phRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,
|
|||||||
if(.not.TDA) call phLR_B(ispin,dRPA,nBas,nC,nO,nV,nR,nS,1d0,ERI,Bph)
|
if(.not.TDA) call phLR_B(ispin,dRPA,nBas,nC,nO,nV,nR,nS,1d0,ERI,Bph)
|
||||||
|
|
||||||
call phLR(TDA,nS,Aph,Bph,EcRPA(ispin),Om,XpY,XmY)
|
call phLR(TDA,nS,Aph,Bph,EcRPA(ispin),Om,XpY,XmY)
|
||||||
call print_excitation_energies('phRPA@HF',ispin,nS,Om)
|
call print_excitation_energies('phRPA@RHF',ispin,nS,Om)
|
||||||
call phLR_transition_vectors(.false.,nBas,nC,nO,nV,nR,nS,dipole_int,Om,XpY,XmY)
|
call phLR_transition_vectors(.false.,nBas,nC,nO,nV,nR,nS,dipole_int,Om,XpY,XmY)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -62,8 +62,7 @@ subroutine phRRPAx(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO
|
|||||||
|
|
||||||
! Memory allocation
|
! Memory allocation
|
||||||
|
|
||||||
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS))
|
allocate(Om(nS),XpY(nS,nS),XmY(nS,nS),Aph(nS,nS),Bph(nS,nS))
|
||||||
if(.not.TDA) allocate(Bph(nS,nS))
|
|
||||||
|
|
||||||
! Singlet manifold
|
! Singlet manifold
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user