4
1
mirror of https://github.com/pfloos/quack synced 2024-11-07 22:53:59 +01:00
quack/src/QuAcK/print_RHF.f90

61 lines
2.2 KiB
Fortran
Raw Normal View History

2019-03-19 10:13:33 +01:00
subroutine print_RHF(nBas,nO,eHF,cHF,ENuc,ET,EV,EJ,EK,ERHF)
! Print one-electron energies and other stuff for G0W0
implicit none
include 'parameters.h'
integer,intent(in) :: nBas,nO
double precision,intent(in) :: eHF(nBas),cHF(nBas,nBas),ENuc,ET,EV,EJ,EK,ERHF
integer :: HOMO,LUMO
double precision :: Gap
! HOMO and LUMO
HOMO = nO
LUMO = HOMO + 1
Gap = eHF(LUMO)-eHF(HOMO)
! Dump results
write(*,*)
2020-01-15 22:29:43 +01:00
write(*,'(A50)') '-----------------------------------------'
2019-03-19 10:13:33 +01:00
write(*,'(A32)') ' Summary '
2020-01-15 22:29:43 +01:00
write(*,'(A50)') '-----------------------------------------'
write(*,'(A32,1X,F16.10)') ' One-electron energy = ',ET + EV
write(*,'(A32,1X,F16.10)') ' Kinetic energy = ',ET
write(*,'(A32,1X,F16.10)') ' Potential energy = ',EV
write(*,'(A50)') '-----------------------------------------'
write(*,'(A32,1X,F16.10)') ' Two-electron energy = ',EJ + EK
write(*,'(A32,1X,F16.10)') ' Coulomb energy = ',EJ
write(*,'(A32,1X,F16.10)') ' Exchange energy = ',EK
write(*,'(A50)') '-----------------------------------------'
write(*,'(A32,1X,F16.10)') ' Electronic energy = ',ERHF
write(*,'(A32,1X,F16.10)') ' Nuclear repulsion = ',ENuc
write(*,'(A32,1X,F16.10)') ' Hartree-Fock energy = ',ERHF + ENuc
write(*,'(A50)') '-----------------------------------------'
write(*,'(A36,F13.6)') ' HF HOMO energy (eV) = ',eHF(HOMO)*HaToeV
write(*,'(A36,F13.6)') ' HF LUMO energy (eV) = ',eHF(LUMO)*HaToeV
write(*,'(A36,F13.6)') ' HF HOMO-LUMO gap (eV) = ',Gap*HaToeV
write(*,'(A50)') '-----------------------------------------'
2019-03-19 10:13:33 +01:00
write(*,*)
! Print results
write(*,'(A50)') '---------------------------------------'
write(*,'(A32)') 'MO coefficients'
write(*,'(A50)') '---------------------------------------'
2019-09-22 21:15:53 +02:00
call matout(nBas,nBas,cHF)
2019-03-19 10:13:33 +01:00
write(*,*)
write(*,'(A50)') '---------------------------------------'
write(*,'(A32)') 'MO energies'
write(*,'(A50)') '---------------------------------------'
call matout(nBas,1,eHF)
write(*,*)
end subroutine print_RHF