mirror of
https://github.com/pfloos/quack
synced 2024-11-07 06:33:55 +01:00
fix problem with individual energies
This commit is contained in:
parent
cd781a1e11
commit
91a0120eee
20
input/dft
20
input/dft
@ -1,25 +1,25 @@
|
|||||||
# Restricted or unrestricted KS calculation
|
# Restricted or unrestricted KS calculation
|
||||||
eDFT-UKS
|
eDFT-UKS
|
||||||
# exchange rung:
|
# exchange rung:
|
||||||
# Hartree = 0
|
# Hartree = 0: H
|
||||||
# LDA = 1: RS51,RMFL20
|
# LDA = 1: S51,CC
|
||||||
# GGA = 2: RB88
|
# GGA = 2: B88
|
||||||
# Hybrid = 4
|
# Hybrid = 4:
|
||||||
# Hartree-Fock = 666
|
# Hartree-Fock = 666: HF
|
||||||
666 HF
|
1 S51
|
||||||
# correlation rung:
|
# correlation rung:
|
||||||
# Hartree = 0
|
# Hartree = 0: H
|
||||||
# LDA = 1: RVWN5,RMFL20
|
# LDA = 1: VWN5,MFL20
|
||||||
# GGA = 2:
|
# GGA = 2:
|
||||||
# Hybrid = 4:
|
# Hybrid = 4:
|
||||||
# Hartree-Fock = 666
|
# Hartree-Fock = 666: HF
|
||||||
0 H
|
0 H
|
||||||
# quadrature grid SG-n
|
# quadrature grid SG-n
|
||||||
1
|
1
|
||||||
# Number of states in ensemble (nEns)
|
# Number of states in ensemble (nEns)
|
||||||
3
|
3
|
||||||
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
||||||
0.0 0.0
|
0.000000 0.0
|
||||||
# Parameters for CC weight-dependent exchange functional
|
# Parameters for CC weight-dependent exchange functional
|
||||||
0.000000 0.0000000 0.000000
|
0.000000 0.0000000 0.000000
|
||||||
0.000000 0.0000000 0.0000000
|
0.000000 0.0000000 0.0000000
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# Debuggin mode?
|
# Debuggin mode?
|
||||||
F
|
F
|
||||||
# Chemist notation for two-electron integral?
|
# Chemist notation for two-electron integral?
|
||||||
F
|
T
|
||||||
# Exposant of the Slater geminal
|
# Exposant of the Slater geminal
|
||||||
0.5
|
1.0
|
||||||
# One-electron integrals: Ov Kin Nuc
|
# One-electron integrals: Ov Kin Nuc
|
||||||
T T T
|
T T T
|
||||||
# Two-electron integrals: ERI F12 Yuk Erf
|
# Two-electron integrals: ERI F12 Yuk Erf
|
||||||
T F F T
|
T F F F
|
||||||
# Three-electron integrals: Type1 Type2 Type3
|
# Three-electron integrals: Type1 Type2 Type3
|
||||||
F F F
|
F F F
|
||||||
# Four-electron integrals: Type1 Type2 Type3
|
# Four-electron integrals: Type1 Type2 Type3
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# GF: maxSCF thresh DIIS n_diis lin eta renorm
|
# GF: maxSCF thresh DIIS n_diis lin eta renorm
|
||||||
256 0.00001 T 5 T 0.00367493 3
|
256 0.00001 T 5 T 0.00367493 3
|
||||||
# GW/GT: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0
|
# GW/GT: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0
|
||||||
256 0.00001 T 5 T 0.00367493 F F T F F
|
256 0.00001 T 5 T 0.00367493 F F F F F
|
||||||
# ACFDT: AC Kx XBS
|
# ACFDT: AC Kx XBS
|
||||||
F F T
|
F F T
|
||||||
# BSE: BSE dBSE dTDA evDyn
|
# BSE: BSE dBSE dTDA evDyn
|
||||||
|
@ -104,6 +104,8 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA,
|
|||||||
call linear_response(ispin,.true.,TDA_W,.false.,eta,nBas,nC,nO,nV,nR,nS,1d0,eHF,ERI, &
|
call linear_response(ispin,.true.,TDA_W,.false.,eta,nBas,nC,nO,nV,nR,nS,1d0,eHF,ERI, &
|
||||||
rho(:,:,:,ispin),EcRPA(ispin),Omega(:,ispin),XpY(:,:,ispin),XmY(:,:,ispin))
|
rho(:,:,:,ispin),EcRPA(ispin),Omega(:,ispin),XpY(:,:,ispin),XmY(:,:,ispin))
|
||||||
|
|
||||||
|
if(print_W) call print_excitation('RPA@HF ',ispin,nS,Omega(:,ispin))
|
||||||
|
|
||||||
! Compute correlation part of the self-energy
|
! Compute correlation part of the self-energy
|
||||||
|
|
||||||
call excitation_density(nBas,nC,nO,nR,nS,ERI,XpY(:,:,ispin),rho(:,:,:,ispin))
|
call excitation_density(nBas,nC,nO,nR,nS,ERI,XpY(:,:,ispin),rho(:,:,:,ispin))
|
||||||
@ -143,8 +145,6 @@ subroutine G0W0(doACFDT,exchange_kernel,doXBS,COHSEX,SOSEX,BSE,TDA_W,TDA,
|
|||||||
|
|
||||||
! Dump results
|
! Dump results
|
||||||
|
|
||||||
if(print_W) call print_excitation('RPA@G0W0 ',ispin,nS,Omega(:,ispin))
|
|
||||||
|
|
||||||
call print_G0W0(nBas,nO,eHF,ENuc,ERHF,SigC,Z,eGW,EcRPA(ispin),EcGM)
|
call print_G0W0(nBas,nO,eHF,ENuc,ERHF,SigC,Z,eGW,EcRPA(ispin),EcGM)
|
||||||
|
|
||||||
! Compute the RPA correlation energy
|
! Compute the RPA correlation energy
|
||||||
|
@ -86,11 +86,18 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
r = max(0d0,rhow(iG))
|
r = max(0d0,rhow(iG))
|
||||||
rI = max(0d0,rho(iG))
|
rI = max(0d0,rho(iG))
|
||||||
|
|
||||||
if(r > threshold .and. rI > threshold) then
|
if(r > threshold) then
|
||||||
|
|
||||||
e_p = Cx*r**(1d0/3d0)
|
e_p = Cx*r**(1d0/3d0)
|
||||||
dedr = 1d0/3d0*Cx*r**(-2d0/3d0)
|
dedr = 1d0/3d0*Cx*r**(-2d0/3d0)
|
||||||
Ex = Ex + weight(iG)*(e_p*rI + dedr*r*rI - dedr*r*r)
|
|
||||||
|
Ex = Ex - weight(iG)*dedr*r*r
|
||||||
|
|
||||||
|
if(rI > threshold) then
|
||||||
|
|
||||||
|
Ex = Ex + weight(iG)*(e_p*rI + dedr*r*rI)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ subroutine UVWN5_lda_correlation_individual_energy(nGrid,weight,rhow,rho,Ec)
|
|||||||
|
|
||||||
! spin-up contribution
|
! spin-up contribution
|
||||||
|
|
||||||
if(ra > threshold .and. raI > threshold) then
|
if(ra > threshold .or. raI > threshold) then
|
||||||
|
|
||||||
r = ra + rb
|
r = ra + rb
|
||||||
rI = raI + rbI
|
rI = raI + rbI
|
||||||
@ -131,7 +131,7 @@ subroutine UVWN5_lda_correlation_individual_energy(nGrid,weight,rhow,rho,Ec)
|
|||||||
|
|
||||||
! spin-down contribution
|
! spin-down contribution
|
||||||
|
|
||||||
if(rb > threshold .and. rbI > threshold) then
|
if(rb > threshold .or. rbI > threshold) then
|
||||||
|
|
||||||
r = ra + rb
|
r = ra + rb
|
||||||
rI = raI + rbI
|
rI = raI + rbI
|
||||||
|
@ -17,18 +17,31 @@ subroutine print_UKS(nBas,nO,eps,c,ENuc,ET,EV,EJ,Ex,Ec,Ew)
|
|||||||
double precision,intent(in) :: Ec(nsp)
|
double precision,intent(in) :: Ec(nsp)
|
||||||
double precision,intent(in) :: Ew
|
double precision,intent(in) :: Ew
|
||||||
|
|
||||||
|
integer :: ispin
|
||||||
integer :: HOMO(nspin)
|
integer :: HOMO(nspin)
|
||||||
integer :: LUMO(nspin)
|
integer :: LUMO(nspin)
|
||||||
double precision :: Gap(nspin)
|
double precision :: Gap(nspin)
|
||||||
|
|
||||||
! HOMO and LUMO
|
! HOMO and LUMO
|
||||||
|
|
||||||
HOMO(:) = nO(:)
|
|
||||||
|
|
||||||
LUMO(:) = HOMO(:) + 1
|
do ispin=1,nspin
|
||||||
|
|
||||||
Gap(1) = eps(LUMO(1),1) - eps(HOMO(1),1)
|
if(nO(ispin) > 0) then
|
||||||
Gap(2) = eps(LUMO(2),2) - eps(HOMO(2),2)
|
|
||||||
|
HOMO(ispin) = nO(ispin)
|
||||||
|
LUMO(ispin) = HOMO(ispin) + 1
|
||||||
|
Gap(ispin) = eps(LUMO(ispin),ispin) - eps(HOMO(ispin),ispin)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
HOMO(ispin) = 0
|
||||||
|
LUMO(ispin) = 0
|
||||||
|
Gap(ispin) = 0d0
|
||||||
|
|
||||||
|
end if
|
||||||
|
|
||||||
|
end do
|
||||||
|
|
||||||
! Dump results
|
! Dump results
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ subroutine print_unrestricted_individual_energy(nEns,ENuc,Ew,ET,EV,EJ,Ex,Ec,Exc,
|
|||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
write(*,'(A60)') ' IP and EA FROM AUXILIARY ENERGIES '
|
write(*,'(A60)') ' IP AND EA FROM AUXILIARY ENERGIES '
|
||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
|
|
||||||
write(*,'(A43,F16.10,A4)') ' Ionization Potential 1 -> 2:',Omaux(2)+OmxcDD(2),' au'
|
write(*,'(A43,F16.10,A4)') ' Ionization Potential 1 -> 2:',Omaux(2)+OmxcDD(2),' au'
|
||||||
|
Loading…
Reference in New Issue
Block a user