2023-08-01 21:32:57 +02:00
|
|
|
subroutine print_qsGF2(nBas,nO,nSCF,Conv,thresh,eHF,eGF,c,SigC,Z,ENuc,ET,EV,EJ,Ex,Ec,EqsGF,dipole)
|
2021-03-05 22:34:48 +01:00
|
|
|
|
|
|
|
! Print one-electron energies and other stuff for qsGF2
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
integer,intent(in) :: nBas
|
|
|
|
integer,intent(in) :: nO
|
|
|
|
integer,intent(in) :: nSCF
|
|
|
|
double precision,intent(in) :: ENuc
|
|
|
|
double precision,intent(in) :: Conv
|
|
|
|
double precision,intent(in) :: thresh
|
|
|
|
double precision,intent(in) :: eHF(nBas)
|
2023-08-01 21:32:57 +02:00
|
|
|
double precision,intent(in) :: eGF(nBas)
|
2021-03-05 22:34:48 +01:00
|
|
|
double precision,intent(in) :: c(nBas)
|
2023-07-30 22:14:28 +02:00
|
|
|
double precision,intent(in) :: SigC(nBas,nBas)
|
|
|
|
double precision,intent(in) :: Z(nBas)
|
2021-03-07 23:04:47 +01:00
|
|
|
double precision,intent(in) :: ET
|
|
|
|
double precision,intent(in) :: EV
|
|
|
|
double precision,intent(in) :: EJ
|
|
|
|
double precision,intent(in) :: Ex
|
2021-03-07 22:44:37 +01:00
|
|
|
double precision,intent(in) :: Ec
|
2023-08-01 21:32:57 +02:00
|
|
|
double precision,intent(in) :: EqsGF
|
2021-03-05 22:34:48 +01:00
|
|
|
double precision,intent(in) :: dipole(ncart)
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
integer :: q,ixyz,HOMO,LUMO
|
2021-03-07 23:04:47 +01:00
|
|
|
double precision :: Gap
|
2021-03-05 22:34:48 +01:00
|
|
|
double precision,external :: trace_matrix
|
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
! HOMO and LUMO
|
|
|
|
|
|
|
|
HOMO = nO
|
|
|
|
LUMO = HOMO + 1
|
2023-08-01 21:32:57 +02:00
|
|
|
Gap = eGF(LUMO)-eGF(HOMO)
|
2021-03-05 22:34:48 +01:00
|
|
|
|
|
|
|
! Dump results
|
|
|
|
|
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
|
|
|
if(nSCF < 10) then
|
2021-03-07 23:04:47 +01:00
|
|
|
write(*,'(1X,A21,I1,A2,A12)')' Self-consistent qsG',nSCF,'F2',' calculation'
|
2021-03-05 22:34:48 +01:00
|
|
|
else
|
2021-03-07 23:04:47 +01:00
|
|
|
write(*,'(1X,A21,I2,A2,A12)')' Self-consistent qsG',nSCF,'F2',' calculation'
|
2021-03-05 22:34:48 +01:00
|
|
|
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)','|','Sig_c (eV)','|','Z','|','e_QP (eV)','|'
|
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
|
|
|
|
|
|
|
do q=1,nBas
|
|
|
|
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)') &
|
2023-08-01 21:32:57 +02:00
|
|
|
'|',q,'|',eHF(q)*HaToeV,'|',SigC(q,q)*HaToeV,'|',Z(q),'|',eGF(q)*HaToeV,'|'
|
2021-03-05 22:34:48 +01:00
|
|
|
enddo
|
|
|
|
|
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
|
|
|
write(*,'(2X,A10,I3)') 'Iteration ',nSCF
|
2021-03-27 15:06:51 +01:00
|
|
|
write(*,'(2X,A14,F15.5)')'Convergence = ',Conv
|
2023-08-01 21:32:57 +02:00
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') 'qsGF2 HOMO energy =',eGF(HOMO)*HaToeV,' eV'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') 'qsGF2 LUMO energy =',eGF(LUMO)*HaToeV,' eV'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') 'qsGF2 HOMO-LUMO gap =',Gap*HaToeV,' eV'
|
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') ' qsGF2 total energy =',ENuc + EqsGF,' au'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') ' qsGF2 exchange energy =',Ex,' au'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') ' qsGF2 correlation energy =',Ec,' au'
|
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
2021-03-05 22:34:48 +01:00
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
! Dump results for final iteration
|
|
|
|
|
|
|
|
if(Conv < thresh) then
|
|
|
|
|
|
|
|
write(*,*)
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
|
|
|
write(*,'(A32)') ' Summary '
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' One-electron energy: ',ET + EV,' au'
|
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' Kinetic energy: ',ET,' au'
|
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' Potential energy: ',EV,' au'
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2021-03-23 19:50:46 +01:00
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' Two-electron energy: ',EJ + Ex + Ec,' au'
|
2021-03-05 22:34:48 +01:00
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' Hartree energy: ',EJ,' au'
|
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' Exchange energy: ',Ex,' au'
|
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' Correlation energy: ',Ec,' au'
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-08-01 21:32:57 +02:00
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' Electronic energy: ',EqsGF,' au'
|
2021-03-05 22:34:48 +01:00
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' Nuclear repulsion: ',ENuc,' au'
|
2023-08-01 21:32:57 +02:00
|
|
|
write(*,'(A32,1X,F16.10,A3)') ' qsGF2 energy: ',ENuc + EqsGF,' au'
|
2021-03-05 22:34:48 +01:00
|
|
|
write(*,'(A50)') '---------------------------------------'
|
|
|
|
write(*,'(A35)') ' Dipole moment (Debye) '
|
|
|
|
write(*,'(10X,4A10)') 'X','Y','Z','Tot.'
|
|
|
|
write(*,'(10X,4F10.6)') (dipole(ixyz)*auToD,ixyz=1,ncart),norm2(dipole)*auToD
|
|
|
|
write(*,'(A50)') '-----------------------------------------'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
|
|
|
write(*,'(A32)') ' qsGF2 MO coefficients'
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
|
|
|
call matout(nBas,nBas,c)
|
|
|
|
write(*,*)
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
|
|
|
write(*,'(A32)') ' qsGF2 MO energies'
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-08-01 21:32:57 +02:00
|
|
|
call matout(nBas,1,eGF)
|
2021-03-05 22:34:48 +01:00
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2023-07-12 22:37:04 +02:00
|
|
|
end subroutine
|