mirror of
https://github.com/pfloos/quack
synced 2024-11-04 05:03:49 +01:00
beyond TDA for dynamic BSE
This commit is contained in:
parent
61832f1259
commit
0c6153de3f
2
GoQCaml
2
GoQCaml
@ -1,5 +1,5 @@
|
||||
#! /bin/bash
|
||||
|
||||
cd int
|
||||
../utils/QCaml/run_integrals -b ../input/basis.qcaml -x ../input/molecule.xyz
|
||||
../utils/QCaml/run_integrals -b ../input/basis.qcaml -x ../input/molecule.xyz || ../utils/QCaml/run_integrals -b ../input/basis.qcaml -x ../input/molecule.xyz -c 1
|
||||
###../utils/QCaml/run_integrals -b ../input/basis.qcaml -x ../input/molecule.xyz -m 0.5
|
||||
|
@ -2,4 +2,4 @@
|
||||
2 1 1 0 0
|
||||
# Znuc x y z
|
||||
H 0. 0. 0.
|
||||
H 0. 0. 1.4
|
||||
H 0. 0. 3.7
|
||||
|
125
input/basis
125
input/basis
@ -1,71 +1,92 @@
|
||||
1 9
|
||||
1 14
|
||||
S 8
|
||||
1 9046.0000000 0.0007000
|
||||
2 1357.0000000 0.0053890
|
||||
3 309.3000000 0.0274060
|
||||
4 87.7300000 0.1032070
|
||||
5 28.5600000 0.2787230
|
||||
6 10.2100000 0.4485400
|
||||
7 3.8380000 0.2782380
|
||||
8 0.7466000 0.0154400
|
||||
1 11420.0000000 0.0005230
|
||||
2 1712.0000000 0.0040450
|
||||
3 389.3000000 0.0207750
|
||||
4 110.0000000 0.0807270
|
||||
5 35.5700000 0.2330740
|
||||
6 12.5400000 0.4335010
|
||||
7 4.6440000 0.3474720
|
||||
8 0.5118000 -0.0085080
|
||||
S 8
|
||||
1 9046.0000000 -0.0001530
|
||||
2 1357.0000000 -0.0012080
|
||||
3 309.3000000 -0.0059920
|
||||
4 87.7300000 -0.0245440
|
||||
5 28.5600000 -0.0674590
|
||||
6 10.2100000 -0.1580780
|
||||
7 3.8380000 -0.1218310
|
||||
8 0.7466000 0.5490030
|
||||
1 11420.0000000 -0.0001150
|
||||
2 1712.0000000 -0.0008950
|
||||
3 389.3000000 -0.0046240
|
||||
4 110.0000000 -0.0185280
|
||||
5 35.5700000 -0.0573390
|
||||
6 12.5400000 -0.1320760
|
||||
7 4.6440000 -0.1725100
|
||||
8 0.5118000 0.5999440
|
||||
S 1
|
||||
1 0.2248000 1.0000000
|
||||
1 1.2930000 1.0000000
|
||||
S 1
|
||||
1 0.0612400 1.0000000
|
||||
1 0.1787000 1.0000000
|
||||
S 1
|
||||
1 0.0576000 1.0000000
|
||||
P 3
|
||||
1 13.5500000 0.0399190
|
||||
2 2.9170000 0.2171690
|
||||
3 0.7973000 0.5103190
|
||||
1 26.6300000 0.0146700
|
||||
2 5.9480000 0.0917640
|
||||
3 1.7420000 0.2986830
|
||||
P 1
|
||||
1 0.2185000 1.0000000
|
||||
1 0.5550000 1.0000000
|
||||
P 1
|
||||
1 0.0561100 1.0000000
|
||||
1 0.1725000 1.0000000
|
||||
P 1
|
||||
1 0.0491000 1.0000000
|
||||
D 1
|
||||
1 0.8170000 1.0000000
|
||||
1 1.6540000 1.0000000
|
||||
D 1
|
||||
1 0.2300000 1.0000000
|
||||
2 9
|
||||
1 0.4690000 1.0000000
|
||||
D 1
|
||||
1 0.1510000 1.0000000
|
||||
F 1
|
||||
1 1.0930000 1.0000000
|
||||
F 1
|
||||
1 0.3640000 1.0000000
|
||||
2 14
|
||||
S 8
|
||||
1 9046.0000000 0.0007000
|
||||
2 1357.0000000 0.0053890
|
||||
3 309.3000000 0.0274060
|
||||
4 87.7300000 0.1032070
|
||||
5 28.5600000 0.2787230
|
||||
6 10.2100000 0.4485400
|
||||
7 3.8380000 0.2782380
|
||||
8 0.7466000 0.0154400
|
||||
1 11420.0000000 0.0005230
|
||||
2 1712.0000000 0.0040450
|
||||
3 389.3000000 0.0207750
|
||||
4 110.0000000 0.0807270
|
||||
5 35.5700000 0.2330740
|
||||
6 12.5400000 0.4335010
|
||||
7 4.6440000 0.3474720
|
||||
8 0.5118000 -0.0085080
|
||||
S 8
|
||||
1 9046.0000000 -0.0001530
|
||||
2 1357.0000000 -0.0012080
|
||||
3 309.3000000 -0.0059920
|
||||
4 87.7300000 -0.0245440
|
||||
5 28.5600000 -0.0674590
|
||||
6 10.2100000 -0.1580780
|
||||
7 3.8380000 -0.1218310
|
||||
8 0.7466000 0.5490030
|
||||
1 11420.0000000 -0.0001150
|
||||
2 1712.0000000 -0.0008950
|
||||
3 389.3000000 -0.0046240
|
||||
4 110.0000000 -0.0185280
|
||||
5 35.5700000 -0.0573390
|
||||
6 12.5400000 -0.1320760
|
||||
7 4.6440000 -0.1725100
|
||||
8 0.5118000 0.5999440
|
||||
S 1
|
||||
1 0.2248000 1.0000000
|
||||
1 1.2930000 1.0000000
|
||||
S 1
|
||||
1 0.0612400 1.0000000
|
||||
1 0.1787000 1.0000000
|
||||
S 1
|
||||
1 0.0576000 1.0000000
|
||||
P 3
|
||||
1 13.5500000 0.0399190
|
||||
2 2.9170000 0.2171690
|
||||
3 0.7973000 0.5103190
|
||||
1 26.6300000 0.0146700
|
||||
2 5.9480000 0.0917640
|
||||
3 1.7420000 0.2986830
|
||||
P 1
|
||||
1 0.2185000 1.0000000
|
||||
1 0.5550000 1.0000000
|
||||
P 1
|
||||
1 0.0561100 1.0000000
|
||||
1 0.1725000 1.0000000
|
||||
P 1
|
||||
1 0.0491000 1.0000000
|
||||
D 1
|
||||
1 0.8170000 1.0000000
|
||||
1 1.6540000 1.0000000
|
||||
D 1
|
||||
1 0.2300000 1.0000000
|
||||
1 0.4690000 1.0000000
|
||||
D 1
|
||||
1 0.1510000 1.0000000
|
||||
F 1
|
||||
1 1.0930000 1.0000000
|
||||
F 1
|
||||
1 0.3640000 1.0000000
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
# G0F2 evGF2 G0F3 evGF3
|
||||
F F F F
|
||||
# G0W0 evGW qsGW
|
||||
T F F
|
||||
T T F
|
||||
# G0T0 evGT qsGT
|
||||
F F F
|
||||
# MCMP2
|
||||
|
@ -9,7 +9,7 @@
|
||||
# GF: maxSCF thresh DIIS n_diis lin renorm
|
||||
256 0.00001 T 5 T 3
|
||||
# GW/GT: maxSCF thresh DIIS n_diis COHSEX SOSEX BSE TDA G0W GW0 lin eta
|
||||
256 0.00001 T 5 F F T F F F T 0.0
|
||||
256 0.00001 T 5 F F T F F F T 0.00367493
|
||||
# ACFDT: AC Kx XBS
|
||||
F F T
|
||||
# MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift
|
||||
|
125
input/weight
125
input/weight
@ -1,71 +1,92 @@
|
||||
1 9
|
||||
1 14
|
||||
S 8
|
||||
1 9046.0000000 0.0007000
|
||||
2 1357.0000000 0.0053890
|
||||
3 309.3000000 0.0274060
|
||||
4 87.7300000 0.1032070
|
||||
5 28.5600000 0.2787230
|
||||
6 10.2100000 0.4485400
|
||||
7 3.8380000 0.2782380
|
||||
8 0.7466000 0.0154400
|
||||
1 11420.0000000 0.0005230
|
||||
2 1712.0000000 0.0040450
|
||||
3 389.3000000 0.0207750
|
||||
4 110.0000000 0.0807270
|
||||
5 35.5700000 0.2330740
|
||||
6 12.5400000 0.4335010
|
||||
7 4.6440000 0.3474720
|
||||
8 0.5118000 -0.0085080
|
||||
S 8
|
||||
1 9046.0000000 -0.0001530
|
||||
2 1357.0000000 -0.0012080
|
||||
3 309.3000000 -0.0059920
|
||||
4 87.7300000 -0.0245440
|
||||
5 28.5600000 -0.0674590
|
||||
6 10.2100000 -0.1580780
|
||||
7 3.8380000 -0.1218310
|
||||
8 0.7466000 0.5490030
|
||||
1 11420.0000000 -0.0001150
|
||||
2 1712.0000000 -0.0008950
|
||||
3 389.3000000 -0.0046240
|
||||
4 110.0000000 -0.0185280
|
||||
5 35.5700000 -0.0573390
|
||||
6 12.5400000 -0.1320760
|
||||
7 4.6440000 -0.1725100
|
||||
8 0.5118000 0.5999440
|
||||
S 1
|
||||
1 0.2248000 1.0000000
|
||||
1 1.2930000 1.0000000
|
||||
S 1
|
||||
1 0.0612400 1.0000000
|
||||
1 0.1787000 1.0000000
|
||||
S 1
|
||||
1 0.0576000 1.0000000
|
||||
P 3
|
||||
1 13.5500000 0.0399190
|
||||
2 2.9170000 0.2171690
|
||||
3 0.7973000 0.5103190
|
||||
1 26.6300000 0.0146700
|
||||
2 5.9480000 0.0917640
|
||||
3 1.7420000 0.2986830
|
||||
P 1
|
||||
1 0.2185000 1.0000000
|
||||
1 0.5550000 1.0000000
|
||||
P 1
|
||||
1 0.0561100 1.0000000
|
||||
1 0.1725000 1.0000000
|
||||
P 1
|
||||
1 0.0491000 1.0000000
|
||||
D 1
|
||||
1 0.8170000 1.0000000
|
||||
1 1.6540000 1.0000000
|
||||
D 1
|
||||
1 0.2300000 1.0000000
|
||||
2 9
|
||||
1 0.4690000 1.0000000
|
||||
D 1
|
||||
1 0.1510000 1.0000000
|
||||
F 1
|
||||
1 1.0930000 1.0000000
|
||||
F 1
|
||||
1 0.3640000 1.0000000
|
||||
2 14
|
||||
S 8
|
||||
1 9046.0000000 0.0007000
|
||||
2 1357.0000000 0.0053890
|
||||
3 309.3000000 0.0274060
|
||||
4 87.7300000 0.1032070
|
||||
5 28.5600000 0.2787230
|
||||
6 10.2100000 0.4485400
|
||||
7 3.8380000 0.2782380
|
||||
8 0.7466000 0.0154400
|
||||
1 11420.0000000 0.0005230
|
||||
2 1712.0000000 0.0040450
|
||||
3 389.3000000 0.0207750
|
||||
4 110.0000000 0.0807270
|
||||
5 35.5700000 0.2330740
|
||||
6 12.5400000 0.4335010
|
||||
7 4.6440000 0.3474720
|
||||
8 0.5118000 -0.0085080
|
||||
S 8
|
||||
1 9046.0000000 -0.0001530
|
||||
2 1357.0000000 -0.0012080
|
||||
3 309.3000000 -0.0059920
|
||||
4 87.7300000 -0.0245440
|
||||
5 28.5600000 -0.0674590
|
||||
6 10.2100000 -0.1580780
|
||||
7 3.8380000 -0.1218310
|
||||
8 0.7466000 0.5490030
|
||||
1 11420.0000000 -0.0001150
|
||||
2 1712.0000000 -0.0008950
|
||||
3 389.3000000 -0.0046240
|
||||
4 110.0000000 -0.0185280
|
||||
5 35.5700000 -0.0573390
|
||||
6 12.5400000 -0.1320760
|
||||
7 4.6440000 -0.1725100
|
||||
8 0.5118000 0.5999440
|
||||
S 1
|
||||
1 0.2248000 1.0000000
|
||||
1 1.2930000 1.0000000
|
||||
S 1
|
||||
1 0.0612400 1.0000000
|
||||
1 0.1787000 1.0000000
|
||||
S 1
|
||||
1 0.0576000 1.0000000
|
||||
P 3
|
||||
1 13.5500000 0.0399190
|
||||
2 2.9170000 0.2171690
|
||||
3 0.7973000 0.5103190
|
||||
1 26.6300000 0.0146700
|
||||
2 5.9480000 0.0917640
|
||||
3 1.7420000 0.2986830
|
||||
P 1
|
||||
1 0.2185000 1.0000000
|
||||
1 0.5550000 1.0000000
|
||||
P 1
|
||||
1 0.0561100 1.0000000
|
||||
1 0.1725000 1.0000000
|
||||
P 1
|
||||
1 0.0491000 1.0000000
|
||||
D 1
|
||||
1 0.8170000 1.0000000
|
||||
1 1.6540000 1.0000000
|
||||
D 1
|
||||
1 0.2300000 1.0000000
|
||||
1 0.4690000 1.0000000
|
||||
D 1
|
||||
1 0.1510000 1.0000000
|
||||
F 1
|
||||
1 1.0930000 1.0000000
|
||||
F 1
|
||||
1 0.3640000 1.0000000
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine Bethe_Salpeter_Z_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,OmRPA,OmBSE,rho,Z_dyn)
|
||||
subroutine Bethe_Salpeter_ZA_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,OmRPA,OmBSE,rho,ZA_dyn)
|
||||
|
||||
! Compute the dynamic part of the Bethe-Salpeter equation matrices
|
||||
|
||||
@ -24,11 +24,11 @@ subroutine Bethe_Salpeter_Z_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,Om
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: Z_dyn(nS,nS)
|
||||
double precision,intent(out) :: ZA_dyn(nS,nS)
|
||||
|
||||
! Initialization
|
||||
|
||||
Z_dyn(:,:) = 0d0
|
||||
ZA_dyn(:,:) = 0d0
|
||||
|
||||
! Number of poles taken into account
|
||||
|
||||
@ -56,11 +56,11 @@ subroutine Bethe_Salpeter_Z_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,Om
|
||||
|
||||
enddo
|
||||
|
||||
Z_dyn(ia,jb) = Z_dyn(ia,jb) + 2d0*lambda*chi
|
||||
ZA_dyn(ia,jb) = ZA_dyn(ia,jb) + 2d0*lambda*chi
|
||||
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
end subroutine Bethe_Salpeter_Z_matrix_dynamic
|
||||
end subroutine Bethe_Salpeter_ZA_matrix_dynamic
|
66
src/QuAcK/Bethe_Salpeter_ZB_matrix_dynamic.f90
Normal file
66
src/QuAcK/Bethe_Salpeter_ZB_matrix_dynamic.f90
Normal file
@ -0,0 +1,66 @@
|
||||
subroutine Bethe_Salpeter_ZB_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,OmRPA,OmBSE,rho,ZB_dyn)
|
||||
|
||||
! Compute the dynamic part of the Bethe-Salpeter equation matrices
|
||||
|
||||
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) :: eGW(nBas)
|
||||
double precision,intent(in) :: OmRPA(nS)
|
||||
double precision,intent(in) :: OmBSE
|
||||
double precision,intent(in) :: rho(nBas,nBas,nS)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: maxS
|
||||
double precision :: chi
|
||||
double precision :: eps
|
||||
integer :: i,j,a,b,ia,jb,kc
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: ZB_dyn(nS,nS)
|
||||
|
||||
! Initialization
|
||||
|
||||
ZB_dyn(:,:) = 0d0
|
||||
|
||||
! Number of poles taken into account
|
||||
|
||||
maxS = nS
|
||||
|
||||
! Build dynamic A matrix
|
||||
|
||||
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,maxS
|
||||
|
||||
eps = (OmBSE - OmRPA(kc) - (eGW(a) - eGW(b)))**2 + eta**2
|
||||
chi = chi + rho(i,b,kc)*rho(a,j,kc)*((OmBSE - OmRPA(kc) - (eGW(a) - eGW(b)))/eps)**2
|
||||
|
||||
eps = (OmBSE - OmRPA(kc) - (eGW(j) - eGW(i)))**2 + eta**2
|
||||
chi = chi + rho(i,b,kc)*rho(a,j,kc)*((OmBSE - OmRPA(kc) - (eGW(j) - eGW(i)))/eps)**2
|
||||
|
||||
enddo
|
||||
|
||||
ZB_dyn(ia,jb) = ZB_dyn(ia,jb) + 2d0*lambda*chi
|
||||
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
end subroutine Bethe_Salpeter_ZB_matrix_dynamic
|
@ -25,6 +25,7 @@ subroutine Bethe_Salpeter_dynamic_perturbation(TDA,eta,nBas,nC,nO,nV,nR,nS,eGW,O
|
||||
|
||||
! Local variables
|
||||
|
||||
logical :: TDA_dyn = .false.
|
||||
integer :: ia
|
||||
integer,parameter :: maxS = 10
|
||||
double precision :: gapGW
|
||||
@ -35,11 +36,13 @@ subroutine Bethe_Salpeter_dynamic_perturbation(TDA,eta,nBas,nC,nO,nV,nR,nS,eGW,O
|
||||
double precision,allocatable :: Y(:)
|
||||
double precision,allocatable :: A_dyn(:,:)
|
||||
double precision,allocatable :: B_dyn(:,:)
|
||||
double precision,allocatable :: Z_dyn(:,:)
|
||||
double precision,allocatable :: ZA_dyn(:,:)
|
||||
double precision,allocatable :: ZB_dyn(:,:)
|
||||
|
||||
! Memory allocation
|
||||
|
||||
allocate(OmDyn(nS),ZDyn(nS),X(nS),Y(nS),A_dyn(nS,nS),B_dyn(nS,nS),Z_dyn(nS,nS))
|
||||
allocate(OmDyn(nS),ZDyn(nS),X(nS),Y(nS),A_dyn(nS,nS),ZA_dyn(nS,nS))
|
||||
if(TDA_dyn) allocate(B_dyn(nS,nS),ZB_dyn(nS,nS))
|
||||
|
||||
gapGW = eGW(nO+1) - eGW(nO)
|
||||
|
||||
@ -54,24 +57,36 @@ subroutine Bethe_Salpeter_dynamic_perturbation(TDA,eta,nBas,nC,nO,nV,nR,nS,eGW,O
|
||||
X(:) = 0.5d0*(XpY(ia,:) + XmY(ia,:))
|
||||
Y(:) = 0.5d0*(XpY(ia,:) - XmY(ia,:))
|
||||
|
||||
! Resonant part of the BSE correction
|
||||
|
||||
call Bethe_Salpeter_A_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,1d0,eGW(:),OmRPA(:),OmBSE(ia),rho(:,:,:),A_dyn(:,:))
|
||||
|
||||
! Renormalization factor
|
||||
! Renormalization factor of the resonant part
|
||||
|
||||
call Bethe_Salpeter_Z_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,1d0,eGW(:),OmRPA(:),OmBSE(ia),rho(:,:,:),Z_dyn(:,:))
|
||||
ZDyn(ia) = dot_product(X(:),matmul(Z_dyn(:,:),X(:)))
|
||||
ZDyn(ia) = 1d0/(1d0 - ZDyn(ia))
|
||||
call Bethe_Salpeter_ZA_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,1d0,eGW(:),OmRPA(:),OmBSE(ia),rho(:,:,:),ZA_dyn(:,:))
|
||||
|
||||
! First-order correction
|
||||
|
||||
if(.true.) then
|
||||
if(TDA_dyn) then
|
||||
|
||||
ZDyn(ia) = dot_product(X(:),matmul(ZA_dyn(:,:),X(:)))
|
||||
OmDyn(ia) = dot_product(X(:),matmul(A_dyn(:,:),X(:)))
|
||||
|
||||
else
|
||||
|
||||
! Anti-resonant part of the BSE correction
|
||||
|
||||
call Bethe_Salpeter_B_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,1d0,eGW(:),OmRPA(:),OmBSE(ia),rho(:,:,:),B_dyn(:,:))
|
||||
|
||||
! Renormalization factor of the anti-resonant part
|
||||
|
||||
call Bethe_Salpeter_ZB_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,1d0,eGW(:),OmRPA(:),OmBSE(ia),rho(:,:,:),ZB_dyn(:,:))
|
||||
|
||||
ZDyn(ia) = dot_product(X(:),matmul(ZA_dyn(:,:),X(:))) &
|
||||
- dot_product(Y(:),matmul(ZA_dyn(:,:),Y(:))) &
|
||||
+ dot_product(X(:),matmul(ZB_dyn(:,:),Y(:))) &
|
||||
- dot_product(Y(:),matmul(ZB_dyn(:,:),X(:)))
|
||||
|
||||
OmDyn(ia) = dot_product(X(:),matmul(A_dyn(:,:),X(:))) &
|
||||
- dot_product(Y(:),matmul(A_dyn(:,:),Y(:))) &
|
||||
+ dot_product(X(:),matmul(B_dyn(:,:),Y(:))) &
|
||||
@ -79,6 +94,7 @@ subroutine Bethe_Salpeter_dynamic_perturbation(TDA,eta,nBas,nC,nO,nV,nR,nS,eGW,O
|
||||
|
||||
end if
|
||||
|
||||
ZDyn(ia) = 1d0/(1d0 - ZDyn(ia))
|
||||
OmDyn(ia) = ZDyn(ia)*OmDyn(ia)
|
||||
|
||||
write(*,'(2X,I5,5X,F15.6,5X,F15.6,5X,F15.6,5X,F15.6)') &
|
||||
|
Loading…
Reference in New Issue
Block a user