4
1
mirror of https://github.com/pfloos/quack synced 2024-06-27 23:52:19 +02:00
quack/src/QuAcK/print_UG0W0.f90

64 lines
2.7 KiB
Fortran
Raw Normal View History

2020-09-22 22:13:51 +02:00
subroutine print_UG0W0(nBas,nO,e,ENuc,EHF,SigC,Z,eGW,EcRPA)
2020-09-21 23:04:26 +02:00
! Print one-electron energies and other stuff for G0W0
implicit none
include 'parameters.h'
2020-09-22 22:13:51 +02:00
integer,intent(in) :: nBas
integer,intent(in) :: nO(nspin)
2020-09-21 23:04:26 +02:00
double precision,intent(in) :: ENuc
double precision,intent(in) :: EHF
double precision,intent(in) :: EcRPA
2020-09-22 22:13:51 +02:00
double precision,intent(in) :: e(nBas,nspin)
double precision,intent(in) :: SigC(nBas,nspin)
double precision,intent(in) :: Z(nBas,nspin)
double precision,intent(in) :: eGW(nBas,nspin)
integer :: p
double precision :: HOMO
double precision :: LUMO
2020-09-21 23:04:26 +02:00
double precision :: Gap
! HOMO and LUMO
2020-09-22 22:13:51 +02:00
HOMO = max(eGW(nO(1),1),eGW(nO(2),2))
LUMO = min(eGW(nO(1)+1,1),eGW(nO(2)+1,2))
Gap = LUMO - HOMO
2020-09-21 23:04:26 +02:00
! Dump results
2020-09-22 22:13:51 +02:00
write(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
write(*,*)' Unrestricted one-shot G0W0 calculation (eV)'
write(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
write(*,'(A1,A3,A1,2A15,A1,2A15,A1,2A15,A1,2A15,A1)') &
'|','#','|','e_HF up','e_HF dw','|','Sig_c up','Sig_c dw','|', &
'Z up','Z dw','|','e_QP up','e_QP dw','|'
write(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
do p=1,nBas
write(*,'(A1,I3,A1,2F15.6,A1,2F15.6,A1,2F15.6,A1,2F15.6,A1)') &
'|',p,'|',e(p,1)*HaToeV,e(p,2)*HaToeV,'|',SigC(p,1)*HaToeV,SigC(p,2)*HaToeV,'|', &
Z(p,1),Z(p,2),'|',eGW(p,1)*HaToeV,eGW(p,2)*HaToeV,'|'
2020-09-21 23:04:26 +02:00
enddo
2020-09-22 22:13:51 +02:00
write(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
write(*,'(2X,A30,F15.6)') 'G0W0 HOMO energy (eV):',HOMO*HaToeV
write(*,'(2X,A30,F15.6)') 'G0W0 LUMO energy (eV):',LUMO*HaToeV
2020-09-21 23:04:26 +02:00
write(*,'(2X,A30,F15.6)') 'G0W0 HOMO-LUMO gap (eV):',Gap*HaToeV
2020-09-22 22:13:51 +02:00
write(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
write(*,'(2X,A30,F15.6)') 'RPA@HF total energy =',ENuc + EHF + EcRPA
write(*,'(2X,A30,F15.6)') 'RPA@HF correlation energy =',EcRPA
write(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
2020-09-21 23:04:26 +02:00
write(*,*)
end subroutine print_UG0W0