From fb4251e4191859d813f42fc730fabfaa31334631 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Loos Date: Thu, 24 Oct 2019 08:07:31 +0200 Subject: [PATCH] COHSEX done and debugged --- input/basis | 57 ++++------------------------ input/methods | 6 +-- input/molecule | 5 +-- input/options | 2 +- input/weight | 57 ++++------------------------ src/QuAcK/G0W0.f90 | 14 ++----- src/QuAcK/evGW.f90 | 6 ++- src/QuAcK/linear_response.f90 | 2 +- src/QuAcK/linear_response_pp.f90 | 4 +- src/QuAcK/qsGW.f90 | 6 ++- src/QuAcK/renormalization_factor.f90 | 44 ++++++++++++--------- 11 files changed, 61 insertions(+), 142 deletions(-) diff --git a/input/basis b/input/basis index b18e129..b9ca7b5 100644 --- a/input/basis +++ b/input/basis @@ -1,52 +1,9 @@ -1 9 -S 9 1.00 - 1.469000D+03 7.660000D-04 - 2.205000D+02 5.892000D-03 - 5.026000D+01 2.967100D-02 - 1.424000D+01 1.091800D-01 - 4.581000D+00 2.827890D-01 - 1.580000D+00 4.531230D-01 - 5.640000D-01 2.747740D-01 - 7.345000D-02 9.751000D-03 - 2.805000D-02 -3.180000D-03 -S 9 1.00 - 1.469000D+03 -1.200000D-04 - 2.205000D+02 -9.230000D-04 - 5.026000D+01 -4.689000D-03 - 1.424000D+01 -1.768200D-02 - 4.581000D+00 -4.890200D-02 - 1.580000D+00 -9.600900D-02 - 5.640000D-01 -1.363800D-01 - 7.345000D-02 5.751020D-01 - 2.805000D-02 5.176610D-01 +1 3 +S 3 1.00 + 38.3600000 0.0238090 + 5.7700000 0.1548910 + 1.2400000 0.4699870 S 1 1.00 - 2.805000D-02 1.000000D+00 -S 1 1.00 - 8.600000D-03 1.000000D+00 -P 4 1.00 - 1.534000D+00 2.278400D-02 - 2.749000D-01 1.391070D-01 - 7.362000D-02 5.003750D-01 - 2.403000D-02 5.084740D-01 + 0.2976000 1.0000000 P 1 1.00 - 2.403000D-02 1.000000D+00 -P 1 1.00 - 5.800000D-03 1.000000D+00 -D 1 1.00 - 1.144000D-01 1.0000000 -D 1 1.00 - 7.330000D-02 1.000000D+00 -2 5 -S 4 1.00 - 1.301000D+01 1.968500D-02 - 1.962000D+00 1.379770D-01 - 4.446000D-01 4.781480D-01 - 1.220000D-01 5.012400D-01 -S 1 1.00 - 1.220000D-01 1.000000D+00 -S 1 1.00 - 0.0297400 1.0000000 -P 1 1.00 - 7.270000D-01 1.0000000 -P 1 1.00 - 0.1410000 1.0000000 + 1.2750000 1.0000000 diff --git a/input/methods b/input/methods index 6264e2f..6379c0b 100644 --- a/input/methods +++ b/input/methods @@ -5,12 +5,12 @@ # CCD CCSD CCSD(T) F F F # CIS TDHF ppRPA ADC - F F T F + F F F F # GF2 GF3 F F # G0W0 evGW qsGW - F F F -# G0T0 evGT qsGT T F F +# G0T0 evGT qsGT + F F F # MCMP2 F diff --git a/input/molecule b/input/molecule index c38d7a8..c78e87e 100644 --- a/input/molecule +++ b/input/molecule @@ -1,5 +1,4 @@ # nAt nEla nElb nCore nRyd - 2 2 2 0 0 + 1 1 1 0 0 # Znuc x y z - Li 0. 0. 0. - H 0. 0. 3.09839495 + He 0.0 0.0 0.0 diff --git a/input/options b/input/options index 5d37d6a..af0438b 100644 --- a/input/options +++ b/input/options @@ -9,6 +9,6 @@ # GF: maxSCF thresh DIIS n_diis renormalization 64 0.00001 T 10 3 # GW: maxSCF thresh DIIS n_diis COHSEX SOSEX BSE TDA G0W GW0 linearize eta - 256 0.0000001 T 5 F F T F F F T 0.000 + 256 0.0000001 T 5 T F F F F F F 0.000 # MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift 1000000 100000 10 0.3 10000 1234 T diff --git a/input/weight b/input/weight index b18e129..b9ca7b5 100644 --- a/input/weight +++ b/input/weight @@ -1,52 +1,9 @@ -1 9 -S 9 1.00 - 1.469000D+03 7.660000D-04 - 2.205000D+02 5.892000D-03 - 5.026000D+01 2.967100D-02 - 1.424000D+01 1.091800D-01 - 4.581000D+00 2.827890D-01 - 1.580000D+00 4.531230D-01 - 5.640000D-01 2.747740D-01 - 7.345000D-02 9.751000D-03 - 2.805000D-02 -3.180000D-03 -S 9 1.00 - 1.469000D+03 -1.200000D-04 - 2.205000D+02 -9.230000D-04 - 5.026000D+01 -4.689000D-03 - 1.424000D+01 -1.768200D-02 - 4.581000D+00 -4.890200D-02 - 1.580000D+00 -9.600900D-02 - 5.640000D-01 -1.363800D-01 - 7.345000D-02 5.751020D-01 - 2.805000D-02 5.176610D-01 +1 3 +S 3 1.00 + 38.3600000 0.0238090 + 5.7700000 0.1548910 + 1.2400000 0.4699870 S 1 1.00 - 2.805000D-02 1.000000D+00 -S 1 1.00 - 8.600000D-03 1.000000D+00 -P 4 1.00 - 1.534000D+00 2.278400D-02 - 2.749000D-01 1.391070D-01 - 7.362000D-02 5.003750D-01 - 2.403000D-02 5.084740D-01 + 0.2976000 1.0000000 P 1 1.00 - 2.403000D-02 1.000000D+00 -P 1 1.00 - 5.800000D-03 1.000000D+00 -D 1 1.00 - 1.144000D-01 1.0000000 -D 1 1.00 - 7.330000D-02 1.000000D+00 -2 5 -S 4 1.00 - 1.301000D+01 1.968500D-02 - 1.962000D+00 1.379770D-01 - 4.446000D-01 4.781480D-01 - 1.220000D-01 5.012400D-01 -S 1 1.00 - 1.220000D-01 1.000000D+00 -S 1 1.00 - 0.0297400 1.0000000 -P 1 1.00 - 7.270000D-01 1.0000000 -P 1 1.00 - 0.1410000 1.0000000 + 1.2750000 1.0000000 diff --git a/src/QuAcK/G0W0.f90 b/src/QuAcK/G0W0.f90 index 9812534..3861568 100644 --- a/src/QuAcK/G0W0.f90 +++ b/src/QuAcK/G0W0.f90 @@ -89,18 +89,10 @@ subroutine G0W0(COHSEX,SOSEX,BSE,TDA,singlet_manifold,triplet_manifold,eta, & call self_energy_correlation_diag(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,eHF, & Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),EcGM,SigC) -! COHSEX static approximation +! Compute renormalization factor - if(COHSEX) then - - Z(:) = 1d0 - - else - - call renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,eHF, & - Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z(:)) - - endif + call renormalization_factor(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,eHF, & + Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z(:)) ! Solve the quasi-particle equation diff --git a/src/QuAcK/evGW.f90 b/src/QuAcK/evGW.f90 index 651d398..ad1d0de 100644 --- a/src/QuAcK/evGW.f90 +++ b/src/QuAcK/evGW.f90 @@ -128,13 +128,15 @@ subroutine evGW(maxSCF,thresh,max_diis,COHSEX,SOSEX,BSE,TDA,G0W,GW0,singlet_mani call self_energy_correlation_diag(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,eHF, & Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),EcGM,SigC) - call renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,eHF,Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z(:)) + call renormalization_factor(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,eHF, & + Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z(:)) else call self_energy_correlation_diag(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,eGW, & Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),EcGM,SigC) - call renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,eGW,Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z(:)) + call renormalization_factor(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,eGW, & + Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z(:)) endif diff --git a/src/QuAcK/linear_response.f90 b/src/QuAcK/linear_response.f90 index a4313e3..3d86ddc 100644 --- a/src/QuAcK/linear_response.f90 +++ b/src/QuAcK/linear_response.f90 @@ -90,6 +90,6 @@ subroutine linear_response(ispin,dRPA,TDA,BSE,nBas,nC,nO,nV,nR,nS,e,ERI,rho,EcRP EcRPA = 0.5d0*(sum(Omega) - trace_matrix(nS,A)) - print*,'EcRPA = ',EcRPA +! print*,'EcRPA = ',EcRPA end subroutine linear_response diff --git a/src/QuAcK/linear_response_pp.f90 b/src/QuAcK/linear_response_pp.f90 index 3745275..e1044f4 100644 --- a/src/QuAcK/linear_response_pp.f90 +++ b/src/QuAcK/linear_response_pp.f90 @@ -60,8 +60,8 @@ subroutine linear_response_pp(ispin,BSE,nBas,nC,nO,nV,nR,nOO,nVV,e,ERI,Omega1,X1 ! Off-diagonal blocks - M( 1:nVV ,nVV+1:nOO+nVV) = + B(1:nVV,1:nOO) - M(nVV+1:nOO+nVV, 1:nVV) = - transpose(B(1:nVV,1:nOO)) + M( 1:nVV ,nVV+1:nOO+nVV) = - B(1:nVV,1:nOO) + M(nVV+1:nOO+nVV, 1:nVV) = + transpose(B(1:nVV,1:nOO)) ! print*, 'pp-RPA matrix' ! call matout(nOO+nVV,nOO+nVV,M(:,:)) diff --git a/src/QuAcK/qsGW.f90 b/src/QuAcK/qsGW.f90 index dbd32bf..86e88a4 100644 --- a/src/QuAcK/qsGW.f90 +++ b/src/QuAcK/qsGW.f90 @@ -151,13 +151,15 @@ subroutine qsGW(maxSCF,thresh,max_diis,COHSEX,SOSEX,BSE,TDA,G0W,GW0,singlet_mani call self_energy_correlation(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,eHF, & Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),EcGM,SigC) - call renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,eHF,Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z) + call renormalization_factor(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,eHF, & + Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z) else call self_energy_correlation(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,e, & Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),EcGM,SigC) - call renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z) + call renormalization_factor(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,e, & + Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),Z) endif diff --git a/src/QuAcK/renormalization_factor.f90 b/src/QuAcK/renormalization_factor.f90 index 6a3e9c1..070c1e5 100644 --- a/src/QuAcK/renormalization_factor.f90 +++ b/src/QuAcK/renormalization_factor.f90 @@ -1,4 +1,4 @@ -subroutine renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,rhox,Z) +subroutine renormalization_factor(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,rhox,Z) ! Compute renormalization factor for GW @@ -7,6 +7,7 @@ subroutine renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,rhox ! Input variables + logical,intent(in) :: COHSEX logical,intent(in) :: SOSEX double precision,intent(in) :: eta integer,intent(in) :: nBas,nC,nO,nV,nR,nS @@ -28,6 +29,15 @@ subroutine renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,rhox Z(:) = 0d0 +! static COHSEX approximation + + if(COHSEX) then + + Z(:) = 1d0 + return + + end if + ! Occupied part of the correlation self-energy do x=nC+1,nBas-nR @@ -38,10 +48,10 @@ subroutine renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,rhox jb = jb + 1 eps = e(x) - e(i) + Omega(jb) Z(x) = Z(x) - 2d0*rho(x,i,jb)**2*(eps/(eps**2 + eta**2))**2 - enddo - enddo - enddo - enddo + end do + end do + end do + end do ! Virtual part of the correlation self-energy @@ -53,10 +63,10 @@ subroutine renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,rhox jb = jb + 1 eps = e(x) - e(a) - Omega(jb) Z(x) = Z(x) - 2d0*rho(x,a,jb)**2*(eps/(eps**2 + eta**2))**2 - enddo - enddo - enddo - enddo + end do + end do + end do + end do ! SOSEX correction @@ -72,10 +82,10 @@ subroutine renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,rhox jb = jb + 1 eps = e(x) - e(i) + Omega(jb) Z(x) = Z(x) - (rho(x,i,jb)/eps)*(rhox(x,i,jb)/eps) - enddo - enddo - enddo - enddo + end do + end do + end do + end do ! Virtual part of the correlation self-energy @@ -87,10 +97,10 @@ subroutine renormalization_factor(SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,rhox jb = jb + 1 eps = e(x) - e(a) - Omega(jb) Z(x) = Z(x) - (rho(x,a,jb)/eps)*(rhox(x,a,jb)/eps) - enddo - enddo - enddo - enddo + end do + end do + end do + end do endif