10
1
mirror of https://github.com/pfloos/quack synced 2025-05-06 07:05:33 +02:00

Merge branch 'master' of github.com:pfloos/QuAcK

This commit is contained in:
lburth 2025-04-30 11:34:14 +02:00
commit f6d2322204

View File

@ -1,10 +1,10 @@
! ---
subroutine print_complex_qsRGF2(nBas, nOrb, nO, nSCF, Conv, thresh, eHF, eGW, c, SigC, &
Z, ENuc, ET, EV,EW, EJ, EK, EcGM, EcRPA, EqsGW, dipole)
subroutine print_complex_qsRGF2(nBas, nOrb, nO, nSCF, Conv, thresh, eHF, eGF, c, SigC, &
Z, ENuc, ET, EV,EW, EJ, EK, EcGM, EcRPA, EqsGF, dipole)
! Print useful information about qsRGW calculation
! Print useful information about qsRGF calculation
implicit none
include 'parameters.h'
@ -25,11 +25,11 @@ subroutine print_complex_qsRGF2(nBas, nOrb, nO, nSCF, Conv, thresh, eHF, eGW, c,
double precision,intent(in) :: Conv
double precision,intent(in) :: thresh
complex*16,intent(in) :: eHF(nOrb)
complex*16,intent(in) :: eGW(nOrb)
complex*16,intent(in) :: eGF(nOrb)
complex*16,intent(in) :: c(nBas,nOrb)
complex*16,intent(in) :: SigC(nOrb,nOrb)
complex*16,intent(in) :: Z(nOrb)
complex*16,intent(in) :: EqsGW
complex*16,intent(in) :: EqsGF
complex*16,intent(in) :: dipole(ncart)
! Local variables
@ -43,9 +43,9 @@ subroutine print_complex_qsRGF2(nBas, nOrb, nO, nSCF, Conv, thresh, eHF, eGW, c,
! HOMO and LUMO
HOMO = maxloc(real(eGW(1:nO)),1)
LUMO = minloc(real(eGW(nO+1:nBas)),1) + nO
Gap = eGW(LUMO)-eGW(HOMO)
HOMO = maxloc(real(eGF(1:nO)),1)
LUMO = minloc(real(eGF(nO+1:nBas)),1) + nO
Gap = eGF(LUMO)-eGF(HOMO)
! Compute energies
@ -53,16 +53,16 @@ subroutine print_complex_qsRGF2(nBas, nOrb, nO, nSCF, Conv, thresh, eHF, eGW, c,
write(*,*)' Self-consistent qsGF2 calculation'
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)') &
'|','#','|','Re(e_HF (eV))','|','Re(Sig_GW) (eV)','|','Re(Z)','|','Re(e_GW) (eV)','|'
'|','#','|','Re(e_HF (eV))','|','Re(Sig_GF) (eV)','|','Re(Z)','|','Re(e_GF) (eV)','|'
write(*,'(1X,A1,1X,A3,1X,A1,1X,A15,1X,A1,1X,A15,1X,A1,1X,A15,1X,A1,1X,A15,1X,A1,1X)') &
'|','#','|','Im(e_HF (eV))','|','Im(Sig_GW) (eV)','|','Im(Z)','|','Im(e_GW) (eV)','|'
'|','#','|','Im(e_HF (eV))','|','Im(Sig_GF) (eV)','|','Im(Z)','|','Im(e_GF) (eV)','|'
write(*,*)'-------------------------------------------------------------------------------'
do p=1,nOrb
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)') &
'|',p,'|',real(eHF(p))*HaToeV,'|',real(SigC(p,p))*HaToeV,'|',real(Z(p)),'|',real(eGW(p))*HaToeV,'|'
'|',p,'|',real(eHF(p))*HaToeV,'|',real(SigC(p,p))*HaToeV,'|',real(Z(p)),'|',real(eGF(p))*HaToeV,'|'
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)') &
'|',p,'|',aimag(eHF(p))*HaToeV,'|',aimag(SigC(p,p))*HaToeV,'|',aimag(Z(p)),'|',aimag(eGW(p))*HaToeV,'|'
'|',p,'|',aimag(eHF(p))*HaToeV,'|',aimag(SigC(p,p))*HaToeV,'|',aimag(Z(p)),'|',aimag(eGF(p))*HaToeV,'|'
write(*,*)'-------------------------------------------------------------------------------'
if(p==nO) then
write(*,*)'-------------------------------------------------------------------------------'
@ -74,17 +74,17 @@ subroutine print_complex_qsRGF2(nBas, nOrb, nO, nSCF, Conv, thresh, eHF, eGW, c,
write(*,'(2X,A10,I3)') 'Iteration ',nSCF
write(*,'(2X,A14,F15.5)')'Convergence = ',Conv
write(*,*)'-------------------------------------------------------------------------------'
write(*,'(2X,A60,F15.6,A3)') 'qsGW@RHF HOMO real energy = ',real(eGW(HOMO))*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGW@RHF HOMO imag energy = ',aimag(eGW(HOMO))*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGW@RHF LUMO real energy = ',real(eGW(LUMO))*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGW@RHF LUMO imag energy = ',aimag(eGW(LUMO))*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGW@RHF HOMO-LUMO gap = ',real(Gap)*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGW@RHF HOMO-LUMO gap = ',aimag(Gap)*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGF@RHF HOMO real energy = ',real(eGF(HOMO))*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGF@RHF HOMO imag energy = ',aimag(eGF(HOMO))*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGF@RHF LUMO real energy = ',real(eGF(LUMO))*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGF@RHF LUMO imag energy = ',aimag(eGF(LUMO))*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGF@RHF HOMO-LUMO gap = ',real(Gap)*HaToeV,' eV'
write(*,'(2X,A60,F15.6,A3)') 'qsGF@RHF HOMO-LUMO gap = ',aimag(Gap)*HaToeV,' eV'
write(*,*)'-------------------------------------------------------------------------------'
write(*,'(2X,A60,F15.6,A3)') ' qsGW@RHF total real energy = ',ENuc + real(EqsGW),' au'
write(*,'(2X,A60,F15.6,A3)') ' qsGW@RHF total imag energy = ',aimag(EqsGW),' au'
write(*,'(2X,A60,F15.6,A3)') ' qsGW@RHF exchange energy = ',real(EK),' au'
write(*,'(2X,A60,F15.6,A3)') ' qsGW@RHF exchange energy = ',aimag(EK),' au'
write(*,'(2X,A60,F15.6,A3)') ' qsGF@RHF total real energy = ',ENuc + real(EqsGF),' au'
write(*,'(2X,A60,F15.6,A3)') ' qsGF@RHF total imag energy = ',aimag(EqsGF),' au'
write(*,'(2X,A60,F15.6,A3)') ' qsGF@RHF exchange energy = ',real(EK),' au'
write(*,'(2X,A60,F15.6,A3)') ' qsGF@RHF exchange energy = ',aimag(EK),' au'
write(*,*)'-------------------------------------------------------------------------------'
write(*,*)
@ -114,25 +114,25 @@ subroutine print_complex_qsRGF2(nBas, nOrb, nO, nSCF, Conv, thresh, eHF, eGW, c,
write(*,'(A33,1X,F16.10,A3)') ' Correlation energy = ',real(EcGM),' au'
write(*,'(A33,1X,F16.10,A3)') ' Correlation energy = ',aimag(EcGM),' au'
write(*,'(A50)') '---------------------------------------'
write(*,'(A33,1X,F16.10,A3)') ' Electronic energy = ',real(EqsGW),' au'
write(*,'(A33,1X,F16.10,A3)') ' Electronic energy = ',aimag(EqsGW),' au'
write(*,'(A33,1X,F16.10,A3)') ' Electronic energy = ',real(EqsGF),' au'
write(*,'(A33,1X,F16.10,A3)') ' Electronic energy = ',aimag(EqsGF),' au'
write(*,'(A33,1X,F16.10,A3)') ' Nuclear repulsion = ',ENuc,' au'
write(*,'(A33,1X,F16.10,A3)') ' qsRGW energy = ',ENuc + real(EqsGW),' au'
write(*,'(A33,1X,F16.10,A3)') ' qsRGW energy = ',aimag(EqsGW),' au'
write(*,'(A33,1X,F16.10,A3)') ' qsRGF energy = ',ENuc + real(EqsGF),' au'
write(*,'(A33,1X,F16.10,A3)') ' qsRGF energy = ',aimag(EqsGF),' au'
write(*,'(A50)') '---------------------------------------'
write(*,*)
if(dump_orb) then
write(*,'(A50)') '---------------------------------------'
write(*,'(A50)') ' Restricted qsGW orbital coefficients'
write(*,'(A50)') ' Restricted qsGF orbital coefficients'
write(*,'(A50)') '---------------------------------------'
call complex_matout(nBas, nOrb, c)
write(*,*)
end if
write(*,'(A50)') '---------------------------------------'
write(*,'(A50)') ' Restricted qsGW orbital energies (au) '
write(*,'(A50)') ' Restricted qsGF orbital energies (au) '
write(*,'(A50)') '---------------------------------------'
call complex_vecout(nOrb, eGW)
call complex_vecout(nOrb, eGF)
write(*,*)
end if