From cecaf03c576ae0a6fd53e1fef651c6846a6b01c7 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Loos Date: Fri, 5 Mar 2021 17:29:52 +0100 Subject: [PATCH] static screening --- input/methods | 6 ++-- input/options | 2 +- mol/h2.xyz | 2 +- src/MBPT/static_screening_WA.f90 | 53 ++++++++++++++++++++++++++++++++ src/MBPT/static_screening_WB.f90 | 53 ++++++++++++++++++++++++++++++++ 5 files changed, 111 insertions(+), 5 deletions(-) create mode 100644 src/MBPT/static_screening_WA.f90 create mode 100644 src/MBPT/static_screening_WB.f90 diff --git a/input/methods b/input/methods index 738a281..26ff8ab 100644 --- a/input/methods +++ b/input/methods @@ -1,5 +1,5 @@ # RHF UHF KS MOM - F T F F + T F F F # MP2* MP3 MP2-F12 F F F # CCD DCD CCSD CCSD(T) @@ -9,11 +9,11 @@ # CIS* CIS(D) CID CISD F F F F # RPA* RPAx* ppRPA - F F F + T F F # G0F2 evGF2 G0F3 evGF3 F F F F # G0W0* evGW* qsGW* - F F F + F F T # G0T0 evGT qsGT F F F # MCMP2 diff --git a/input/options b/input/options index 5f8d15d..347efea 100644 --- a/input/options +++ b/input/options @@ -1,5 +1,5 @@ # HF: maxSCF thresh DIIS n_diis guess_type ortho_type mix_guess stability - 128 0.0000001 T 5 1 1 T T + 128 0.0000001 T 5 1 1 F F # MP: # CC: maxSCF thresh DIIS n_diis diff --git a/mol/h2.xyz b/mol/h2.xyz index a302682..7ab70eb 100644 --- a/mol/h2.xyz +++ b/mol/h2.xyz @@ -1,4 +1,4 @@ 2 H 0.0 0.0 0.0 -H 0.0 0.0 1.4 +H 0.0 0.0 0.741 diff --git a/src/MBPT/static_screening_WA.f90 b/src/MBPT/static_screening_WA.f90 new file mode 100644 index 0000000..dff07d7 --- /dev/null +++ b/src/MBPT/static_screening_WA.f90 @@ -0,0 +1,53 @@ +subroutine static_screening_WA(eta,nBas,nC,nO,nV,nR,nS,lambda,ERI,Omega,rho,WA) + +! Compute the OOVV block of the static screening W for the resonant block + + implicit none + include 'parameters.h' + +! Input variables + + integer,intent(in) :: nBas,nC,nO,nV,nR,nS + double precision,intent(in) :: eta + double precision,intent(in) :: lambda + double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas) + double precision,intent(in) :: Omega(nS) + double precision,intent(in) :: rho(nBas,nBas,nS) + +! Local variables + + double precision :: chi + double precision :: eps + integer :: i,j,a,b,ia,jb,kc + +! Output variables + + double precision,intent(out) :: WA(nS,nS) + +! Initialize + + WA(:,:) = 0d0 + + ia = 0 + do i=nC+1,nO + do a=nO+1,nBas-nR + ia = ia + 1 + jb = 0 + do j=nC+1,nO + do b=nO+1,nBas-nR + jb = jb + 1 + + chi = 0d0 + do kc=1,nS + eps = Omega(kc)**2 + eta**2 + chi = chi + rho(i,j,kc)*rho(a,b,kc)*Omega(kc)/eps + enddo + + WA(ia,jb) = WA(ia,jb) + lambda*ERI(i,b,j,a) - 4d0*lambda*chi + + enddo + enddo + enddo + enddo + +end subroutine static_screening_WA diff --git a/src/MBPT/static_screening_WB.f90 b/src/MBPT/static_screening_WB.f90 new file mode 100644 index 0000000..4419660 --- /dev/null +++ b/src/MBPT/static_screening_WB.f90 @@ -0,0 +1,53 @@ +subroutine static_screening_WB(eta,nBas,nC,nO,nV,nR,nS,lambda,ERI,Omega,rho,WB) + +! Compute the static screening W for the coupling block + + implicit none + include 'parameters.h' + +! Input variables + + integer,intent(in) :: nBas,nC,nO,nV,nR,nS + double precision,intent(in) :: eta + double precision,intent(in) :: lambda + double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas) + double precision,intent(in) :: Omega(nS) + double precision,intent(in) :: rho(nBas,nBas,nS) + +! Local variables + + double precision :: chi + double precision :: eps + integer :: i,j,a,b,ia,jb,kc + +! Output variables + + double precision,intent(out) :: WB(nS,nS) + +! Initialize + + WB(:,:) = 0d0 + + ia = 0 + do i=nC+1,nO + do a=nO+1,nBas-nR + ia = ia + 1 + jb = 0 + do j=nC+1,nO + do b=nO+1,nBas-nR + jb = jb + 1 + + chi = 0d0 + do kc=1,nS + eps = Omega(kc)**2 + eta**2 + chi = chi + rho(i,b,kc)*rho(a,j,kc)*Omega(kc)/eps + enddo + + WB(ia,jb) = WB(ia,jb) + lambda*ERI(i,j,b,a) - 4d0*lambda*chi + + enddo + enddo + enddo + enddo + +end subroutine static_screening_WB