10
1
mirror of https://github.com/pfloos/quack synced 2024-12-25 22:03:44 +01:00
QuAcK/src/GW/print_UG0W0.f90

77 lines
3.4 KiB
Fortran
Raw Normal View History

2020-11-04 14:47:45 +01:00
subroutine print_UG0W0(nBas,nO,eHF,ENuc,EUHF,SigC,Z,eGW,EcRPA,EcGM)
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
2020-11-03 22:07:16 +01:00
double precision,intent(in) :: EUHF
2020-09-21 23:04:26 +02:00
double precision,intent(in) :: EcRPA
2020-11-04 14:47:45 +01:00
double precision,intent(in) :: EcGM(nspin)
2020-11-03 22:07:16 +01:00
double precision,intent(in) :: eHF(nBas,nspin)
2020-09-22 22:13:51 +02:00
double precision,intent(in) :: SigC(nBas,nspin)
double precision,intent(in) :: Z(nBas,nspin)
double precision,intent(in) :: eGW(nBas,nspin)
integer :: p
integer :: ispin
double precision :: HOMO(nspin)
double precision :: LUMO(nspin)
double precision :: Gap(nspin)
2020-09-21 23:04:26 +02:00
! HOMO and LUMO
do ispin=1,nspin
if(nO(ispin) > 0) then
HOMO(ispin) = eGW(nO(ispin),ispin)
LUMO(ispin) = eGW(nO(ispin)+1,ispin)
Gap(ispin) = LUMO(ispin) - HOMO(ispin)
else
HOMO(ispin) = 0d0
2020-11-03 22:07:16 +01:00
LUMO(ispin) = eGW(1,ispin)
Gap(ispin) = 0d0
end if
end do
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(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
2020-09-24 14:39:37 +02:00
write(*,'(A1,A3,A1,A30,A1,A30,A1,A30,A1,A30,A1)') &
'|',' ','|','e_HF ','|','Sig_c ','|','Z ','|','e_QP ','|'
2020-09-22 22:13:51 +02:00
write(*,'(A1,A3,A1,2A15,A1,2A15,A1,2A15,A1,2A15,A1)') &
2020-09-24 14:39:37 +02:00
'|','#','|','up ','dw ','|','up ','dw ','|','up ','dw ','|','up ','dw ','|'
2020-09-22 22:13:51 +02:00
write(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
do p=1,nBas
write(*,'(A1,I3,A1,2F15.6,A1,2F15.6,A1,2F15.6,A1,2F15.6,A1)') &
2020-11-03 22:07:16 +01:00
'|',p,'|',eHF(p,1)*HaToeV,eHF(p,2)*HaToeV,'|',SigC(p,1)*HaToeV,SigC(p,2)*HaToeV,'|', &
2020-09-22 22:13:51 +02:00
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(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
2020-11-03 22:07:16 +01:00
write(*,'(2X,A30,F15.6,A3)') 'UG0W0 HOMO energy:',maxval(HOMO(:))*HaToeV,' eV'
write(*,'(2X,A30,F15.6,A3)') 'UG0W0 LUMO energy:',minval(LUMO(:))*HaToeV,' eV'
write(*,'(2X,A30,F15.6,A3)') 'UG0W0 HOMO-LUMO gap :',(minval(LUMO(:))-maxval(HOMO(:)))*HaToeV,' eV'
2020-09-22 22:13:51 +02:00
write(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
2020-11-03 22:07:16 +01:00
write(*,'(2X,A30,F15.6,A3)') 'RPA@UG0W0 total energy :',ENuc + EUHF + EcRPA,' au'
write(*,'(2X,A30,F15.6,A3)') 'RPA@UG0W0 correlation energy:',EcRPA,' au'
2020-11-04 14:47:45 +01:00
write(*,'(2X,A30,F15.6,A3)') ' GM@UG0W0 total energy :',ENuc + EUHF + sum(EcGM(:)),' au'
write(*,'(2X,A30,F15.6,A3)') ' GM@UG0W0 correlation energy:',sum(EcGM(:)),' au'
2020-09-22 22:13:51 +02:00
write(*,*)'-------------------------------------------------------------------------------&
-------------------------------------------------'
2020-09-21 23:04:26 +02:00
write(*,*)
end subroutine print_UG0W0