10
1
mirror of https://github.com/pfloos/quack synced 2024-11-04 21:23:55 +01:00

add optimization in BSE@GW

This commit is contained in:
EnzoMonino 2023-07-10 11:36:45 +02:00
parent b851d09c48
commit d93fbcb591
5 changed files with 38 additions and 28 deletions

View File

@ -11,9 +11,9 @@
# RPA* RPAx* crRPA ppRPA
F F F F
# G0F2* evGF2* qsGF2* G0F3 evGF3
T F F F F
F F F F F
# G0W0* evGW* qsGW* SRG-qsGW ufG0W0 ufGW
T F F F F F
F F F F F F
# G0T0pp evGTpp qsGTpp G0T0eh evGTeh qsGTeh
F F F F F T
F F F F F F
# * unrestricted version available

View File

@ -34,15 +34,16 @@ subroutine BSE2_static_kernel_KA(eta,nBas,nC,nO,nV,nR,nS,lambda,eW,W,KA2_sta)
! Compute BSE2 kernel
!------------------------------------------------
ia = 0
do i=nC+1,nO
do a=nO+1,nBas-nR
ia = ia + 1
jb = 0
!$omp parallel do default(private) shared(KA2_sta,W,num,dem,eW,nO,nBas,eta,nC,nR)
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = (b-nO) + (j-1)*(nBas-nO)
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
ia = 0
do i=nC+1,nO
do a=nO+1,nBas-nR
ia = (a-nO) + (i-1)*(nBas-nO)
do k=nC+1,nO
do c=nO+1,nBas-nR
@ -88,4 +89,6 @@ subroutine BSE2_static_kernel_KA(eta,nBas,nC,nO,nV,nR,nS,lambda,eW,W,KA2_sta)
end do
end do
!$omp end parallel do
end subroutine BSE2_static_kernel_KA

View File

@ -34,15 +34,16 @@ subroutine BSE2_static_kernel_KB(eta,nBas,nC,nO,nV,nR,nS,lambda,eW,W,KB2_sta)
! Compute BSE2 kernel
!------------------------------------------------
ia = 0
do i=nC+1,nO
do a=nO+1,nBas-nR
ia = ia + 1
jb = 0
!$omp parallel do default(private) shared(KB2_sta,W,num,dem,eW,nO,nBas,eta,nC,nR)
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = (b-nO) + (j-1)*(nBas-nO)
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
ia = 0
do i=nC+1,nO
do a=nO+1,nBas-nR
ia = (a-nO) + (i-1)*(nBas-nO)
do k=nC+1,nO
do c=nO+1,nBas-nR
@ -88,4 +89,6 @@ subroutine BSE2_static_kernel_KB(eta,nBas,nC,nO,nV,nR,nS,lambda,eW,W,KB2_sta)
end do
end do
!$omp end parallel do
end subroutine BSE2_static_kernel_KB

View File

@ -38,14 +38,16 @@ subroutine Bethe_Salpeter_A_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,Om
! 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
jb = 0
!$omp parallel do default(private) shared(A_dyn,ZA_dyn,OmRPA,OmBSE,eGW,rho_RPA,nO,nBas,maxS,chi,eps,eta,nC,nR,lambda)
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = (b-nO) + (j-1)*(nBas-nO)
ia = 0
do i=nC+1,nO
do a=nO+1,nBas-nR
ia = (a-nO) + (i-1)*(nBas-nO)
chi = 0d0
@ -88,4 +90,6 @@ subroutine Bethe_Salpeter_A_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,Om
enddo
enddo
!$omp end parallel do
end subroutine Bethe_Salpeter_A_matrix_dynamic

View File

@ -47,7 +47,7 @@ subroutine read_geometry(nNuc,ZNuc,rNuc,ENuc)
do i=1,nNuc-1
do j=i+1,nNuc
RAB = (rNuc(i,1)-rNuc(j,1))**2 + (rNuc(i,2)-rNuc(j,2))**2 + (rNuc(i,3)-rNuc(j,3))**2
ENuc = ENuc + ZNuc(i)*ZNuc(j)/(AnToBo*sqrt(RAB))
ENuc = ENuc + ZNuc(i)*ZNuc(j)/(AntoBo*sqrt(RAB))
enddo
enddo