4
1
mirror of https://github.com/pfloos/quack synced 2024-12-22 20:35:36 +01:00

clean dBSE code

This commit is contained in:
Pierre-Francois Loos 2020-06-04 22:40:14 +02:00
parent 2d02a4b694
commit 986caedeac
9 changed files with 97 additions and 158 deletions

View File

@ -1,66 +1,71 @@
1 21 1 9
S 10 S 8
1 54620.0000000 0.0000180 1 9046.0000000 0.0007000
2 8180.0000000 0.0001380 2 1357.0000000 0.0053890
3 1862.0000000 0.0007230 3 309.3000000 0.0274060
4 527.3000000 0.0030390 4 87.7300000 0.1032070
5 172.0000000 0.0109080 5 28.5600000 0.2787230
6 62.1000000 0.0340350 6 10.2100000 0.4485400
7 24.2100000 0.0911930 7 3.8380000 0.2782380
8 9.9930000 0.1992680 8 0.7466000 0.0154400
9 4.3050000 0.3293550 S 8
10 1.9210000 0.3404890 1 9046.0000000 -0.0001530
S 10 2 1357.0000000 -0.0012080
1 54620.0000000 -0.0000030 3 309.3000000 -0.0059920
2 8180.0000000 -0.0000250 4 87.7300000 -0.0245440
3 1862.0000000 -0.0001310 5 28.5600000 -0.0674590
4 527.3000000 -0.0005580 6 10.2100000 -0.1580780
5 172.0000000 -0.0019880 7 3.8380000 -0.1218310
6 62.1000000 -0.0063700 8 0.7466000 0.5490030
7 24.2100000 -0.0172170
8 9.9930000 -0.0408580
9 4.3050000 -0.0742370
10 1.9210000 -0.1192340
S 1 S 1
1 0.8663000 1.0000000 1 0.2248000 1.0000000
S 1 S 1
1 0.2475000 1.0000000 1 0.0612400 1.0000000
P 3
1 13.5500000 0.0399190
2 2.9170000 0.2171690
3 0.7973000 0.5103190
P 1
1 0.2185000 1.0000000
P 1
1 0.0561100 1.0000000
D 1
1 0.8170000 1.0000000
D 1
1 0.2300000 1.0000000
2 9
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
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
S 1 S 1
1 0.1009000 1.0000000 1 0.2248000 1.0000000
S 1 S 1
1 0.0412900 1.0000000 1 0.0612400 1.0000000
P 4 P 3
1 43.7500000 0.0006330 1 13.5500000 0.0399190
2 10.3300000 0.0048080 2 2.9170000 0.2171690
3 3.2260000 0.0205270 3 0.7973000 0.5103190
4 1.1270000 0.0678160
P 1 P 1
1 0.4334000 1.0000000 1 0.2185000 1.0000000
P 1 P 1
1 0.1808000 1.0000000 1 0.0561100 1.0000000
P 1
1 0.0782700 1.0000000
P 1
1 0.0337200 1.0000000
D 1 D 1
1 1.6350000 1.0000000 1 0.8170000 1.0000000
D 1 D 1
1 0.7410000 1.0000000 1 0.2300000 1.0000000
D 1
1 0.3350000 1.0000000
D 1
1 0.1519000 1.0000000
F 1
1 0.6860000 1.0000000
F 1
1 0.4010000 1.0000000
F 1
1 0.2350000 1.0000000
G 1
1 0.6030000 1.0000000
G 1
1 0.3240000 1.0000000
H 1
1 0.5100000 1.0000000

View File

@ -11,9 +11,9 @@
# RPA RPAx ppRPA # RPA RPAx ppRPA
F F F F F F
# G0F2 evGF2 G0F3 evGF3 # G0F2 evGF2 G0F3 evGF3
T F F F F F F F
# G0W0 evGW qsGW # G0W0 evGW qsGW
F F F T F F
# G0T0 evGT qsGT # G0T0 evGT qsGT
F F F F F F
# MCMP2 # MCMP2

View File

@ -1,4 +1,5 @@
# nAt nEla nElb nCore nRyd # nAt nEla nElb nCore nRyd
1 2 2 0 0 2 7 7 0 0
# Znuc x y z # Znuc x y z
Be 0.0 0.0 0.0 N 0. 0. -1.04008632
N 0. 0. +1.04008632

View File

@ -1,3 +1,4 @@
1 2
Be 0.0000000000 0.0000000000 0.0000000000 N 0.0000000000 0.0000000000 -0.5503900175
N 0.0000000000 0.0000000000 0.5503900175

View File

@ -1,66 +0,0 @@
subroutine BSE2_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
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) :: ZA_dyn(nS,nS)
! Initialization
ZA_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(j)))**2 + eta**2
chi = chi + rho(i,j,kc)*rho(a,b,kc)*((OmBSE - OmRPA(kc) - (eGW(a) - eGW(j)))/eps)**2
eps = (OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))**2 + eta**2
chi = chi + rho(i,j,kc)*rho(a,b,kc)*((OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))/eps)**2
enddo
ZA_dyn(ia,jb) = ZA_dyn(ia,jb) + 2d0*lambda*chi
enddo
enddo
enddo
enddo
end subroutine BSE2_ZA_matrix_dynamic

View File

@ -51,9 +51,8 @@ subroutine Bethe_Salpeter_AB_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,O
do kc=1,maxS do kc=1,maxS
eps = OmRPA(kc)**2 + eta**2 chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*OmRPA(kc)/OmRPA(kc)**2 + eta**2
chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*OmRPA(kc)/eps chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*OmRPA(kc)/OmRPA(kc)**2 + eta**2
chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*OmRPA(kc)/eps
enddo enddo
@ -65,17 +64,17 @@ subroutine Bethe_Salpeter_AB_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,O
do kc=1,maxS do kc=1,maxS
eps_A = (+ OmBSE - OmRPA(kc) - (eGW(a) - eGW(j)))**2 + eta**2 eps_A = + OmBSE - OmRPA(kc) - (eGW(a) - eGW(j))
chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*(+ OmBSE - OmRPA(kc) - (eGW(a) - eGW(j)))/eps_A chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*eps_A/(eps_A**2 + eta**2)
eps_A = (+ OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))**2 + eta**2 eps_A = + OmBSE - OmRPA(kc) - (eGW(b) - eGW(i))
chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*(+ OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))/eps_A chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*eps_A/(eps_A**2 + eta**2)
eps_B = (+ OmBSE - OmRPA(kc) - (eGW(a) - eGW(b)))**2 + eta**2 eps_B = + OmBSE - OmRPA(kc) - (eGW(a) - eGW(b))
chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*(+ OmBSE - OmRPA(kc) - (eGW(a) - eGW(b)))/eps_B chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*eps_B/(eps_B**2 + eta**2)
eps_B = (+ OmBSE - OmRPA(kc) - (eGW(j) - eGW(i)))**2 + eta**2 eps_B = + OmBSE - OmRPA(kc) - (eGW(j) - eGW(i))
chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*(+ OmBSE - OmRPA(kc) - (eGW(j) - eGW(i)))/eps_B chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*eps_B/(eps_B**2 + eta**2)
enddo enddo

View File

@ -48,8 +48,7 @@ subroutine Bethe_Salpeter_A_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,Om
chi = 0d0 chi = 0d0
do kc=1,maxS do kc=1,maxS
eps = OmRPA(kc)**2 + eta**2 chi = chi + rho(i,j,kc)*rho(a,b,kc)*OmRPA(kc)/(OmRPA(kc)**2 + eta**2)
chi = chi + rho(i,j,kc)*rho(a,b,kc)*OmRPA(kc)/eps
enddo enddo
@ -58,11 +57,11 @@ subroutine Bethe_Salpeter_A_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,Om
chi = 0d0 chi = 0d0
do kc=1,maxS do kc=1,maxS
eps = (OmBSE - OmRPA(kc) - (eGW(a) - eGW(j)))**2 + eta**2 eps = OmBSE - OmRPA(kc) - (eGW(a) - eGW(j))
chi = chi + rho(i,j,kc)*rho(a,b,kc)*(OmBSE - OmRPA(kc) - (eGW(a) - eGW(j)))/eps chi = chi + rho(i,j,kc)*rho(a,b,kc)*eps/(eps**2 + eta**2)
eps = (OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))**2 + eta**2 eps = OmBSE - OmRPA(kc) - (eGW(b) - eGW(i))
chi = chi + rho(i,j,kc)*rho(a,b,kc)*(OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))/eps chi = chi + rho(i,j,kc)*rho(a,b,kc)*eps/(eps**2 + eta**2)
enddo enddo

View File

@ -52,17 +52,17 @@ subroutine Bethe_Salpeter_ZAB_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,
do kc=1,maxS do kc=1,maxS
eps_A = (+ OmBSE - OmRPA(kc) - (eGW(a) - eGW(j)))**2 + eta**2 eps_A = + OmBSE - OmRPA(kc) - (eGW(a) - eGW(j))
chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*((+ OmBSE - OmRPA(kc) - (eGW(a) - eGW(j)))/eps_A)**2 chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*(eps_A**2 - eta**2)/(eps_A**2 + eta**2)**2
eps_A = (+ OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))**2 + eta**2 eps_A = + OmBSE - OmRPA(kc) - (eGW(b) - eGW(i))
chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*((+ OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))/eps_A)**2 chi_A = chi_A + rho(i,j,kc)*rho(a,b,kc)*(eps_A**2 - eta**2)/(eps_A**2 + eta**2)**2
eps_B = (+ OmBSE - OmRPA(kc) - (eGW(a) - eGW(b)))**2 + eta**2 eps_B = + OmBSE - OmRPA(kc) - (eGW(a) - eGW(b))
chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*((+ OmBSE - OmRPA(kc) - (eGW(a) - eGW(b)))/eps_B)**2 chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*(eps_B**2 - eta**2)/(eps_B**2 + eta**2)**2
eps_B = (+ OmBSE - OmRPA(kc) - (eGW(j) - eGW(i)))**2 + eta**2 eps_B = + OmBSE - OmRPA(kc) - (eGW(j) - eGW(i))
chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*((+ OmBSE - OmRPA(kc) - (eGW(j) - eGW(i)))/eps_B)**2 chi_B = chi_B + rho(i,b,kc)*rho(a,j,kc)*(eps_B**2 - eta**2)/(eps_B**2 + eta**2)**2
enddo enddo

View File

@ -48,11 +48,11 @@ subroutine Bethe_Salpeter_ZA_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,O
chi = 0d0 chi = 0d0
do kc=1,maxS do kc=1,maxS
eps = (OmBSE - OmRPA(kc) - (eGW(a) - eGW(j)))**2 + eta**2 eps = OmBSE - OmRPA(kc) - (eGW(a) - eGW(j))
chi = chi + rho(i,j,kc)*rho(a,b,kc)*((OmBSE - OmRPA(kc) - (eGW(a) - eGW(j)))/eps)**2 chi = chi + rho(i,j,kc)*rho(a,b,kc)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
eps = (OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))**2 + eta**2 eps = OmBSE - OmRPA(kc) - (eGW(b) - eGW(i))
chi = chi + rho(i,j,kc)*rho(a,b,kc)*((OmBSE - OmRPA(kc) - (eGW(b) - eGW(i)))/eps)**2 chi = chi + rho(i,j,kc)*rho(a,b,kc)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
enddo enddo