4
1
mirror of https://github.com/pfloos/quack synced 2024-06-22 21:22:20 +02:00
quack/src/GW/print_evGW.f90

62 lines
2.7 KiB
Fortran
Raw Normal View History

2020-11-03 22:07:16 +01:00
subroutine print_evGW(nBas,nO,nSCF,Conv,eHF,ENuc,ERHF,SigC,Z,eGW,EcRPA,EcGM)
2019-03-19 10:13:33 +01:00
! Print one-electron energies and other stuff for evGW
implicit none
include 'parameters.h'
integer,intent(in) :: nBas,nO,nSCF
2019-05-04 17:13:50 +02:00
double precision,intent(in) :: ENuc
2020-11-03 22:07:16 +01:00
double precision,intent(in) :: ERHF
2020-09-24 11:56:06 +02:00
double precision,intent(in) :: Conv
2020-11-03 22:07:16 +01:00
double precision,intent(in) :: eHF(nBas)
2020-09-24 11:56:06 +02:00
double precision,intent(in) :: SigC(nBas)
double precision,intent(in) :: Z(nBas)
double precision,intent(in) :: eGW(nBas)
double precision,intent(in) :: EcRPA
double precision,intent(in) :: EcGM
integer :: p,HOMO,LUMO
2019-03-19 10:13:33 +01:00
double precision :: Gap
! HOMO and LUMO
HOMO = nO
LUMO = HOMO + 1
Gap = eGW(LUMO)-eGW(HOMO)
! Dump results
write(*,*)'-------------------------------------------------------------------------------'
if(nSCF < 10) then
write(*,'(1X,A21,I1,A1,I1,A12)')' Self-consistent evG',nSCF,'W',nSCF,' calculation'
else
write(*,'(1X,A21,I2,A1,I2,A12)')' Self-consistent evG',nSCF,'W',nSCF,' calculation'
endif
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_c (eV)','|','Z','|','e_QP (eV)','|'
write(*,*)'-------------------------------------------------------------------------------'
2020-09-24 11:56:06 +02:00
do p=1,nBas
2019-03-19 10:13:33 +01: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)') &
2020-11-03 22:07:16 +01:00
'|',p,'|',eHF(p)*HaToeV,'|',SigC(p)*HaToeV,'|',Z(p),'|',eGW(p)*HaToeV,'|'
2019-03-19 10:13:33 +01:00
enddo
write(*,*)'-------------------------------------------------------------------------------'
write(*,'(2X,A10,I3)') 'Iteration ',nSCF
write(*,'(2X,A14,F15.5)')'Convergence = ',Conv
write(*,*)'-------------------------------------------------------------------------------'
2020-11-03 22:07:16 +01:00
write(*,'(2X,A30,F15.6,A3)') 'evGW HOMO energy:',eGW(HOMO)*HaToeV,' eV'
write(*,'(2X,A30,F15.6,A3)') 'evGW LUMO energy:',eGW(LUMO)*HaToeV,' eV'
write(*,'(2X,A30,F15.6,A3)') 'evGW HOMO-LUMO gap :',Gap*HaToeV,' eV'
2019-03-19 10:13:33 +01:00
write(*,*)'-------------------------------------------------------------------------------'
2020-11-03 22:07:16 +01:00
write(*,'(2X,A30,F15.6,A3)') 'RPA@evGW total energy :',ENuc + ERHF + EcRPA,' au'
write(*,'(2X,A30,F15.6,A3)') 'RPA@evGW correlation energy:',EcRPA,' au'
write(*,'(2X,A30,F15.6,A3)') 'GM@evGW total energy :',ENuc + ERHF + EcGM,' au'
write(*,'(2X,A30,F15.6,A3)') 'GM@evGW correlation energy:',EcGM,' au'
2020-09-24 11:56:06 +02:00
write(*,*)'-------------------------------------------------------------------------------'
2019-03-19 10:13:33 +01:00
write(*,*)
end subroutine print_evGW