From 8ad895ad85fb8eb34831e63e8269101fd62a2ba5 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Loos Date: Tue, 2 Apr 2019 09:59:30 +0200 Subject: [PATCH] cleanup excitation_energy --- examples/molecule.sph | 2 +- input/basis | 46 ++++++++----------- input/methods | 2 +- input/molecule | 4 +- src/QuAcK/G0W0.f90 | 4 +- src/QuAcK/excitation_density.f90 | 2 +- src/QuAcK/excitation_density_SOSEX.f90 | 44 +++--------------- .../excitation_density_SOSEX_from_MO.f90 | 35 -------------- src/QuAcK/excitation_density_from_MO.f90 | 35 -------------- 9 files changed, 32 insertions(+), 142 deletions(-) delete mode 100644 src/QuAcK/excitation_density_SOSEX_from_MO.f90 delete mode 100644 src/QuAcK/excitation_density_from_MO.f90 diff --git a/examples/molecule.sph b/examples/molecule.sph index 9bc4ca6..dcaf52c 100644 --- a/examples/molecule.sph +++ b/examples/molecule.sph @@ -1,4 +1,4 @@ # nAt nEla nElb nCore nRyd - 1 1 1 0 0 + 1 16 16 0 0 # Znuc x y z X 0.0 0.0 0.0 diff --git a/input/basis b/input/basis index e220e53..8ffe42c 100644 --- a/input/basis +++ b/input/basis @@ -1,29 +1,19 @@ -1 6 -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 +1 9 S 1 1.00 - 0.0589000 1.0000000 -P 3 1.00 - 3.6190000 0.0291110 - 0.7110000 0.1693650 - 0.1951000 0.5134580 -P 1 1.00 - 0.0601800 1.0000000 -D 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 +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 diff --git a/input/methods b/input/methods index aaae8e8..40fd2a7 100644 --- a/input/methods +++ b/input/methods @@ -9,6 +9,6 @@ # GF2 GF3 F F # G0W0 evGW qsGW - T T T + T T F # MCMP2 F diff --git a/input/molecule b/input/molecule index 6a6f6d1..dcaf52c 100644 --- a/input/molecule +++ b/input/molecule @@ -1,4 +1,4 @@ # nAt nEla nElb nCore nRyd - 1 2 2 0 0 + 1 16 16 0 0 # Znuc x y z - Be 0.0 0.0 0.0 + X 0.0 0.0 0.0 diff --git a/src/QuAcK/G0W0.f90 b/src/QuAcK/G0W0.f90 index c2851dd..593886d 100644 --- a/src/QuAcK/G0W0.f90 +++ b/src/QuAcK/G0W0.f90 @@ -64,9 +64,9 @@ subroutine G0W0(COHSEX,SOSEX,BSE,TDA,singlet_manifold,triplet_manifold, & ! 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, & Omega(:,ispin),rho(:,:,:,ispin),rhox(:,:,:,ispin),EcGM,SigmaC) diff --git a/src/QuAcK/excitation_density.f90 b/src/QuAcK/excitation_density.f90 index c249d57..abd0bc2 100644 --- a/src/QuAcK/excitation_density.f90 +++ b/src/QuAcK/excitation_density.f90 @@ -28,7 +28,7 @@ subroutine excitation_density(nBas,nC,nO,nR,nS,c,ERI,XpY,rho) do j=nC+1,nO do b=nO+1,nBas-nR jb = jb + 1 - rho(x,y,ia) = rho(x,y,ia) + ERI(x,j,y,b)*XpY(ia,jb) + rho(x,y,ia) = rho(x,y,ia) + ERI(x,j,y,b)*XpY(ia,jb) enddo enddo enddo diff --git a/src/QuAcK/excitation_density_SOSEX.f90 b/src/QuAcK/excitation_density_SOSEX.f90 index 53c9a66..6d78f48 100644 --- a/src/QuAcK/excitation_density_SOSEX.f90 +++ b/src/QuAcK/excitation_density_SOSEX.f90 @@ -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 @@ -7,55 +7,25 @@ subroutine excitation_density_SOSEX(nBas,nC,nO,nR,nS,c,G,XpY,rho) ! Input variables 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 - double precision,allocatable :: scr(:,:,:) - integer :: mu,nu,la,si,ia,jb,x,y,j,b + integer :: ia,jb,x,y,j,b ! Output variables 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 + 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(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 - do ia=1,nS - do x=nC+1,nBas-nR - do y=nC+1,nBas-nR - do mu=1,nBas - do la=1,nBas - rho(x,y,ia) = rho(x,y,ia) + c(mu,x)*scr(mu,la,ia)*c(la,y) + rho(x,y,ia) = rho(x,y,ia) + G(x,y,b,j)*XpY(ia,jb) enddo enddo enddo diff --git a/src/QuAcK/excitation_density_SOSEX_from_MO.f90 b/src/QuAcK/excitation_density_SOSEX_from_MO.f90 deleted file mode 100644 index 0127887..0000000 --- a/src/QuAcK/excitation_density_SOSEX_from_MO.f90 +++ /dev/null @@ -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 diff --git a/src/QuAcK/excitation_density_from_MO.f90 b/src/QuAcK/excitation_density_from_MO.f90 deleted file mode 100644 index ec5d854..0000000 --- a/src/QuAcK/excitation_density_from_MO.f90 +++ /dev/null @@ -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