mirror of
https://github.com/pfloos/quack
synced 2025-01-03 10:05:49 +01:00
bug fix in sf-BSE-dyn
This commit is contained in:
parent
9212d69aa2
commit
dbd15c2dae
@ -7,13 +7,13 @@
|
||||
# drCCD rCCD lCCD pCCD
|
||||
F F F F
|
||||
# CIS* CIS(D) CID CISD
|
||||
T F F F
|
||||
F F F F
|
||||
# RPA* RPAx* ppRPA
|
||||
F F F
|
||||
# G0F2 evGF2 G0F3 evGF3
|
||||
F F F F
|
||||
# G0W0* evGW* qsGW
|
||||
F F F
|
||||
T F F
|
||||
# G0T0 evGT qsGT
|
||||
F F F
|
||||
# MCMP2
|
||||
|
@ -51,9 +51,9 @@ subroutine linear_response(ispin,dRPA,TDA,BSE,eta,nBas,nC,nO,nV,nR,nS,lambda,e,E
|
||||
|
||||
B(:,:) = 0d0
|
||||
XpY(:,:) = A(:,:)
|
||||
XmY(:,:) = 0d0
|
||||
call diagonalize_matrix(nS,XpY,Omega)
|
||||
XpY(:,:) = transpose(XpY(:,:))
|
||||
XmY(:,:) = XpY(:,:)
|
||||
|
||||
else
|
||||
|
||||
|
@ -99,20 +99,20 @@ subroutine unrestricted_S2_expval(ispin,nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,maxS,c,S
|
||||
Yat(:,:) = transpose(Ya(:,:))
|
||||
Ybt(:,:) = transpose(Yb(:,:))
|
||||
|
||||
S2(m) = S2_gs &
|
||||
+ trace_matrix(nV(1),matmul(Xat,matmul(OO,matmul(OOt,Xa)))) &
|
||||
+ trace_matrix(nV(2),matmul(Xbt,matmul(OOt,matmul(OO,Xb)))) &
|
||||
- trace_matrix(nO(1),matmul(Xa,matmul(VO,matmul(VOt,Xat)))) &
|
||||
- trace_matrix(nO(2),matmul(Xb,matmul(OVt,matmul(OV,Xbt)))) &
|
||||
S2(m) = S2_gs &
|
||||
+ trace_matrix(nV(1),matmul(Xat,matmul(OO,matmul(OOt,Xa)))) &
|
||||
+ trace_matrix(nV(2),matmul(Xbt,matmul(OOt,matmul(OO,Xb)))) &
|
||||
- trace_matrix(nO(1),matmul(Xa,matmul(VO,matmul(VOt,Xat)))) &
|
||||
- trace_matrix(nO(2),matmul(Xb,matmul(OVt,matmul(OV,Xbt)))) &
|
||||
- 2d0*trace_matrix(nO(1),matmul(OO,matmul(Xb,matmul(VVt,Xat)))) &
|
||||
|
||||
- 2d0*trace_matrix(nV(2),matmul(OVt,matmul(Xa,matmul(VO,Yb)))) &
|
||||
- 2d0*trace_matrix(nV(1),matmul(VO,matmul(Xb,matmul(OVt,Ya)))) &
|
||||
- 2d0*trace_matrix(nV(2),matmul(OVt,matmul(Xa,matmul(VO,Yb)))) &
|
||||
- 2d0*trace_matrix(nV(1),matmul(VO,matmul(Xb,matmul(OVt,Ya)))) &
|
||||
|
||||
- trace_matrix(nV(1),matmul(Yat,matmul(OO,matmul(OOt,Ya)))) &
|
||||
- trace_matrix(nV(2),matmul(Ybt,matmul(OOt,matmul(OO,Yb)))) &
|
||||
+ trace_matrix(nO(1),matmul(Ya,matmul(VO,matmul(VOt,Yat)))) &
|
||||
+ trace_matrix(nO(2),matmul(Yb,matmul(OVt,matmul(OV,Ybt)))) &
|
||||
- trace_matrix(nV(1),matmul(Yat,matmul(OO,matmul(OOt,Ya)))) &
|
||||
- trace_matrix(nV(2),matmul(Ybt,matmul(OOt,matmul(OO,Yb)))) &
|
||||
+ trace_matrix(nO(1),matmul(Ya,matmul(VO,matmul(VOt,Yat)))) &
|
||||
+ trace_matrix(nO(2),matmul(Yb,matmul(OVt,matmul(OV,Ybt)))) &
|
||||
+ 2d0*trace_matrix(nO(1),matmul(Ya,matmul(VV,matmul(Ybt,OOt))))
|
||||
|
||||
end do
|
||||
@ -155,22 +155,22 @@ subroutine unrestricted_S2_expval(ispin,nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,maxS,c,S
|
||||
|
||||
S2(m) = S2_gs + dble(nO(2) - nO(1)) + 1d0
|
||||
|
||||
S2(m) = S2(m) &
|
||||
S2(m) = S2(m) &
|
||||
|
||||
+ trace_matrix(nV(1),matmul(Xbt,matmul(OOt,matmul(OO,Xb)))) &
|
||||
- trace_matrix(nO(2),matmul(Xb,matmul(VO,matmul(VOt,Xbt)))) &
|
||||
+ trace_matrix(nO(2),matmul(Xb,VO))**2 &
|
||||
+ trace_matrix(nV(2),matmul(Yat,matmul(OO,matmul(OOt,Ya)))) &
|
||||
+ trace_matrix(nO(1),matmul(Ya,matmul(OVt,matmul(OV,Yat)))) &
|
||||
+ trace_matrix(nO(1),matmul(Ya,OVt))**2 &
|
||||
+ trace_matrix(nV(1),matmul(Xbt,matmul(OOt,matmul(OO,Xb)))) &
|
||||
- trace_matrix(nO(2),matmul(Xb,matmul(VO,matmul(VOt,Xbt)))) &
|
||||
+ trace_matrix(nO(2),matmul(Xb,VO))**2 &
|
||||
+ trace_matrix(nV(2),matmul(Yat,matmul(OO,matmul(OOt,Ya)))) &
|
||||
+ trace_matrix(nO(1),matmul(Ya,matmul(OVt,matmul(OV,Yat)))) &
|
||||
+ trace_matrix(nO(1),matmul(Ya,OVt))**2 &
|
||||
- 2d0*trace_matrix(nO(2),matmul(Xb,VO))*trace_matrix(nO(1),matmul(Ya,OVt)) &
|
||||
|
||||
+ trace_matrix(nV(2),matmul(Xat,matmul(OO,matmul(OOt,Xa)))) &
|
||||
- trace_matrix(nO(1),matmul(Xa,matmul(OVt,matmul(OV,Xat)))) &
|
||||
+ trace_matrix(nO(1),matmul(Xa,OVt))**2 &
|
||||
+ trace_matrix(nV(1),matmul(Ybt,matmul(OOt,matmul(OO,Yb)))) &
|
||||
- trace_matrix(nO(2),matmul(Yb,matmul(VO,matmul(VOt,Ybt)))) &
|
||||
+ trace_matrix(nV(1),matmul(Ybt,VOt))**2 &
|
||||
+ trace_matrix(nV(2),matmul(Xat,matmul(OO,matmul(OOt,Xa)))) &
|
||||
- trace_matrix(nO(1),matmul(Xa,matmul(OVt,matmul(OV,Xat)))) &
|
||||
+ trace_matrix(nO(1),matmul(Xa,OVt))**2 &
|
||||
+ trace_matrix(nV(1),matmul(Ybt,matmul(OOt,matmul(OO,Yb)))) &
|
||||
- trace_matrix(nO(2),matmul(Yb,matmul(VO,matmul(VOt,Ybt)))) &
|
||||
+ trace_matrix(nV(1),matmul(Ybt,VOt))**2 &
|
||||
- 2d0*trace_matrix(nO(1),matmul(Xa,OVt))*trace_matrix(nO(2),matmul(Yb,VO))
|
||||
|
||||
end do
|
||||
|
@ -68,9 +68,9 @@ subroutine unrestricted_linear_response(ispin,dRPA,TDA,BSE,eta,nBas,nC,nO,nV,nR,
|
||||
|
||||
B(:,:) = 0d0
|
||||
XpY(:,:) = A(:,:)
|
||||
XmY(:,:) = 0d0
|
||||
call diagonalize_matrix(nSt,XpY,Omega)
|
||||
XpY(:,:) = transpose(XpY(:,:))
|
||||
XmY(:,:) = XpY(:,:)
|
||||
|
||||
else
|
||||
|
||||
|
@ -147,10 +147,10 @@ subroutine unrestricted_Bethe_Salpeter_A_matrix_dynamic(ispin,eta,nBas,nC,nO,nV,
|
||||
chi = 0d0
|
||||
do kc=1,nS_sc
|
||||
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(a,1) - eGW(j,2))
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(a,2) - eGW(j,1))
|
||||
chi = chi + rho_RPA(i,j,kc,1)*rho_RPA(a,b,kc,2)*eps/(eps**2 + eta**2)
|
||||
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(b,1) - eGW(i,2))
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(b,2) - eGW(i,1))
|
||||
chi = chi + rho_RPA(i,j,kc,1)*rho_RPA(a,b,kc,2)*eps/(eps**2 + eta**2)
|
||||
|
||||
enddo
|
||||
@ -183,10 +183,10 @@ subroutine unrestricted_Bethe_Salpeter_A_matrix_dynamic(ispin,eta,nBas,nC,nO,nV,
|
||||
chi = 0d0
|
||||
do kc=1,nS_sc
|
||||
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(a,2) - eGW(j,1))
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(a,1) - eGW(j,2))
|
||||
chi = chi + rho_RPA(i,j,kc,2)*rho_RPA(a,b,kc,1)*eps/(eps**2 + eta**2)
|
||||
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(b,2) - eGW(i,1))
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(b,1) - eGW(i,2))
|
||||
chi = chi + rho_RPA(i,j,kc,2)*rho_RPA(a,b,kc,1)*eps/(eps**2 + eta**2)
|
||||
|
||||
enddo
|
||||
|
@ -126,10 +126,10 @@ subroutine unrestricted_Bethe_Salpeter_ZA_matrix_dynamic(ispin,eta,nBas,nC,nO,nV
|
||||
chi = 0d0
|
||||
do kc=1,nS_sc
|
||||
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(a,1) - eGW(j,2))
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(a,2) - eGW(j,1))
|
||||
chi = chi + rho_RPA(i,j,kc,1)*rho_RPA(a,b,kc,2)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
||||
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(b,1) - eGW(i,2))
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(b,2) - eGW(i,1))
|
||||
chi = chi + rho_RPA(i,j,kc,1)*rho_RPA(a,b,kc,2)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
||||
|
||||
enddo
|
||||
@ -155,10 +155,10 @@ subroutine unrestricted_Bethe_Salpeter_ZA_matrix_dynamic(ispin,eta,nBas,nC,nO,nV
|
||||
chi = 0d0
|
||||
do kc=1,nS_sc
|
||||
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(a,2) - eGW(j,1))
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(a,1) - eGW(j,2))
|
||||
chi = chi + rho_RPA(i,j,kc,2)*rho_RPA(a,b,kc,1)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
||||
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(b,2) - eGW(i,1))
|
||||
eps = + OmBSE - OmRPA(kc) - (eGW(b,1) - eGW(i,2))
|
||||
chi = chi + rho_RPA(i,j,kc,2)*rho_RPA(a,b,kc,1)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
||||
|
||||
enddo
|
||||
|
Loading…
Reference in New Issue
Block a user