2023-11-09 09:37:21 +01:00
|
|
|
subroutine print_qsRGW(nBas,nO,nSCF,Conv,thresh,eHF,eGW,c,SigC,Z,ENuc,ET,EV,EJ,EK,EcGM,EcRPA,EqsGW,dipole)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2023-11-09 09:37:21 +01:00
|
|
|
! Print useful information about qsRGW calculation
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2021-03-01 14:55:29 +01:00
|
|
|
integer,intent(in) :: nBas
|
|
|
|
integer,intent(in) :: nO
|
|
|
|
integer,intent(in) :: nSCF
|
|
|
|
double precision,intent(in) :: ENuc
|
2021-03-23 22:35:46 +01:00
|
|
|
double precision,intent(in) :: ET
|
|
|
|
double precision,intent(in) :: EV
|
|
|
|
double precision,intent(in) :: EJ
|
2023-11-09 09:37:21 +01:00
|
|
|
double precision,intent(in) :: EK
|
2021-03-01 14:55:29 +01:00
|
|
|
double precision,intent(in) :: EcGM
|
|
|
|
double precision,intent(in) :: EcRPA
|
|
|
|
double precision,intent(in) :: Conv
|
|
|
|
double precision,intent(in) :: thresh
|
|
|
|
double precision,intent(in) :: eHF(nBas)
|
|
|
|
double precision,intent(in) :: eGW(nBas)
|
|
|
|
double precision,intent(in) :: c(nBas)
|
2021-03-27 15:03:54 +01:00
|
|
|
double precision,intent(in) :: SigC(nBas,nBas)
|
|
|
|
double precision,intent(in) :: Z(nBas)
|
2023-08-21 10:54:33 +02:00
|
|
|
double precision,intent(in) :: EqsGW
|
2020-10-21 12:58:37 +02:00
|
|
|
double precision,intent(in) :: dipole(ncart)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
2023-11-08 22:58:55 +01:00
|
|
|
logical :: dump_orb = .false.
|
2023-08-01 21:32:57 +02:00
|
|
|
integer :: p,ixyz,HOMO,LUMO
|
2021-03-23 22:35:46 +01:00
|
|
|
double precision :: Gap
|
2019-03-19 10:13:33 +01:00
|
|
|
double precision,external :: trace_matrix
|
|
|
|
|
2019-09-23 13:31:01 +02:00
|
|
|
! Output variables
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
! HOMO and LUMO
|
|
|
|
|
|
|
|
HOMO = nO
|
|
|
|
LUMO = HOMO + 1
|
|
|
|
Gap = eGW(LUMO)-eGW(HOMO)
|
|
|
|
|
2020-11-03 21:47:57 +01:00
|
|
|
! Compute energies
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
! Dump results
|
|
|
|
|
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
2023-11-09 09:37:21 +01:00
|
|
|
if(nSCF < 10) then
|
|
|
|
write(*,'(1X,A22,I1,A1,I1,A12)')' Self-consistent qsRG',nSCF,'W',nSCF,' calculation'
|
|
|
|
elseif(nSCF < 100) then
|
|
|
|
write(*,'(1X,A22,I2,A1,I2,A12)')' Self-consistent qsRG',nSCF,'W',nSCF,' calculation'
|
2019-03-19 10:13:33 +01:00
|
|
|
else
|
2023-11-09 09:37:21 +01:00
|
|
|
write(*,'(1X,A22,I3,A1,I3,A12)')' Self-consistent qsRG',nSCF,'W',nSCF,' calculation'
|
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
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)') &
|
2023-08-01 21:32:57 +02:00
|
|
|
'|','#','|','e_HF (eV)','|','Sig_GW (eV)','|','Z','|','e_GW (eV)','|'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
|
|
|
|
2023-08-01 21:32:57 +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)') &
|
2023-08-01 21:32:57 +02:00
|
|
|
'|',p,'|',eHF(p)*HaToeV,'|',SigC(p,p)*HaToeV,'|',Z(p),'|',eGW(p)*HaToeV,'|'
|
2019-03-19 10:13:33 +01:00
|
|
|
enddo
|
|
|
|
|
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
|
|
|
write(*,'(2X,A10,I3)') 'Iteration ',nSCF
|
2021-03-27 15:03:54 +01:00
|
|
|
write(*,'(2X,A14,F15.5)')'Convergence = ',Conv
|
2023-08-01 21:32:57 +02:00
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
2023-11-09 17:04:15 +01:00
|
|
|
write(*,'(2X,A60,F15.6,A3)') 'qsRGW HOMO energy = ',eGW(HOMO)*HaToeV,' eV'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') 'qsRGW LUMO energy = ',eGW(LUMO)*HaToeV,' eV'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') 'qsRGW HOMO-LUMO gap = ',Gap*HaToeV,' eV'
|
2023-08-01 21:32:57 +02:00
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
2023-11-09 17:04:15 +01:00
|
|
|
write(*,'(2X,A60,F15.6,A3)') ' qsRGW total energy = ',ENuc + EqsGW,' au'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') ' qsRGW exchange energy = ',EK,' au'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') ' GM@qsRGW correlation energy = ',EcGM,' au'
|
|
|
|
write(*,'(2X,A60,F15.6,A3)') 'phRPA@qsRGW correlation energy = ',EcRPA,' au'
|
2023-08-01 21:32:57 +02:00
|
|
|
write(*,*)'-------------------------------------------------------------------------------'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
! Dump results for final iteration
|
|
|
|
|
|
|
|
if(Conv < thresh) then
|
|
|
|
|
|
|
|
write(*,*)
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-11-09 09:37:21 +01:00
|
|
|
write(*,'(A33)') ' Summary '
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-11-09 09:37:21 +01:00
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' One-electron energy = ',ET + EV,' au'
|
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' Kinetic energy = ',ET,' au'
|
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' Potential energy = ',EV,' au'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-11-09 09:37:21 +01:00
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' Two-electron energy = ',EJ + EK,' au'
|
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' Hartree energy = ',EJ,' au'
|
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' Exchange energy = ',EK,' au'
|
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' Correlation energy = ',EcGM,' au'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-11-09 09:37:21 +01:00
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' Electronic energy = ',EqsGW,' au'
|
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' Nuclear repulsion = ',ENuc,' au'
|
|
|
|
write(*,'(A33,1X,F16.10,A3)') ' qsRGW energy = ',ENuc + EqsGW,' au'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-11-09 09:37:21 +01:00
|
|
|
write(*,'(A36)') ' Dipole moment (Debye) '
|
2020-10-21 12:58:37 +02:00
|
|
|
write(*,'(10X,4A10)') 'X','Y','Z','Tot.'
|
2023-11-09 09:37:21 +01:00
|
|
|
write(*,'(10X,4F10.4)') (dipole(ixyz)*auToD,ixyz=1,ncart),norm2(dipole)*auToD
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,*)
|
|
|
|
|
2023-11-08 22:58:55 +01:00
|
|
|
if(dump_orb) then
|
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-11-09 09:37:21 +01:00
|
|
|
write(*,'(A50)') ' Restricted qsGW orbital coefficients'
|
2023-11-08 22:58:55 +01:00
|
|
|
write(*,'(A50)') '---------------------------------------'
|
|
|
|
call matout(nBas,nBas,c)
|
|
|
|
write(*,*)
|
|
|
|
end if
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-11-09 09:37:21 +01:00
|
|
|
write(*,'(A50)') ' Restricted qsGW orbital energies (au) '
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,'(A50)') '---------------------------------------'
|
2023-11-09 09:37:21 +01:00
|
|
|
call vecout(nBas,eGW)
|
2019-03-19 10:13:33 +01:00
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2023-07-28 15:00:17 +02:00
|
|
|
end subroutine
|