4
1
mirror of https://github.com/pfloos/quack synced 2024-11-07 06:33:55 +01:00

print_UG0T0.f90

This commit is contained in:
EnzoMonino 2022-02-08 13:45:13 +01:00
parent d922666173
commit d4c50fa39e
4 changed files with 85 additions and 16 deletions

View File

@ -1,5 +1,5 @@
# RHF UHF KS MOM
F T F F
T F F F
# MP2* MP3 MP2-F12
F F F
# CCD pCCD DCD CCSD CCSD(T)

View File

@ -1,5 +1,5 @@
# HF: maxSCF thresh DIIS n_diis guess_type ortho_type mix_guess level_shift stability
256 0.0000001 T 5 2 1 T 0.0 F
256 0.0000001 T 5 2 1 F 0.0 F
# MP:
# CC: maxSCF thresh DIIS n_diis

View File

@ -234,7 +234,7 @@ subroutine UG0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn, &
! call matout(nBas,1,SigX)
! call matout(nBas,1,Vxc)
call matout(nBas,1,eG0T0(:,1))
! call matout(nBas,1,eG0T0(:,1))
else
eG0T0(:,:) = eHF(:,:) + SigX(:,:) + SigT(:,:) - Vxc(:,:)
@ -252,20 +252,20 @@ subroutine UG0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn, &
ispin = 1
iblock = 1
!call unrestricted_linear_response_pp(iblock,TDA,nBas,nC,nO,nV,nR,nPaa,nPab,nPbb, &
! nPab,nHaa,nHab,nHbb,nHab,1d0,eG0T0,ERI_aaaa, &
! ERI_aabb,ERI_bbbb,Omega1ab,X1ab,Y1ab, &
! Omega2ab,X2ab,Y2ab,EcRPA(ispin))
call unrestricted_linear_response_pp(iblock,TDA,nBas,nC,nO,nV,nR,nPaa,nPab,nPbb, &
nPab,nHaa,nHab,nHbb,nHab,1d0,eG0T0,ERI_aaaa, &
ERI_aabb,ERI_bbbb,Omega1ab,X1ab,Y1ab, &
Omega2ab,X2ab,Y2ab,EcRPA(ispin))
!alpha-alpha block
ispin = 2
iblock = 2
!call unrestricted_linear_response_pp(iblock,TDA,nBas,nC,nO,nV,nR,nPaa,nPab,nPbb, &
! nPaa,nHaa,nHab,nHbb,nHaa,1d0,eG0T0,ERI_aaaa, &
! ERI_aabb,ERI_bbbb,Omega1aa,X1aa,Y1aa, &
! Omega2aa,X2aa,Y2aa,EcRPA(ispin))
call unrestricted_linear_response_pp(iblock,TDA,nBas,nC,nO,nV,nR,nPaa,nPab,nPbb, &
nPaa,nHaa,nHab,nHbb,nHaa,1d0,eG0T0,ERI_aaaa, &
ERI_aabb,ERI_bbbb,Omega1aa,X1aa,Y1aa, &
Omega2aa,X2aa,Y2aa,EcRPA(ispin))
Ecaa = EcRPA(2)
@ -273,17 +273,17 @@ subroutine UG0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn, &
iblock = 3
!call unrestricted_linear_response_pp(iblock,TDA,nBas,nC,nO,nV,nR,nPaa,nPab,nPbb, &
! nPbb,nHaa,nHab,nHbb,nHbb,1d0,eG0T0,ERI_aaaa, &
! ERI_aabb,ERI_bbbb,Omega1bb,X1bb,Y1bb, &
! Omega2bb,X2bb,Y2bb,EcRPA(ispin))
call unrestricted_linear_response_pp(iblock,TDA,nBas,nC,nO,nV,nR,nPaa,nPab,nPbb, &
nPbb,nHaa,nHab,nHbb,nHbb,1d0,eG0T0,ERI_aaaa, &
ERI_aabb,ERI_bbbb,Omega1bb,X1bb,Y1bb, &
Omega2bb,X2bb,Y2bb,EcRPA(ispin))
Ecbb = EcRPA(2)
EcRPA(2) = Ecaa + Ecbb
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_UG0T0(nBas,nO,eHF,ENuc,EUHF,SigT,Z,eG0T0,EcGM,EcRPA)
! Free memory

69
src/GT/print_UG0T0.f90 Normal file
View File

@ -0,0 +1,69 @@
subroutine print_UG0T0(nBas,nO,eHF,ENuc,EUHF,SigT,Z,eGT,EcGM,EcRPA)
! Print one-electron energies and other stuff for UG0T0
implicit none
include 'parameters.h'
integer,intent(in) :: nBas
integer,intent(in) :: nO(nspin)
double precision,intent(in) :: ENuc
double precision,intent(in) :: EUHF
double precision,intent(in) :: EcGM
double precision,intent(in) :: EcRPA(nspin)
double precision,intent(in) :: eHF(nBas,nspin)
double precision,intent(in) :: SigT(nBas,nspin)
double precision,intent(in) :: Z(nBas,nspin)
double precision,intent(in) :: eGT(nBas,nspin)
integer :: p
integer :: ispin
double precision :: HOMO(nspin)
double precision :: LUMO(nspin)
double precision :: Gap(nspin)
! HOMO and LUMO
do ispin=1,nspin
if(nO(ispin) > 0) then
HOMO(ispin) = eGT(nO(ispin),ispin)
LUMO(ispin) = eGT(nO(ispin)+1,ispin)
Gap(ispin) = LUMO(ispin) - HOMO(ispin)
else
HOMO(ispin) = 0d0
LUMO(ispin) = eGT(1,ispin)
Gap(ispin) = 0d0
end if
end do
! Dump results
write(*,*)'-------------------------------------------------------------------------------'
write(*,*)' Unrestricted one-shot G0T0 calculation (T-matrix self-energy) '
write(*,*)'-------------------------------------------------------------------------------'
write(*,'(1X,A1,1X,A3,1X,A1,1X,A15,1X,A1,1X,A15,1X,A1,1X,A15,1X,A1,1X,A15,1X,A1,1X)') &
'|','#','|','e_HF (eV)','|','Sigma_T (eV)','|','Z','|','e_QP (eV)','|'
write(*,*)'-------------------------------------------------------------------------------'
do p=1,nBas
write(*,'(A1,I3,A1,2F15.6,A1,2F15.6,A1,2F15.6,A1,2F15.6,A1)') &
'|',p,'|',eHF(p,1)*HaToeV,eHF(p,2)*HaToeV,'|',SigT(p,1)*HaToeV,SigT(p,2)*HaToeV,'|', &
Z(p,1),Z(p,2),'|',eGT(p,1)*HaToeV,eGT(p,2)*HaToeV,'|'
enddo
write(*,*)'-------------------------------------------------------------------------------'
write(*,'(2X,A50,F15.6,A3)') 'UG0T0 HOMO energy (eV) =',maxval(HOMO(:))*HaToeV,' eV'
write(*,'(2X,A50,F15.6,A3)') 'UG0T0 LUMO energy (eV) =',minval(LUMO(:))*HaToeV,' eV'
write(*,'(2X,A50,F15.6,A3)') 'UG0T0 HOMO-LUMO gap (eV) =',(minval(LUMO(:))-maxval(HOMO(:)))*HaToeV,' eV'
write(*,*)'-------------------------------------------------------------------------------'
write(*,'(2X,A50,F20.10,A3)') ' Tr@ppRPA@UG0T0 correlation energy (singlet) =',EcRPA(1),' au'
write(*,'(2X,A50,F20.10,A3)') ' Tr@ppRPA@UG0T0 correlation energy (triplet) =',EcRPA(2),' au'
write(*,'(2X,A50,F20.10,A3)') ' Tr@ppRPA@UG0T0 correlation energy =',EcRPA(1) + EcRPA(2),' au'
write(*,'(2X,A50,F20.10,A3)') ' Tr@ppRPA@UG0T0 total energy =',ENuc + EUHF + EcRPA(1) + EcRPA(2),' au'
write(*,'(2X,A50,F20.10,A3)') ' GM@UG0T0 correlation energy =',EcGM,' au'
write(*,'(2X,A50,F20.10,A3)') ' GM@UG0T0 total energy =',ENuc + EUHF + EcGM,' au'
write(*,*)'-------------------------------------------------------------------------------'
write(*,*)
end subroutine print_UG0T0