From 39b8b8d6f17b04a85c0e39d97bf9ab1590fa7f74 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Loos Date: Mon, 27 Nov 2023 11:06:33 +0100 Subject: [PATCH] ok with ufGW et al --- src/GW/ufG0W0.f90 | 5 ++--- src/GW/ufGW.f90 | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/GW/ufG0W0.f90 b/src/GW/ufG0W0.f90 index 12e2d1f..a7935ac 100644 --- a/src/GW/ufG0W0.f90 +++ b/src/GW/ufG0W0.f90 @@ -80,14 +80,14 @@ subroutine ufG0W0(dotest,TDA_W,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF) eF = 0.5d0*(eHF(nO+1) + eHF(nO)) - H(:,:) = 0d0 - !-------------------------! ! Main loop over orbitals ! !-------------------------! do p=nO,nO + H(:,:) = 0d0 + if (TDA_W) then ! TDA for W @@ -335,7 +335,6 @@ subroutine ufG0W0(dotest,TDA_W,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF) call wall_time(start_timing) - H(:,:) = H(:,:) call diagonalize_matrix(nH,H,eGW) call wall_time(end_timing) diff --git a/src/GW/ufGW.f90 b/src/GW/ufGW.f90 index 806dc72..be31c7c 100644 --- a/src/GW/ufGW.f90 +++ b/src/GW/ufGW.f90 @@ -48,6 +48,8 @@ subroutine ufGW(dotest,TDA_W,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF) logical :: verbose = .true. double precision,parameter :: cutoff1 = 0.01d0 double precision,parameter :: cutoff2 = 0.01d0 + double precision :: eF + double precision,parameter :: window = 2d0 double precision :: start_timing,end_timing,timing @@ -73,6 +75,11 @@ subroutine ufGW(dotest,TDA_W,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF) ! Initialization + dRPA = .true. + EcRPA = 0d0 + + eF = 0.5d0*(eHF(nO+1) + eHF(nO)) + H(:,:) = 0d0 if (TDA_W) then @@ -374,8 +381,11 @@ subroutine ufGW(dotest,TDA_W,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF) write(*,*)'---------------------------------------------' do s=1,nH - write(*,'(1X,A1,1X,I5,1X,A1,1X,F15.6,1X,A1,1X,F15.6,1X,A1,1X)') & - '|',s,'|',eGW(s)*HaToeV,'|',Z(s),'|' + if(eGW(s) < eF .and. eGW(s) > eF - window) then +! if(Z(s) > cutoff1) then + write(*,'(1X,A1,1X,I5,1X,A1,1X,F15.6,1X,A1,1X,F15.6,1X,A1,1X)') & + '|',s,'|',eGW(s)*HaToeV,'|',Z(s),'|' + end if enddo write(*,*)'---------------------------------------------' @@ -385,7 +395,8 @@ subroutine ufGW(dotest,TDA_W,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI,eHF) do s=1,nH - if(Z(s) > cutoff1) then + if(eGW(s) < eF .and. eGW(s) > eF - window) then +! if(Z(s) > cutoff1) then write(*,*)'-------------------------------------------------------------' write(*,'(1X,A7,1X,I3,A6,I3,A1,1X,A7,F12.6,A13,F6.4,1X)') &