diff --git a/src/GW/print_qsRGW.f90 b/src/GW/print_qsRGW.f90 index 9fd695c..e093975 100644 --- a/src/GW/print_qsRGW.f90 +++ b/src/GW/print_qsRGW.f90 @@ -1,8 +1,5 @@ - -! --- - -subroutine print_qsRGW(nBas, nOrb, nO, nSCF, Conv, thresh, eHF, eGW, c, SigC, & - Z, ENuc, ET, EV, EJ, EK, EcGM, EcRPA, EqsGW, dipole) +subroutine print_qsRGW(nBas,nOrb,nO,nSCF,Conv,thresh,eHF,eGW,c,SigC, & + Z,ENuc,ET,EV,EJ,EK,EcGM,EcRPA,EqsGW,dipole) ! Print useful information about qsRGW calculation diff --git a/src/Parquet/GParquet.f90 b/src/Parquet/GParquet.f90 index 08eba12..ed0481e 100644 --- a/src/Parquet/GParquet.f90 +++ b/src/Parquet/GParquet.f90 @@ -411,12 +411,12 @@ subroutine GParquet(max_it_1b,conv_1b,max_it_2b,conv_2b,nOrb,nC,nO,nV,nR,nS,eHF, deallocate(eh_Phi,pp_Phi) - write(*,*) '----------------------------------------------' - write(*,*) ' Two-body (frequency/kernel) convergence ' - write(*,*) '----------------------------------------------' - write(*,'(1X,A24,F10.6,1X,F10.6)')'Error for eh channel = ',err_eig_eh,err_eh - write(*,'(1X,A24,F10.6,1X,F10.6)')'Error for pp channel = ',err_eig_pp,err_pp - write(*,*) '----------------------------------------------' + write(*,*) '------------------------------------------------' + write(*,*) ' Two-body (frequency/kernel) convergence ' + write(*,*) '------------------------------------------------' + write(*,'(1X,A24,F10.6,1X,A1,1X,F10.6)')'Error for eh channel = ',err_eig_eh,'/',err_eh + write(*,'(1X,A24,F10.6,1X,A1,1X,F10.6)')'Error for pp channel = ',err_eig_pp,'/',err_pp + write(*,*) '------------------------------------------------' write(*,*) ! Convergence criteria @@ -459,8 +459,7 @@ subroutine GParquet(max_it_1b,conv_1b,max_it_2b,conv_2b,nOrb,nC,nO,nV,nR,nS,eHF, allocate(eQPlin(nOrb),Z(nOrb),SigC(nOrb)) - write(*,*) 'Building self-energy' - + write(*,*) 'Building self-energy...' call wall_time(start_t) call G_Parquet_self_energy(eta,nOrb,nC,nO,nV,nR,nS,nOO,nVV,eOld,ERI, & @@ -471,8 +470,6 @@ subroutine GParquet(max_it_1b,conv_1b,max_it_2b,conv_2b,nOrb,nC,nO,nV,nR,nS,eHF, write(*,*) eQPlin(:) = eHF(:) + Z(:)*SigC(:) - - call print_RG0F2(nOrb,nO,eHF,SigC,eQPlin,Z,0d0,0d0,0d0) ! Solve the quasi-particle equation @@ -491,13 +488,17 @@ subroutine GParquet(max_it_1b,conv_1b,max_it_2b,conv_2b,nOrb,nC,nO,nV,nR,nS,eHF, end if - deallocate(eQPlin,Z,SigC) - ! Check one-body converge err_1b = maxval(abs(eOld - eQP)) eOld(:) = eQP(:) - write(*,'(A50,1X,F9.5,A8)') 'Error for one-body iteration =', err_1b + + ! Print for one-body part + + call print_parquet_1b(nOrb,nO,eHF,SigC,eQP,Z,n_it_1b,err_1b,0d0,0d0,0d0) + + deallocate(eQPlin,Z,SigC) + call wall_time(end_1b) t_1b = end_1b - start_1b write(*,'(A50,1X,F9.3,A8)') 'Wall time for one-body iteration =',t_1b,' seconds' diff --git a/src/Parquet/print_parquet_1b.f90 b/src/Parquet/print_parquet_1b.f90 new file mode 100644 index 0000000..4b6ab38 --- /dev/null +++ b/src/Parquet/print_parquet_1b.f90 @@ -0,0 +1,58 @@ +subroutine print_parquet_1b(nOrb,nO,eHF,SigC,eQP,Z,n_it_1b,err_1b,ENuc,ERHF,Ec) + +! Print one-electron energies and other stuff for G0F2 + + implicit none + include 'parameters.h' + + integer,intent(in) :: nOrb + integer,intent(in) :: nO + double precision,intent(in) :: eHF(nOrb) + double precision,intent(in) :: SigC(nOrb) + double precision,intent(in) :: eQP(nOrb) + double precision,intent(in) :: Z(nOrb) + integer,intent(in) :: n_it_1b + double precision,intent(in) :: err_1b + double precision,intent(in) :: ENuc + double precision,intent(in) :: ERHF + double precision,intent(in) :: Ec + + integer :: p + integer :: HOMO + integer :: LUMO + double precision :: Gap + +! HOMO and LUMO + + HOMO = nO + LUMO = HOMO + 1 + Gap = eQP(LUMO) - eQP(HOMO) + +! Dump results + + write(*,*)'-------------------------------------------------------------------------------' + write(*,*)' Parquet self-energy ' + 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 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,'|',eHF(p)*HaToeV,'|',SigC(p)*HaToeV,'|',Z(p),'|',eQP(p)*HaToeV,'|' + end do + + write(*,*)'-------------------------------------------------------------------------------' + write(*,'(2X,A60,I15)') 'One-body iteration # ',n_it_1b + write(*,'(2X,A60,F15.6)') 'One-body convergence ',err_1b + write(*,*)'-------------------------------------------------------------------------------' + write(*,'(2X,A60,F15.6,A3)') 'Parquet HOMO energy = ',eQP(HOMO)*HaToeV,' eV' + write(*,'(2X,A60,F15.6,A3)') 'Parquet LUMO energy = ',eQP(LUMO)*HaToeV,' eV' + write(*,'(2X,A60,F15.6,A3)') 'Parquet HOMO-LUMO gap = ',Gap*HaToeV,' eV' + write(*,*)'-------------------------------------------------------------------------------' + write(*,'(2X,A60,F15.6,A3)') 'Parquet total energy = ',ENuc + ERHF + Ec,' au' + write(*,'(2X,A60,F15.6,A3)') 'Parquet correlation energy = ',Ec,' au' + write(*,*)'-------------------------------------------------------------------------------' + write(*,*) + +end subroutine