From c046bc277c138628cdb56908684b5c45a32a6ace Mon Sep 17 00:00:00 2001 From: pfloos Date: Thu, 24 Aug 2023 12:14:07 +0200 Subject: [PATCH] more clean up in QP root search --- input/methods | 4 ++-- src/GT/GTeh_QP_graph.f90 | 17 +++++++++-------- src/GT/GTpp_QP_graph.f90 | 19 ++++++++++--------- src/GW/GW_QP_graph.f90 | 14 ++++++++------ 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/input/methods b/input/methods index 7b17615..16a717e 100644 --- a/input/methods +++ b/input/methods @@ -13,7 +13,7 @@ # G0F2* evGF2* qsGF2* G0F3 evGF3 F F F F F # G0W0* evGW* qsGW* SRG-qsGW ufG0W0 ufGW - T F F F F F + F F F F F F # G0T0pp* evGTpp* qsGTpp* G0T0eh evGTeh qsGTeh - F F F F F F + F F F T F F # * unrestricted version available diff --git a/src/GT/GTeh_QP_graph.f90 b/src/GT/GTeh_QP_graph.f90 index c982962..8ef55df 100644 --- a/src/GT/GTeh_QP_graph.f90 +++ b/src/GT/GTeh_QP_graph.f90 @@ -41,11 +41,11 @@ subroutine GTeh_QP_graph(eta,nBas,nC,nO,nV,nR,nS,eHF,Om,rhoL,rhoR,eGTlin,eGT,Z) ! Run Newton's algorithm to find the root - do p=nC+1,nBas-nR + write(*,*)'------------------------------------' + write(*,'(A5,1X,A3,1X,A15,1X,A10)') 'Orb.','It.','e_GTeh (eV)','Z' + write(*,*)'------------------------------------' - write(*,*) '-----------------' - write(*,'(A10,I3)') 'Orbital ',p - write(*,*) '-----------------' + do p=nC+1,nBas-nR w = eGTlin(p) nIt = 0 @@ -66,19 +66,20 @@ subroutine GTeh_QP_graph(eta,nBas,nC,nO,nV,nR,nS,eHF,Om,rhoL,rhoR,eGTlin,eGT,Z) if(nIt == maxIt) then eGT(p) = eGTlin(p) - write(*,*) 'Newton root search has not converged!' + write(*,'(I5,1X,I3,1X,F15.9,1X,F10.6,1X,A12)') p,nIt,eGT(p)*HaToeV,Z(p),'Cvg Failed!' else eGT(p) = w Z(p) = df - write(*,'(A3,I3,A1,1X,3F15.9)') 'It.',nIt,':',w*HaToeV,df,f - write(*,'(A32,F16.10)') 'Quasiparticle energy (eV) ',eGT(p)*HaToeV - write(*,*) + write(*,'(I5,1X,I3,1X,F15.9,1X,F10.6)') p,nIt,eGT(p)*HaToeV,Z(p) end if end do + + write(*,*)'------------------------------------' + write(*,*) end subroutine diff --git a/src/GT/GTpp_QP_graph.f90 b/src/GT/GTpp_QP_graph.f90 index 5866b23..24857af 100644 --- a/src/GT/GTpp_QP_graph.f90 +++ b/src/GT/GTpp_QP_graph.f90 @@ -46,11 +46,12 @@ subroutine GTpp_QP_graph(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,nOOt,nVVt,eHF,Om1s,rho1s ! Run Newton's algorithm to find the root - do p=nC+1,nBas-nR - write(*,*) '-----------------' - write(*,'(A10,I3)') 'Orbital ',p - write(*,*) '-----------------' + write(*,*)'------------------------------------' + write(*,'(A5,1X,A3,1X,A15,1X,A10)') 'Orb.','It.','e_GTpp (eV)','Z' + write(*,*)'------------------------------------' + + do p=nC+1,nBas-nR w = eGTlin(p) nIt = 0 @@ -71,20 +72,20 @@ subroutine GTpp_QP_graph(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,nOOt,nVVt,eHF,Om1s,rho1s if(nIt == maxIt) then eGT(p) = eGTlin(p) - write(*,*) 'Newton root search has not converged!' + write(*,'(I5,1X,I3,1X,F15.9,1X,F10.6,1X,A12)') p,nIt,eGT(p)*HaToeV,Z(p),'Cvg Failed!' else eGT(p) = w Z(p) = df - write(*,'(A3,I3,A1,1X,3F15.9)') 'It.',nIt,':',w*HaToeV,df,f - write(*,'(A32,F16.10)') 'Quasiparticle energy (eV) ',eGT(p)*HaToeV - write(*,*) + write(*,'(I5,1X,I3,1X,F15.9,1X,F10.6)') p,nIt,eGT(p)*HaToeV,Z(p) end if - end do + + write(*,*)'------------------------------------' + write(*,*) end subroutine diff --git a/src/GW/GW_QP_graph.f90 b/src/GW/GW_QP_graph.f90 index 34d29e0..b3bc712 100644 --- a/src/GW/GW_QP_graph.f90 +++ b/src/GW/GW_QP_graph.f90 @@ -39,6 +39,10 @@ subroutine GW_QP_graph(eta,nBas,nC,nO,nV,nR,nS,eHF,Om,rho,eGWlin,eGW,Z) ! Run Newton's algorithm to find the root + write(*,*)'------------------------------------' + write(*,'(A5,1X,A3,1X,A15,1X,A10)') 'Orb.','It.','e_GW (eV)','Z' + write(*,*)'------------------------------------' + do p=nC+1,nBas-nR w = eGWlin(p) @@ -60,23 +64,21 @@ subroutine GW_QP_graph(eta,nBas,nC,nO,nV,nR,nS,eHF,Om,rho,eGWlin,eGW,Z) if(nIt == maxIt) then - write(*,*) 'Newton root search has not converged!' eGW(p) = eGWlin(p) + write(*,'(I5,1X,I3,1X,F15.9,1X,F10.6,1X,A12)') p,nIt,eGW(p)*HaToeV,Z(p),'Cvg Failed!' else eGW(p) = w Z(p) = df - - write(*,*)'-------------------------------------------------------------------------------' - write(*,'(A5,1X,A3,1X,A15,1X,A10)') 'Orb.','It.','e_QP (eV)','Z' write(*,'(I5,1X,I3,1X,F15.9,1X,F10.6)') p,nIt,eGW(p)*HaToeV,Z(p) - write(*,*)'-------------------------------------------------------------------------------' - write(*,*) end if end do + write(*,*)'------------------------------------' + write(*,*) + end subroutine