4
1
mirror of https://github.com/pfloos/quack synced 2024-06-02 11:25:28 +02:00
quack/src/GT/print_RG0T0pp.f90

65 lines
2.8 KiB
Fortran
Raw Normal View History

2023-11-20 17:42:50 +01:00
subroutine print_RG0T0pp(nBas,nO,eHF,ENuc,ERHF,SigT,Z,eGT,EcGM,EcRPA)
2019-10-16 18:14:47 +02:00
! Print one-electron energies and other stuff for G0T0
implicit none
include 'parameters.h'
2022-01-06 13:48:15 +01:00
integer,intent(in) :: nBas
integer,intent(in) :: nO
2019-10-16 18:14:47 +02:00
double precision,intent(in) :: ENuc
2019-10-20 08:18:58 +02:00
double precision,intent(in) :: ERHF
2022-01-06 13:48:15 +01:00
double precision,intent(in) :: EcGM
2019-10-20 08:18:58 +02:00
double precision,intent(in) :: EcRPA(nspin)
2021-10-16 15:34:34 +02:00
double precision,intent(in) :: eHF(nBas)
2019-10-28 16:34:09 +01:00
double precision,intent(in) :: SigT(nBas)
double precision,intent(in) :: Z(nBas)
2021-10-16 15:34:34 +02:00
double precision,intent(in) :: eGT(nBas)
2019-10-16 18:14:47 +02:00
2019-10-28 16:34:09 +01:00
integer :: p,HOMO,LUMO
2019-10-16 18:14:47 +02:00
double precision :: Gap
! HOMO and LUMO
HOMO = nO
LUMO = HOMO + 1
2020-03-21 16:31:39 +01:00
if(nBas >= LUMO) then
2021-10-16 15:34:34 +02:00
Gap = eGT(LUMO) - eGT(HOMO)
2020-03-21 16:31:39 +01:00
else
Gap = 0d0
end if
2019-10-16 18:14:47 +02:00
! Dump results
write(*,*)'-------------------------------------------------------------------------------'
2023-11-29 16:20:53 +01:00
write(*,*)' G0T0pp@RHF calculation '
2019-10-16 18:14:47 +02:00
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)','|','Sig_GTpp (eV)','|','Z','|','e_GTpp (eV)','|'
2019-10-16 18:14:47 +02:00
write(*,*)'-------------------------------------------------------------------------------'
2019-10-28 16:34:09 +01:00
do p=1,nBas
2019-10-16 18:14:47 +02:00
write(*,'(1X,A1,1X,I3,1X,A1,1X,F15.6,1X,A1,1X,F15.6,1X,A1,1X,F15.6,1X,A1,1X,F15.6,1X,A1,1X)') &
2021-10-16 15:34:34 +02:00
'|',p,'|',eHF(p)*HaToeV,'|',SigT(p)*HaToeV,'|',Z(p),'|',eGT(p)*HaToeV,'|'
2023-12-03 18:47:30 +01:00
end do
2019-10-16 18:14:47 +02:00
write(*,*)'-------------------------------------------------------------------------------'
2023-11-29 16:20:53 +01:00
write(*,'(2X,A60,F15.6,A3)') 'G0T0pp@RHF HOMO energy = ',eGT(HOMO)*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'G0T0pp@RHF LUMO energy = ',eGT(LUMO)*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'G0T0pp@RHF HOMO-LUMO gap = ',Gap*HaToeV,' eV'
2021-10-16 15:34:34 +02:00
write(*,*)'-------------------------------------------------------------------------------'
2023-11-29 16:20:53 +01:00
write(*,'(2X,A60,F15.6,A3)') 'ppRPA@G0T0pp@RHF correlation energy (singlet) = ',EcRPA(1),' au'
write(*,'(2X,A60,F15.6,A3)') 'ppRPA@G0T0pp@RHF correlation energy (triplet) = ',EcRPA(2),' au'
write(*,'(2X,A60,F15.6,A3)') 'ppRPA@G0T0pp@RHF correlation energy = ',sum(EcRPA),' au'
write(*,'(2X,A60,F15.6,A3)') 'ppRPA@G0T0pp@RHF total energy = ',ENuc + ERHF + sum(EcRPA),' au'
write(*,'(2X,A60,F15.6,A3)') ' GM@G0T0pp@RHF correlation energy = ',EcGM,' au'
write(*,'(2X,A60,F15.6,A3)') ' GM@G0T0pp@RHF total energy = ',ENuc + ERHF + EcGM,' au'
2019-10-16 18:14:47 +02:00
write(*,*)'-------------------------------------------------------------------------------'
write(*,*)
2023-07-04 10:32:47 +02:00
end subroutine