4
1
mirror of https://github.com/pfloos/quack synced 2024-12-22 12:23:50 +01:00
This commit is contained in:
Pierre-Francois Loos 2024-10-01 09:42:25 +02:00
parent 172ca40f37
commit 19be97355d
2 changed files with 5 additions and 19 deletions

View File

@ -126,23 +126,19 @@ subroutine ccRG0W0(maxSCF,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR,nS,ERI,ENuc,ERHF
amp(:,:) = 0d0
res(:,:) = 0d0
! Compute energy differences and coupling blocks
! Compute approximate hessians and coupling blocks
do m=1,nS
do j=nC+1,nO
del(m,j) = Om(m) + eHF(j) - eHF(p)
vec(m,j) = sqrt(2d0)*rho(p,j,m)
end do
end do
do m=1,nS
do b=1,nV-nR
del(m,nO+b) = Om(m) + eHF(nO+b) - eHF(p)
vec(m,nO+b) = sqrt(2d0)*rho(p,nO+b,m)
end do
end do
@ -166,13 +162,11 @@ subroutine ccRG0W0(maxSCF,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR,nS,ERI,ENuc,ERHF
! Compute residual for 2h1p sector
res(:,:) = vec(:,:) + (del(:,:) - Sig(p))*amp(:,:)
! res(:,:) = vec(:,:) + (del(:,:) - Sig(p))*amp(:,:)
do m=1,nS
do j=nC+1,nO
res(m,j) = res(m,j) - Om(m)*amp(m,j)
res(m,j) = vec(m,j) + (eHF(j) - Om(m) - eHF(p) - Sig(p))*amp(m,j)
end do
end do
@ -180,9 +174,7 @@ subroutine ccRG0W0(maxSCF,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR,nS,ERI,ENuc,ERHF
do m=nC+1,nO
do b=1,nV-nR
res(m,nO+b) = res(m,nO+b) + Om(m)*amp(m,nO+b)
res(m,nO+b) = vec(m,nO+b) + (eHF(nO+b) + Om(m) - eHF(p) - Sig(p))*amp(m,nO+b)
end do
end do
@ -197,10 +189,8 @@ subroutine ccRG0W0(maxSCF,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR,nS,ERI,ENuc,ERHF
! DIIS extrapolation
if(max_diis > 1) then
n_diis = min(n_diis+1,max_diis)
call DIIS_extrapolation(rcond,nS*nOrb,nS*nOrb,n_diis,r_diis,t_diis,res,amp)
end if
! Compute quasiparticle energy
@ -209,9 +199,7 @@ subroutine ccRG0W0(maxSCF,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR,nS,ERI,ENuc,ERHF
do m=1,nS
do q=nC+1,nOrb-nR
Sig(p) = Sig(p) + vec(m,q)*amp(m,q)
end do
end do

View File

@ -162,7 +162,6 @@ subroutine ccRG0W0_TDA(maxSCF,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR,ERI,ENuc,ERH
do c=1,nV-nR
res(i,a,j) = res(i,a,j) - 2d0*ERI(j,nO+c,nO+a,k)*amp(i,c,k)
! - 2d0*ERI(i,nO+c,nO+a,k)*amp(k,c,j)
end do
end do
@ -181,7 +180,6 @@ subroutine ccRG0W0_TDA(maxSCF,thresh,max_diis,nBas,nOrb,nC,nO,nV,nR,ERI,ENuc,ERH
do c=1,nV-nR
res(i,a,nO+b) = res(i,a,nO+b) + 2d0*ERI(nO+a,k,i,nO+c)*amp(k,c,nO+b)
! + 2d0*ERI(nO+b,k,i,nO+c)*amp(k,a,nO+c)
end do
end do