10
1
mirror of https://github.com/pfloos/quack synced 2024-11-04 05:03:49 +01:00

cleanup excitation_energy

This commit is contained in:
Pierre-Francois Loos 2019-04-02 09:59:30 +02:00
parent 8a8e4a939c
commit 8ad895ad85
9 changed files with 32 additions and 142 deletions

View File

@ -1,4 +1,4 @@
# nAt nEla nElb nCore nRyd # nAt nEla nElb nCore nRyd
1 1 1 0 0 1 16 16 0 0
# Znuc x y z # Znuc x y z
X 0.0 0.0 0.0 X 0.0 0.0 0.0

View File

@ -1,29 +1,19 @@
1 6 1 9
S 8 1.00
2940.0000000 0.0006800
441.2000000 0.0052360
100.5000000 0.0266060
28.4300000 0.0999930
9.1690000 0.2697020
3.1960000 0.4514690
1.1590000 0.2950740
0.1811000 0.0125870
S 8 1.00
2940.0000000 -0.0001230
441.2000000 -0.0009660
100.5000000 -0.0048310
28.4300000 -0.0193140
9.1690000 -0.0532800
3.1960000 -0.1207230
1.1590000 -0.1334350
0.1811000 0.5307670
S 1 1.00 S 1 1.00
0.0589000 1.0000000 1.0000000 1.0000000
P 3 1.00 S 1 1.00
3.6190000 0.0291110 1.0000000 1.0000000
0.7110000 0.1693650 S 1 1.00
0.1951000 0.5134580 1.0000000 1.0000000
P 1 1.00 S 1 1.00
0.0601800 1.0000000 1.0000000 1.0000000
D 1 1.00 S 1 1.00
0.2380000 1.0000000 1.0000000 1.0000000
S 1 1.00
1.0000000 1.0000000
S 1 1.00
1.0000000 1.0000000
S 1 1.00
1.0000000 1.0000000
S 1 1.00
1.0000000 1.0000000

View File

@ -9,6 +9,6 @@
# GF2 GF3 # GF2 GF3
F F F F
# G0W0 evGW qsGW # G0W0 evGW qsGW
T T T T T F
# MCMP2 # MCMP2
F F

View File

@ -1,4 +1,4 @@
# nAt nEla nElb nCore nRyd # nAt nEla nElb nCore nRyd
1 2 2 0 0 1 16 16 0 0
# Znuc x y z # Znuc x y z
Be 0.0 0.0 0.0 X 0.0 0.0 0.0

View File

@ -64,9 +64,9 @@ subroutine G0W0(COHSEX,SOSEX,BSE,TDA,singlet_manifold,triplet_manifold, &
! Compute correlation part of the self-energy ! Compute correlation part of the self-energy
call excitation_density_from_MO(nBas,nC,nO,nR,nS,ERI_MO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) call excitation_density(nBas,nC,nO,nR,nS,ERI_MO_basis,XpY(:,:,ispin),rho(:,:,:,ispin))
if(SOSEX) call excitation_density_SOSEX_from_MO(nBas,nC,nO,nR,nS,ERI_MO_basis,XpY(:,:,ispin),rhox(:,:,:,ispin)) if(SOSEX) call excitation_density_SOSEX(nBas,nC,nO,nR,nS,ERI_MO_basis,XpY(:,:,ispin),rhox(:,:,:,ispin))
call self_energy_correlation_diag(COHSEX,SOSEX,nBas,nC,nO,nV,nR,nS,eHF, & call self_energy_correlation_diag(COHSEX,SOSEX,nBas,nC,nO,nV,nR,nS,eHF, &
Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),EcGM,SigmaC) Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),EcGM,SigmaC)

View File

@ -1,4 +1,4 @@
subroutine excitation_density_SOSEX(nBas,nC,nO,nR,nS,c,G,XpY,rho) subroutine excitation_density_SOSEX(nBas,nC,nO,nR,nS,G,XpY,rho)
! Compute excitation densities ! Compute excitation densities
@ -7,55 +7,25 @@ subroutine excitation_density_SOSEX(nBas,nC,nO,nR,nS,c,G,XpY,rho)
! Input variables ! Input variables
integer,intent(in) :: nBas,nC,nO,nR,nS integer,intent(in) :: nBas,nC,nO,nR,nS
double precision,intent(in) :: c(nBas,nBas),G(nBas,nBas,nBas,nBas),XpY(nS,nS) double precision,intent(in) :: G(nBas,nBas,nBas,nBas),XpY(nS,nS)
! Local variables ! Local variables
double precision,allocatable :: scr(:,:,:) integer :: ia,jb,x,y,j,b
integer :: mu,nu,la,si,ia,jb,x,y,j,b
! Output variables ! Output variables
double precision,intent(out) :: rho(nBas,nBas,nS) double precision,intent(out) :: rho(nBas,nBas,nS)
! Memory allocation
allocate(scr(nBas,nBas,nS))
rho(:,:,:) = 0d0
do nu=1,nBas
do si=1,nBas
do ia=1,nS
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
rho(nu,si,ia) = rho(nu,si,ia) + c(nu,j)*XpY(ia,jb)*c(si,b)
enddo
enddo
enddo
enddo
enddo
scr(:,:,:) = 0d0
do mu=1,nBas
do la=1,nBas
do ia=1,nS
do nu=1,nBas
do si=1,nBas
scr(mu,la,ia) = scr(mu,la,ia) + G(mu,nu,la,si)*rho(nu,si,ia)
enddo
enddo
enddo
enddo
enddo
rho(:,:,:) = 0d0 rho(:,:,:) = 0d0
do ia=1,nS do ia=1,nS
do x=nC+1,nBas-nR do x=nC+1,nBas-nR
do y=nC+1,nBas-nR do y=nC+1,nBas-nR
do mu=1,nBas jb = 0
do la=1,nBas do j=nC+1,nO
rho(x,y,ia) = rho(x,y,ia) + c(mu,x)*scr(mu,la,ia)*c(la,y) do b=nO+1,nBas-nR
jb = jb + 1
rho(x,y,ia) = rho(x,y,ia) + G(x,y,b,j)*XpY(ia,jb)
enddo enddo
enddo enddo
enddo enddo

View File

@ -1,35 +0,0 @@
subroutine excitation_density_SOSEX_from_MO(nBas,nC,nO,nR,nS,G,XpY,rho)
! Compute excitation densities
implicit none
! Input variables
integer,intent(in) :: nBas,nC,nO,nR,nS
double precision,intent(in) :: G(nBas,nBas,nBas,nBas),XpY(nS,nS)
! Local variables
integer :: ia,jb,x,y,j,b
! Output variables
double precision,intent(out) :: rho(nBas,nBas,nS)
rho(:,:,:) = 0d0
do ia=1,nS
do x=nC+1,nBas-nR
do y=nC+1,nBas-nR
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
rho(x,y,ia) = rho(x,y,ia) + G(x,y,b,j)*XpY(ia,jb)
enddo
enddo
enddo
enddo
enddo
end subroutine excitation_density_SOSEX_from_MO

View File

@ -1,35 +0,0 @@
subroutine excitation_density_from_MO(nBas,nC,nO,nR,nS,G,XpY,rho)
! Compute excitation densities
implicit none
! Input variables
integer,intent(in) :: nBas,nC,nO,nR,nS
double precision,intent(in) :: G(nBas,nBas,nBas,nBas),XpY(nS,nS)
! Local variables
integer :: ia,jb,x,y,j,b
! Output variables
double precision,intent(out) :: rho(nBas,nBas,nS)
rho(:,:,:) = 0d0
do ia=1,nS
do x=nC+1,nBas-nR
do y=nC+1,nBas-nR
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
rho(x,y,ia) = rho(x,y,ia) + G(x,j,y,b)*XpY(ia,jb)
enddo
enddo
enddo
enddo
enddo
end subroutine excitation_density_from_MO