From 5fa70be11e6c3fc68c35b75b55a80b61f4588c71 Mon Sep 17 00:00:00 2001 From: pfloos Date: Tue, 17 Sep 2024 09:10:16 +0200 Subject: [PATCH] ok with ccGW --- src/GW/RGW.f90 | 6 +++--- src/GW/ccRG0W0.f90 | 46 ++++++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/GW/RGW.f90 b/src/GW/RGW.f90 index 852c5d4..9b78b0c 100644 --- a/src/GW/RGW.f90 +++ b/src/GW/RGW.f90 @@ -161,12 +161,12 @@ subroutine RGW(dotest,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,maxSCF,thresh,max_dii ! Perform CC-based G0W0 calculation !------------------------------------------------------------------------ - doccG0W0 = .false. + doccG0W0 = .true. if(doccG0W0) then call wall_time(start_GW) -! call ccRG0W0(maxSCF,thresh,nBas,nOrb,nC,nO,nV,nR,ERI_MO,ENuc,ERHF,eHF) + call ccRG0W0(maxSCF,thresh,nBas,nOrb,nC,nO,nV,nR,ERI_MO,ENuc,ERHF,eHF) call ccRG0W0_mat(maxSCF,thresh,nBas,nOrb,nC,nO,nV,nR,ERI_MO,ENuc,ERHF,eHF) call wall_time(end_GW) @@ -181,7 +181,7 @@ subroutine RGW(dotest,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,maxSCF,thresh,max_dii ! Perform CC-based GW calculation !------------------------------------------------------------------------ - doccGW = .true. + doccGW = .false. if(doccGW) then diff --git a/src/GW/ccRG0W0.f90 b/src/GW/ccRG0W0.f90 index 6370d5e..1376672 100644 --- a/src/GW/ccRG0W0.f90 +++ b/src/GW/ccRG0W0.f90 @@ -93,6 +93,30 @@ subroutine ccRG0W0(maxSCF,thresh,nBas,nOrb,nC,nO,nV,nR,ERI,ENuc,ERHF,eHF) t_2h1p(:,:,:) = 0d0 t_2p1h(:,:,:) = 0d0 + ! Compute energy differences + + do i=nC+1,nO + do j=nC+1,nO + do a=1,nV-nR + + delta_2h1p(i,j,a) = eHF(i) + eHF(j) - eHF(nO+a) - eHF(p) + + end do + end do + end do + + do i=nC+1,nO + do a=1,nV-nR + do b=1,nV-nR + + delta_2p1h(i,a,b) = eHF(nO+a) + eHF(nO+b) - eHF(i) - eHF(p) + + end do + end do + end do + + ! Compute V2h1p and V2p1h + do k=nC+1,nO do l=nC+1,nO do c=1,nV-nR @@ -131,28 +155,6 @@ subroutine ccRG0W0(maxSCF,thresh,nBas,nOrb,nC,nO,nV,nR,ERI,ENuc,ERHF,eHF) nSCF = nSCF + 1 - ! Compute energy differences - - do i=nC+1,nO - do j=nC+1,nO - do a=1,nV-nR - - delta_2h1p(i,j,a) = eHF(i) + eHF(j) - eHF(nO+a) - eGW(p) - - end do - end do - end do - - do i=nC+1,nO - do a=1,nV-nR - do b=1,nV-nR - - delta_2p1h(i,a,b) = eHF(nO+a) + eHF(nO+b) - eHF(i) - eGW(p) - - end do - end do - end do - ! Compute intermediates x_2h1p = 0d0