mirror of
https://github.com/pfloos/quack
synced 2024-11-03 12:43:48 +01:00
debug TDAppBSEDynamicGW
This commit is contained in:
parent
5c5c1aa6d6
commit
6a7e7fb602
@ -1,22 +0,0 @@
|
||||
# RHF UHF GHF ROHF
|
||||
F F F F
|
||||
# MP2 MP3
|
||||
F F
|
||||
# CCD pCCD DCD CCSD CCSD(T)
|
||||
F F F F F
|
||||
# drCCD rCCD crCCD lCCD
|
||||
F F F F
|
||||
# CIS CIS(D) CID CISD FCI
|
||||
F F F F F
|
||||
# phRPA phRPAx crRPA ppRPA
|
||||
F F F F
|
||||
# G0F2 evGF2 qsGF2 ufGF2 G0F3 evGF3
|
||||
F F F F F F
|
||||
# G0W0 evGW qsGW SRG-qsGW ufG0W0 ufGW
|
||||
F F F F F F
|
||||
# G0T0pp evGTpp qsGTpp ufG0T0pp
|
||||
F F F F
|
||||
# G0T0eh evGTeh qsGTeh
|
||||
F F F
|
||||
# Rtest Utest Gtest
|
||||
F F F
|
@ -1,18 +0,0 @@
|
||||
# HF: maxSCF thresh DIIS guess mix shift stab search
|
||||
256 0.00001 5 1 0.0 0.0 F F
|
||||
# MP: reg
|
||||
F
|
||||
# CC: maxSCF thresh DIIS
|
||||
64 0.00001 5
|
||||
# spin: TDA singlet triplet
|
||||
F T T
|
||||
# GF: maxSCF thresh DIIS lin eta renorm reg
|
||||
256 0.00001 5 F 0.0 0 F
|
||||
# GW: maxSCF thresh DIIS lin eta TDA_W reg
|
||||
256 0.00001 5 F 0.0 F F
|
||||
# GT: maxSCF thresh DIIS lin eta TDA_T reg
|
||||
256 0.00001 5 F 0.0 F F
|
||||
# ACFDT: AC Kx XBS
|
||||
F F T
|
||||
# BSE: phBSE phBSE2 ppBSE dBSE dTDA
|
||||
F F F F T
|
@ -131,9 +131,9 @@ subroutine GW_ppBSE(TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,
|
||||
if(dBSE) &
|
||||
call GW_ppBSE_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,eW,eGW,ERI,dipole_int,OmRPA,rho_RPA, &
|
||||
Om1,X1,Y1,Om2,X2,Y2,KB_sta,KC_sta,KD_sta)
|
||||
|
||||
write(*,*) "Deallocate not done"
|
||||
deallocate(Om1,X1,Y1,Om2,X2,Y2,Bpp,Cpp,Dpp,KB_sta,KC_sta,KD_sta)
|
||||
|
||||
write(*,*) "Deallocate done"
|
||||
end if
|
||||
|
||||
!-------------------
|
||||
|
@ -75,9 +75,8 @@ subroutine GW_ppBSE_dynamic_kernel_B(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambd
|
||||
|
||||
KB_dyn(ab,ij) = KB_dyn(ab,ij) + num*dem/(dem**2 + eta**2)
|
||||
|
||||
KB_dyn(ab,ij) = 2d0*KB_dyn(ab,ij)/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(i,j)))
|
||||
|
||||
end do
|
||||
KB_dyn(ab,ij) = 2d0*KB_dyn(ab,ij)/sqrt((1d0 + Kronecker_delta(a,b))*(1d0 + Kronecker_delta(i,j)))
|
||||
|
||||
end do
|
||||
end do
|
||||
@ -121,10 +120,8 @@ subroutine GW_ppBSE_dynamic_kernel_B(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambd
|
||||
|
||||
KB_dyn(ab,ij) = KB_dyn(ab,ij) - num*dem/(dem**2 + eta**2)
|
||||
|
||||
KB_dyn(ab,ij) = 2d0*KB_dyn(ab,ij)
|
||||
|
||||
end do
|
||||
|
||||
KB_dyn(ab,ij) = 2d0*KB_dyn(ab,ij)
|
||||
end do
|
||||
end do
|
||||
|
||||
|
@ -55,7 +55,6 @@ subroutine GW_ppBSE_dynamic_kernel_C(ispin,eta,nBas,nC,nO,nV,nR,nS,nVV,lambda,eG
|
||||
cd = cd + 1
|
||||
|
||||
do m=1,nS
|
||||
|
||||
dem = OmBSE - eGW(c) - Om(m) - eGW(b)
|
||||
num = rho(a,c,m)*rho(b,d,m)
|
||||
|
||||
@ -80,11 +79,9 @@ subroutine GW_ppBSE_dynamic_kernel_C(ispin,eta,nBas,nC,nO,nV,nR,nS,nVV,lambda,eG
|
||||
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)))
|
||||
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
@ -131,11 +128,10 @@ subroutine GW_ppBSE_dynamic_kernel_C(ispin,eta,nBas,nC,nO,nV,nR,nS,nVV,lambda,eG
|
||||
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) = 2d0*KC_dyn(ab,cd)
|
||||
ZC_dyn(ab,cd) = 2d0*ZC_dyn(ab,cd)
|
||||
|
||||
end do
|
||||
|
||||
KC_dyn(ab,cd) = 2d0*KC_dyn(ab,cd)
|
||||
ZC_dyn(ab,cd) = 2d0*ZC_dyn(ab,cd)
|
||||
end do
|
||||
end do
|
||||
|
||||
|
@ -80,11 +80,9 @@ subroutine GW_ppBSE_dynamic_kernel_D(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,lambda,eG
|
||||
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
|
||||
|
||||
end do
|
||||
KD_dyn(ij,kl) = 2d0*KD_dyn(ij,kl)/sqrt((1d0 + Kronecker_delta(i,j))*(1d0 + Kronecker_delta(k,l)))
|
||||
ZD_dyn(ij,kl) = 2d0*ZD_dyn(ij,kl)/sqrt((1d0 + Kronecker_delta(i,j))*(1d0 + Kronecker_delta(k,l)))
|
||||
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
@ -131,11 +129,9 @@ subroutine GW_ppBSE_dynamic_kernel_D(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,lambda,eG
|
||||
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
|
||||
|
||||
end do
|
||||
KD_dyn(ij,kl) = 2d0*KD_dyn(ij,kl)
|
||||
ZD_dyn(ij,kl) = 2d0*ZD_dyn(ij,kl)
|
||||
|
||||
end do
|
||||
|
||||
end do
|
||||
end do
|
||||
|
||||
|
@ -56,10 +56,15 @@ subroutine GW_ppBSE_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOO,
|
||||
|
||||
! Memory allocation
|
||||
|
||||
allocate(Om1Dyn(maxVV),Om2Dyn(maxOO),Z1Dyn(maxVV),Z2Dyn(maxOO), &
|
||||
allocate(Om1Dyn(nOO),Om2Dyn(nOO),Z1Dyn(nOO),Z2Dyn(nOO), &
|
||||
KB_dyn(nVV,nOO),KC_dyn(nVV,nVV),KD_dyn(nOO,nOO), &
|
||||
ZC_dyn(nVV,nVV),ZD_dyn(nOO,nOO))
|
||||
|
||||
Om1Dyn(:) = 0d0
|
||||
Om2Dyn(:) = 0d0
|
||||
Z1Dyn(:) = 0d0
|
||||
Z2Dyn(:) = 0d0
|
||||
|
||||
if(dTDA) then
|
||||
write(*,*)
|
||||
write(*,*) '*** dynamical TDA activated ***'
|
||||
@ -77,8 +82,8 @@ subroutine GW_ppBSE_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOO,
|
||||
! if(.not.dTDA) call GW_ppBSE_dynamic_kernel_B(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,1d0,eGW,OmRPA,rho_RPA,OmBSE(ab),KB_dyn)
|
||||
call GW_ppBSE_dynamic_kernel_C(ispin,eta,nBas,nC,nO,nV,nR,nS,nVV,1d0,eGW,OmRPA,rho_RPA,Om1(ab),KC_dyn,ZC_dyn)
|
||||
|
||||
Z1Dyn(ab) = dot_product(X1(:,ab),matmul(ZC_dyn,X1(:,ab)))
|
||||
Om1Dyn(ab) = dot_product(X1(:,ab),matmul(KC_dyn - KC_sta,X1(:,ab)))
|
||||
Z1Dyn(ab) = dot_product(X1(ab,:),matmul(ZC_dyn,X1(ab,:)))
|
||||
Om1Dyn(ab) = dot_product(X1(ab,:),matmul(KC_dyn - KC_sta,X1(ab,:)))
|
||||
|
||||
Z1Dyn(ab) = 1d0/(1d0 - Z1Dyn(ab))
|
||||
Om1Dyn(ab) = Z1Dyn(ab)*Om1Dyn(ab)
|
||||
@ -101,8 +106,8 @@ subroutine GW_ppBSE_dynamic_perturbation(ispin,dTDA,eta,nBas,nC,nO,nV,nR,nS,nOO,
|
||||
! if(.not.dTDA) call GW_ppBSE_dynamic_kernel_B(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,1d0,eGW,OmRPA,rho_RPA,OmBSE(ab),KB_dyn)
|
||||
call GW_ppBSE_dynamic_kernel_D(ispin,eta,nBas,nC,nO,nV,nR,nS,nOO,1d0,eGW,OmRPA,rho_RPA,Om2(ij),KD_dyn,ZD_dyn)
|
||||
|
||||
Z2Dyn(ij) = dot_product(Y2(:,ij),matmul(ZD_dyn,Y2(:,ij)))
|
||||
Om2Dyn(ij) = dot_product(Y2(:,ij),matmul(KD_dyn - KD_sta,Y2(:,ij)))
|
||||
Z2Dyn(ij) = dot_product(Y2(ij,:),matmul(ZD_dyn,Y2(ij,:)))
|
||||
Om2Dyn(ij) = dot_product(Y2(ij,:),matmul(KD_dyn - KD_sta,Y2(ij,:)))
|
||||
|
||||
Z2Dyn(ij) = 1d0/(1d0 - Z2Dyn(ij))
|
||||
Om2Dyn(ij) = Z2Dyn(ij)*Om2Dyn(ij)
|
||||
|
@ -78,8 +78,8 @@ FIX_ORDER_OF_LIBS=-Wl,--start-group
|
||||
|
||||
|
||||
if sys.platform in ["linux", "linux2"]:
|
||||
# compiler = compile_gfortran_linux
|
||||
compiler = compile_ifort_linux
|
||||
compiler = compile_gfortran_linux
|
||||
# compiler = compile_ifort_linux
|
||||
elif sys.platform == "darwin":
|
||||
compiler = compile_gfortran_mac
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user