From 8a8e4a939c15d824a43352fc04b449d2eefa4a38 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Loos Date: Mon, 1 Apr 2019 16:32:55 +0200 Subject: [PATCH] excitation energy --- input/basis | 100 +++++++++---------------------- input/molecule | 4 +- input/weight | 60 ++++++++----------- src/QuAcK/G0W0.f90 | 2 +- src/QuAcK/evGW.f90 | 6 +- src/QuAcK/excitation_density.f90 | 45 +++----------- src/QuAcK/qsGW.f90 | 6 +- 7 files changed, 71 insertions(+), 152 deletions(-) diff --git a/input/basis b/input/basis index 1eb213c..e220e53 100644 --- a/input/basis +++ b/input/basis @@ -1,73 +1,29 @@ -1 36 +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 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 -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 -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 -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 -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 + 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 diff --git a/input/molecule b/input/molecule index 9bc4ca6..6a6f6d1 100644 --- a/input/molecule +++ b/input/molecule @@ -1,4 +1,4 @@ # nAt nEla nElb nCore nRyd - 1 1 1 0 0 + 1 2 2 0 0 # Znuc x y z - X 0.0 0.0 0.0 + Be 0.0 0.0 0.0 diff --git a/input/weight b/input/weight index 35be48a..e220e53 100644 --- a/input/weight +++ b/input/weight @@ -1,39 +1,29 @@ -1 10 -S 9 1.00 - 6863.0000000 0.0002360 - 1030.0000000 0.0018260 - 234.7000000 0.0094520 - 66.5600000 0.0379570 - 21.6900000 0.1199650 - 7.7340000 0.2821620 - 2.9160000 0.4274040 - 1.1300000 0.2662780 - 0.1101000 -0.0072750 -S 9 1.00 - 6863.0000000 -0.0000430 - 1030.0000000 -0.0003330 - 234.7000000 -0.0017360 - 66.5600000 -0.0070120 - 21.6900000 -0.0231260 - 7.7340000 -0.0581380 - 2.9160000 -0.1145560 - 1.1300000 -0.1359080 - 0.1101000 0.5774410 +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 S 1 1.00 - 0.2577000 1.0000000 -S 1 1.00 - 0.0440900 1.0000000 + 0.0589000 1.0000000 P 3 1.00 - 7.4360000 0.0107360 - 1.5770000 0.0628540 - 0.4352000 0.2481800 + 3.6190000 0.0291110 + 0.7110000 0.1693650 + 0.1951000 0.5134580 P 1 1.00 - 0.1438000 1.0000000 -P 1 1.00 - 0.0499400 1.0000000 + 0.0601800 1.0000000 D 1 1.00 - 0.3480000 1.0000000 -D 1 1.00 - 0.1803000 1.0000000 -F 1 1.00 - 0.3250000 1.0000000 + 0.2380000 1.0000000 diff --git a/src/QuAcK/G0W0.f90 b/src/QuAcK/G0W0.f90 index 101432f..c2851dd 100644 --- a/src/QuAcK/G0W0.f90 +++ b/src/QuAcK/G0W0.f90 @@ -118,7 +118,7 @@ subroutine G0W0(COHSEX,SOSEX,BSE,TDA,singlet_manifold,triplet_manifold, & ispin = 2 call linear_response(ispin,dRPA,TDA,.false.,nBas,nC,nO,nV,nR,nS,eHF,ERI_MO_basis, & rho(:,:,:,ispin),EcRPA,Omega(:,ispin),XpY(:,:,ispin)) - call excitation_density(nBas,nC,nO,nR,nS,cHF,ERI_AO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) + call excitation_density(nBas,nC,nO,nR,nS,cHF,ERI_MO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) call linear_response(ispin,dRPA,TDA,BSE,nBas,nC,nO,nV,nR,nS,eG0W0,ERI_MO_basis, & rho(:,:,:,1),EcRPA,Omega(:,ispin),XpY(:,:,ispin)) diff --git a/src/QuAcK/evGW.f90 b/src/QuAcK/evGW.f90 index c7e8ac5..7d7c8e0 100644 --- a/src/QuAcK/evGW.f90 +++ b/src/QuAcK/evGW.f90 @@ -90,9 +90,9 @@ subroutine evGW(maxSCF,thresh,max_diis,COHSEX,SOSEX,BSE,TDA,G0W,GW0,singlet_mani ! Compute correlation part of the self-energy - call excitation_density(nBas,nC,nO,nR,nS,cHF,ERI_AO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) + call excitation_density(nBas,nC,nO,nR,nS,cHF,ERI_MO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) - if(SOSEX) call excitation_density_SOSEX(nBas,nC,nO,nR,nS,cHF,ERI_AO_basis,XpY(:,:,ispin),rhox(:,:,:,ispin)) + if(SOSEX) call excitation_density_SOSEX(nBas,nC,nO,nR,nS,cHF,ERI_MO_basis,XpY(:,:,ispin),rhox(:,:,:,ispin)) ! Correlation self-energy @@ -199,7 +199,7 @@ subroutine evGW(maxSCF,thresh,max_diis,COHSEX,SOSEX,BSE,TDA,G0W,GW0,singlet_mani ispin = 2 call linear_response(ispin,dRPA,TDA,.false.,nBas,nC,nO,nV,nR,nS,eGW,ERI_MO_basis, & rho(:,:,:,ispin),EcRPA,Omega(:,ispin),XpY(:,:,ispin)) - call excitation_density(nBas,nC,nO,nR,nS,cHF,ERI_AO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) + call excitation_density(nBas,nC,nO,nR,nS,cHF,ERI_MO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) call linear_response(ispin,dRPA,TDA,BSE,nBas,nC,nO,nV,nR,nS,eGW,ERI_MO_basis, & rho(:,:,:,ispin),EcRPA,Omega(:,ispin),XpY(:,:,ispin)) diff --git a/src/QuAcK/excitation_density.f90 b/src/QuAcK/excitation_density.f90 index db8f222..c249d57 100644 --- a/src/QuAcK/excitation_density.f90 +++ b/src/QuAcK/excitation_density.f90 @@ -1,4 +1,4 @@ -subroutine excitation_density(nBas,nC,nO,nR,nS,c,G,XpY,rho) +subroutine excitation_density(nBas,nC,nO,nR,nS,c,ERI,XpY,rho) ! Compute excitation densities @@ -7,55 +7,28 @@ subroutine excitation_density(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) :: c(nBas,nBas) + double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas) + double precision,intent(in) :: 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 - rho(:,:,:) = 0d0 - do nu=1,nBas - do si=1,nBas + do x=nC+1,nBas-nR + do y=nC+1,nBas-nR 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 - 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) + ERI(x,j,y,b)*XpY(ia,jb) enddo enddo enddo diff --git a/src/QuAcK/qsGW.f90 b/src/QuAcK/qsGW.f90 index 87da073..56045a7 100644 --- a/src/QuAcK/qsGW.f90 +++ b/src/QuAcK/qsGW.f90 @@ -101,8 +101,8 @@ subroutine qsGW(maxSCF,thresh,max_diis,COHSEX,SOSEX,BSE,TDA,G0W,GW0,singlet_mani ! Compute correlation part of the self-energy - call excitation_density(nBas,nC,nO,nR,nS,c,ERI_AO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) - if(SOSEX) call excitation_density_SOSEX(nBas,nC,nO,nR,nS,c,ERI_AO_basis,XpY(:,:,ispin),rhox(:,:,:,ispin)) + call excitation_density(nBas,nC,nO,nR,nS,c,ERI_MO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) + if(SOSEX) call excitation_density_SOSEX(nBas,nC,nO,nR,nS,c,ERI_MO_basis,XpY(:,:,ispin),rhox(:,:,:,ispin)) if(G0W) then @@ -214,7 +214,7 @@ subroutine qsGW(maxSCF,thresh,max_diis,COHSEX,SOSEX,BSE,TDA,G0W,GW0,singlet_mani ispin = 2 call linear_response(ispin,dRPA,TDA,.false.,nBas,nC,nO,nV,nR,nS,e,ERI_MO_basis, & rho(:,:,:,ispin),EcRPA,Omega(:,ispin),XpY(:,:,ispin)) - call excitation_density(nBas,nC,nO,nR,nS,c,ERI_AO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) + call excitation_density(nBas,nC,nO,nR,nS,c,ERI_MO_basis,XpY(:,:,ispin),rho(:,:,:,ispin)) call linear_response(ispin,dRPA,TDA,BSE,nBas,nC,nO,nV,nR,nS,e,ERI_MO_basis, & rho(:,:,:,ispin),EcRPA,Omega(:,ispin),XpY(:,:,ispin))