10
1
mirror of https://github.com/pfloos/quack synced 2025-01-03 01:55:57 +01:00

full ppBSE@GT and full dynBSE@GW in spin orbital and spatial orb

This commit is contained in:
Antoine Marie 2024-11-04 17:00:51 +01:00
parent 6ed7fd09be
commit 0554bdd53f
6 changed files with 80 additions and 129 deletions

View File

@ -51,28 +51,23 @@ subroutine GGW_ppBSE_dynamic_kernel_B(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,eGW
do m=1,nS
dem = eGW(j) - Om(m) - eGW(b)
num = rho(a,i,m)*rho(b,j,m)
num = (rho(a,i,m)*rho(b,j,m) - rho(b,i,m)*rho(a,j,m))/2
dem = - Om(m) - eGW(b) + eGW(j)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
dem = eGW(j) - Om(m) - eGW(a)
num = rho(b,i,m)*rho(a,j,m)
KB_dyn(ab,ij) = KB_dyn(ab,ij) - num*dem/(dem**2 + eta**2)
dem = eGW(i) - Om(m) - eGW(a)
num = rho(a,i,m)*rho(b,j,m)
dem = - Om(m) - eGW(a) + eGW(i)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
dem = eGW(i) - Om(m) - eGW(b)
num = rho(b,i,m)*rho(a,j,m)
dem = - Om(m) - eGW(a) + eGW(j)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
KB_dyn(ab,ij) = KB_dyn(ab,ij) - num*dem/(dem**2 + eta**2)
dem = - Om(m) - eGW(b) + eGW(i)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
end do
KB_dyn(ab,ij) = 0.5d0*KB_dyn(ab,ij)
end do
end do

View File

@ -53,36 +53,28 @@ subroutine GGW_ppBSE_dynamic_kernel_C(eta,nBas,nC,nO,nV,nR,nS,nVV,lambda,eGW,Om,
do m=1,nS
dem = OmBSE - (eGW(a) + eGW(c) + Om(m))
! num = 0.5d0*(rho(a,c,m)*rho(b,d,m) - rho(b,c,m)*rho(a,d,m))
num = - rho(b,c,m)*rho(a,d,m)
num = (rho(a,c,m)*rho(b,d,m) - rho(b,c,m)*rho(a,d,m))/2
dem = OmBSE - Om(m) - eGW(b) - eGW(d)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - (eGW(b) + eGW(d) + Om(m))
! num = 0.5d0*(rho(a,c,m)*rho(b,d,m) - rho(b,c,m)*rho(a,d,m))
num = - rho(b,c,m)*rho(a,d,m)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) + num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - Om(m) - eGW(a) - eGW(c)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - (eGW(b) + eGW(c) + Om(m))
num = rho(a,c,m)*rho(b,d,m)
! num = 0.5d0*(rho(a,c,m)*rho(b,d,m) - rho(b,c,m)*rho(a,d,m))
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) + num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - Om(m) - eGW(a) - eGW(d)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - (eGW(a) + eGW(d) + Om(m))
num = rho(a,c,m)*rho(b,d,m)
! num = 0.5d0*(rho(a,c,m)*rho(b,d,m) - rho(b,c,m)*rho(a,d,m))
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) + num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - Om(m) - eGW(b) - eGW(c)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) + num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
end do
KC_dyn(ab,cd) = 0.5d0*KC_dyn(ab,cd)
ZC_dyn(ab,cd) = 0.5d0*ZC_dyn(ab,cd)
end do
end do

View File

@ -53,30 +53,23 @@ subroutine RGW_ppBSE_dynamic_kernel_B(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lamb
ij = ij + 1
do m=1,nS
num = (rho(a,i,m)*rho(b,j,m) + rho(b,i,m)*rho(a,j,m))/2
dem = eGW(j) - Om(m) - eGW(b)
num = rho(a,i,m)*rho(b,j,m)
dem = - Om(m) - eGW(b) + eGW(j)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
dem = eGW(j) - Om(m) - eGW(a)
num = rho(b,i,m)*rho(a,j,m)
dem = - Om(m) - eGW(a) + eGW(i)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
dem = eGW(i) - Om(m) - eGW(a)
num = rho(a,i,m)*rho(b,j,m)
dem = - Om(m) - eGW(a) + eGW(j)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
dem = eGW(i) - Om(m) - eGW(b)
num = rho(b,i,m)*rho(a,j,m)
dem = - Om(m) - eGW(b) + eGW(i)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
end do
KB_dyn(ab,ij) = 2d0*KB_dyn(ab,ij)/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(i,j)))
KB_dyn(ab,ij) = KB_dyn(ab,ij)/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(i,j)))
end do
end do
@ -99,31 +92,22 @@ subroutine RGW_ppBSE_dynamic_kernel_B(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lamb
ij = ij + 1
do m=1,nS
num = (rho(a,i,m)*rho(b,j,m) - rho(b,i,m)*rho(a,j,m))/2
dem = eGW(j) - Om(m) - eGW(b)
num = rho(a,i,m)*rho(b,j,m)
dem = - Om(m) - eGW(b) + eGW(j)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
dem = eGW(j) - Om(m) - eGW(a)
num = rho(b,i,m)*rho(a,j,m)
KB_dyn(ab,ij) = KB_dyn(ab,ij) - num*dem/(dem**2 + eta**2)
dem = eGW(i) - Om(m) - eGW(a)
num = rho(a,i,m)*rho(b,j,m)
dem = - Om(m) - eGW(a) + eGW(i)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
dem = eGW(i) - Om(m) - eGW(b)
num = rho(b,i,m)*rho(a,j,m)
dem = - Om(m) - eGW(a) + eGW(j)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
KB_dyn(ab,ij) = KB_dyn(ab,ij) - num*dem/(dem**2 + eta**2)
dem = - Om(m) - eGW(b) + eGW(i)
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
end do
KB_dyn(ab,ij) = 2d0*KB_dyn(ab,ij)
end do
end do

View File

@ -55,35 +55,28 @@ subroutine RGW_ppBSE_dynamic_kernel_C(ispin,eta,nBas,nC,nO,nV,nR,nS,nVV,lambda,e
cd = cd + 1
do m=1,nS
num = (rho(a,c,m)*rho(b,d,m) + rho(b,c,m)*rho(a,d,m))/2
dem = OmBSE - eGW(c) - Om(m) - eGW(b)
num = rho(a,c,m)*rho(b,d,m)
dem = OmBSE - Om(m) - eGW(b) - eGW(d)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - eGW(c) - Om(m) - eGW(a)
num = rho(b,c,m)*rho(a,d,m)
dem = OmBSE - Om(m) - eGW(a) - eGW(c)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - eGW(d) - Om(m) - eGW(a)
num = rho(a,c,m)*rho(b,d,m)
dem = OmBSE - Om(m) - eGW(a) - eGW(d)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - eGW(d) - Om(m) - eGW(b)
num = rho(b,c,m)*rho(a,d,m)
dem = OmBSE - Om(m) - eGW(b) - eGW(c)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
end do
KC_dyn(ab,cd) = 2d0*KC_dyn(ab,cd)/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(c,d)))
ZC_dyn(ab,cd) = 2d0*ZC_dyn(ab,cd)/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(c,d)))
KC_dyn(ab,cd) = KC_dyn(ab,cd)/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(c,d)))
ZC_dyn(ab,cd) = ZC_dyn(ab,cd)/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(c,d)))
end do
end do
@ -106,36 +99,26 @@ subroutine RGW_ppBSE_dynamic_kernel_C(ispin,eta,nBas,nC,nO,nV,nR,nS,nVV,lambda,e
cd = cd + 1
do m=1,nS
num = (rho(a,c,m)*rho(b,d,m) - rho(b,c,m)*rho(a,d,m))/2
dem = OmBSE - eGW(c) - Om(m) - eGW(b)
num = rho(a,c,m)*rho(b,d,m)
dem = OmBSE - Om(m) - eGW(b) - eGW(d)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - eGW(c) - Om(m) - eGW(a)
num = rho(b,c,m)*rho(a,d,m)
KC_dyn(ab,cd) = KC_dyn(ab,cd) - num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) + num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - eGW(d) - Om(m) - eGW(a)
num = rho(a,c,m)*rho(b,d,m)
dem = OmBSE - Om(m) - eGW(a) - eGW(c)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - eGW(d) - Om(m) - eGW(b)
num = rho(b,c,m)*rho(a,d,m)
dem = OmBSE - Om(m) - eGW(a) - eGW(d)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
KC_dyn(ab,cd) = KC_dyn(ab,cd) - num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) + num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
dem = OmBSE - Om(m) - eGW(b) - eGW(c)
KC_dyn(ab,cd) = KC_dyn(ab,cd) + num*dem/(dem**2 + eta**2)
ZC_dyn(ab,cd) = ZC_dyn(ab,cd) - num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
end do
KC_dyn(ab,cd) = 2d0*KC_dyn(ab,cd)
ZC_dyn(ab,cd) = 2d0*ZC_dyn(ab,cd)
end do
end do

View File

@ -57,7 +57,6 @@ subroutine RGW_ppBSE_dynamic_kernel_D(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,lambda,e
do m=1,nS
num = (rho(i,k,m)*rho(j,l,m) + rho(j,k,m)*rho(i,l,m))/2
! dem = - Om(m)
dem = - OmBSE - Om(m) + eGW(j) + eGW(l)
KD_dyn(ij,kl) = KD_dyn(ij,kl) + num*dem/(dem**2 + eta**2)
ZD_dyn(ij,kl) = ZD_dyn(ij,kl) + num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
@ -101,6 +100,7 @@ subroutine RGW_ppBSE_dynamic_kernel_D(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,lambda,e
do m=1,nS
num = (rho(i,k,m)*rho(j,l,m) - rho(j,k,m)*rho(i,l,m))/2
dem = - OmBSE - Om(m) + eGW(j) + eGW(l)
KD_dyn(ij,kl) = KD_dyn(ij,kl) + num*dem/(dem**2 + eta**2)
ZD_dyn(ij,kl) = ZD_dyn(ij,kl) + num*(dem**2 - eta**2)/(dem**2 + eta**2)**2
@ -119,9 +119,6 @@ subroutine RGW_ppBSE_dynamic_kernel_D(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,lambda,e
end do
KD_dyn(ij,kl) = KD_dyn(ij,kl)
ZD_dyn(ij,kl) = ZD_dyn(ij,kl)
end do
end do