mirror of
https://github.com/pfloos/quack
synced 2024-12-22 20:35:36 +01:00
curvature corrected functional revisited
This commit is contained in:
parent
c379b80eac
commit
aadf942f83
@ -2,6 +2,7 @@
|
|||||||
integer,parameter :: nspin = 2
|
integer,parameter :: nspin = 2
|
||||||
integer,parameter :: nsp = 3
|
integer,parameter :: nsp = 3
|
||||||
integer,parameter :: maxEns = 4
|
integer,parameter :: maxEns = 4
|
||||||
|
integer,parameter :: maxCC = 5
|
||||||
integer,parameter :: maxShell = 512
|
integer,parameter :: maxShell = 512
|
||||||
integer,parameter :: maxL = 7
|
integer,parameter :: maxL = 7
|
||||||
integer,parameter :: n1eInt = 3
|
integer,parameter :: n1eInt = 3
|
||||||
|
10
input/dft
10
input/dft
@ -6,18 +6,18 @@
|
|||||||
# GGA = 2: B88,G96,PBE
|
# GGA = 2: B88,G96,PBE
|
||||||
# MGGA = 3:
|
# MGGA = 3:
|
||||||
# Hybrid = 4: HF,B3LYP,PBE
|
# Hybrid = 4: HF,B3LYP,PBE
|
||||||
4 HF
|
1 S51
|
||||||
# correlation rung:
|
# correlation rung:
|
||||||
# Hartree = 0: H
|
# Hartree = 0: H
|
||||||
# LDA = 1: PW92,VWN3,VWN5,eVWN5
|
# LDA = 1: PW92,VWN3,VWN5,eVWN5
|
||||||
# GGA = 2: LYP,PBE
|
# GGA = 2: LYP,PBE
|
||||||
# MGGA = 3:
|
# MGGA = 3:
|
||||||
# Hybrid = 4: HF,B3LYP,PBE
|
# Hybrid = 4: HF,B3LYP,PBE
|
||||||
4 HF
|
1 VWN5
|
||||||
# quadrature grid SG-n
|
# quadrature grid SG-n
|
||||||
0
|
0
|
||||||
# Number of states in ensemble (nEns)
|
# Number of states in ensemble (nEns)
|
||||||
4
|
2
|
||||||
# occupation numbers
|
# occupation numbers
|
||||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
@ -31,11 +31,11 @@
|
|||||||
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
||||||
0.00 0.00 1.00
|
0.95 0.00 0.00
|
||||||
# N-centered?
|
# N-centered?
|
||||||
F
|
F
|
||||||
# Parameters for CC weight-dependent exchange functional
|
# Parameters for CC weight-dependent exchange functional
|
||||||
0.0 0.0 0.0
|
3
|
||||||
0.0 0.0 0.0
|
0.0 0.0 0.0
|
||||||
# choice of UCC exchange coefficient : 1 for Cx1, 2 for Cx2, 3 for Cx1*Cx2
|
# choice of UCC exchange coefficient : 1 for Cx1, 2 for Cx2, 3 for Cx1*Cx2
|
||||||
2
|
2
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# RHF UHF KS MOM
|
# RHF UHF KS MOM
|
||||||
T F F F
|
F F T F
|
||||||
# MP2* MP3 MP2-F12
|
# MP2* MP3 MP2-F12
|
||||||
F F F
|
F F F
|
||||||
# CCD pCCD DCD CCSD CCSD(T)
|
# CCD pCCD DCD CCSD CCSD(T)
|
||||||
@ -9,7 +9,7 @@
|
|||||||
# CIS* CIS(D) CID CISD FCI
|
# CIS* CIS(D) CID CISD FCI
|
||||||
F F F F F
|
F F F F F
|
||||||
# RPA* RPAx* crRPA ppRPA
|
# RPA* RPAx* crRPA ppRPA
|
||||||
F F F T
|
F F F F
|
||||||
# G0F2* evGF2* qsGF2* G0F3 evGF3
|
# G0F2* evGF2* qsGF2* G0F3 evGF3
|
||||||
F F F F F
|
F F F F F
|
||||||
# G0W0* evGW* qsGW* ufG0W0 ufGW
|
# G0W0* evGW* qsGW* ufG0W0 ufGW
|
||||||
|
@ -3,16 +3,16 @@
|
|||||||
# MP:
|
# MP:
|
||||||
|
|
||||||
# CC: maxSCF thresh DIIS n_diis
|
# CC: maxSCF thresh DIIS n_diis
|
||||||
64 0.0000000001 T 5
|
64 0.0000001 T 5
|
||||||
# spin: TDA singlet triplet spin_conserved spin_flip
|
# spin: TDA singlet triplet spin_conserved spin_flip
|
||||||
F T T T T
|
F T T T T
|
||||||
# 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 F F F
|
256 0.00001 T 5 T 0.00 F F F F F
|
||||||
# ACFDT: AC Kx XBS
|
# ACFDT: AC Kx XBS
|
||||||
T T F
|
F T F
|
||||||
# BSE: BSE dBSE dTDA evDyn
|
# BSE: BSE dBSE dTDA evDyn
|
||||||
T F T F
|
T T T F
|
||||||
# MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift
|
# MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift
|
||||||
1000000 100000 10 0.3 10000 1234 T
|
1000000 100000 10 0.3 10000 1234 T
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
2
|
2
|
||||||
|
|
||||||
H 0. 0. 0.
|
H 0. 0. 0.
|
||||||
H 0. 0. 2.000000
|
H 0. 0. 3.2
|
||||||
|
@ -198,6 +198,9 @@ subroutine G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_T,TDA,dBSE,dTDA,evDyn,sing
|
|||||||
|
|
||||||
if(BSE) then
|
if(BSE) then
|
||||||
|
|
||||||
|
! eG0T0(1) = -0.5507952119d0
|
||||||
|
! eG0T0(2) = +1.540259769d0
|
||||||
|
|
||||||
call Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,nOOt,nVVt, &
|
call Bethe_Salpeter_Tmatrix(TDA_T,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,nOOt,nVVt, &
|
||||||
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,rho1s,rho2s,Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,rho1t,rho2t, &
|
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,rho1s,rho2s,Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,rho1t,rho2t, &
|
||||||
ERI_MO,dipole_int,eHF,eG0T0,EcBSE)
|
ERI_MO,dipole_int,eHF,eG0T0,EcBSE)
|
||||||
|
@ -62,10 +62,10 @@ subroutine dynamic_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,eGT,Omega1,O
|
|||||||
end do
|
end do
|
||||||
|
|
||||||
do kl=1,nOO
|
do kl=1,nOO
|
||||||
chi = chi - rho2(i,j,kl)*rho2(a,b,kl)*Omega2(kl)/(Omega2(kl)**2 + eta**2)
|
chi = chi + rho2(i,j,kl)*rho2(a,b,kl)*Omega2(kl)/(Omega2(kl)**2 + eta**2)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
A_dyn(ia,jb) = A_dyn(ia,jb) - 1d0*lambda*chi
|
A_dyn(ia,jb) = A_dyn(ia,jb) + 1d0*lambda*chi
|
||||||
|
|
||||||
chi = 0d0
|
chi = 0d0
|
||||||
|
|
||||||
@ -75,11 +75,11 @@ subroutine dynamic_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,eGT,Omega1,O
|
|||||||
end do
|
end do
|
||||||
|
|
||||||
do kl=1,nOO
|
do kl=1,nOO
|
||||||
eps = + OmBSE + Omega2(kl) - (eGT(a) + eGT(b))
|
eps = + OmBSE - Omega2(kl) - (eGT(a) + eGT(b))
|
||||||
chi = chi - rho2(i,j,kl)*rho2(a,b,kl)*eps/(eps**2 + eta**2)
|
chi = chi + rho2(i,j,kl)*rho2(a,b,kl)*eps/(eps**2 + eta**2)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
A_dyn(ia,jb) = A_dyn(ia,jb) + 1d0*lambda*chi
|
A_dyn(ia,jb) = A_dyn(ia,jb) - 1d0*lambda*chi
|
||||||
|
|
||||||
chi = 0d0
|
chi = 0d0
|
||||||
|
|
||||||
@ -89,11 +89,11 @@ subroutine dynamic_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,eGT,Omega1,O
|
|||||||
end do
|
end do
|
||||||
|
|
||||||
do kl=1,nOO
|
do kl=1,nOO
|
||||||
eps = + OmBSE - Omega2(kl) - (eGT(a) + eGT(b))
|
eps = + OmBSE + Omega2(kl) - (eGT(a) + eGT(b))
|
||||||
chi = chi + rho2(i,j,kl)*rho2(a,b,kl)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
chi = chi + rho2(i,j,kl)*rho2(a,b,kl)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
||||||
end do
|
end do
|
||||||
|
|
||||||
ZA_dyn(ia,jb) = ZA_dyn(ia,jb) - 1d0*lambda*chi
|
ZA_dyn(ia,jb) = ZA_dyn(ia,jb) + 1d0*lambda*chi
|
||||||
|
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
@ -49,11 +49,11 @@ subroutine static_Tmatrix_TA(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,ERI,Omega1,r
|
|||||||
enddo
|
enddo
|
||||||
|
|
||||||
do kl=1,nOO
|
do kl=1,nOO
|
||||||
! chi = chi - lambda*rho2(i,j,kl)*rho2(a,b,kl)*Omega2(kl)/(Omega2(kl)**2 + eta**2)
|
! chi = chi + lambda*rho2(i,j,kl)*rho2(a,b,kl)*Omega2(kl)/(Omega2(kl)**2 + eta**2)
|
||||||
chi = chi + rho2(i,j,kl)*rho2(a,b,kl)*Omega2(kl)/(Omega2(kl)**2 + eta**2)
|
chi = chi + rho2(i,j,kl)*rho2(a,b,kl)*Omega2(kl)/(Omega2(kl)**2 + eta**2)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
TA(ia,jb) = TA(ia,jb) + 1d0*lambda*chi
|
TA(ia,jb) = TA(ia,jb) - 1d0*lambda*chi
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
@ -53,7 +53,7 @@ subroutine static_Tmatrix_TB(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,ERI,Omega1,r
|
|||||||
chi = chi + rho2(i,b,kl)*rho2(a,j,kl)*Omega2(kl)/Omega2(kl)**2 + eta**2
|
chi = chi + rho2(i,b,kl)*rho2(a,j,kl)*Omega2(kl)/Omega2(kl)**2 + eta**2
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
TB(ia,jb) = TB(ia,jb) + 1d0*lambda*chi
|
TB(ia,jb) = TB(ia,jb) - 1d0*lambda*chi
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
@ -64,11 +64,8 @@ subroutine ACFDT_Tmatrix(exchange_kernel,doXBS,dRPA,TDA_T,TDA,BSE,singlet,triple
|
|||||||
|
|
||||||
! Useful quantities
|
! Useful quantities
|
||||||
|
|
||||||
! nOOs = nO*nO
|
nOOs = nO*nO
|
||||||
! nVVs = nV*nV
|
nVVs = nV*nV
|
||||||
|
|
||||||
nOOs = nO*(nO+1)/2
|
|
||||||
nVVs = nV*(nV+1)/2
|
|
||||||
|
|
||||||
nOOt = nO*(nO-1)/2
|
nOOt = nO*(nO-1)/2
|
||||||
nVVt = nV*(nV-1)/2
|
nVVt = nV*(nV-1)/2
|
||||||
@ -121,31 +118,31 @@ subroutine ACFDT_Tmatrix(exchange_kernel,doXBS,dRPA,TDA_T,TDA,BSE,singlet,triple
|
|||||||
TA(:,:) = 0d0
|
TA(:,:) = 0d0
|
||||||
TB(:,:) = 0d0
|
TB(:,:) = 0d0
|
||||||
|
|
||||||
! if(doXBS) then
|
if(doXBS) then
|
||||||
|
|
||||||
! isp_T = 1
|
isp_T = 1
|
||||||
! iblock = 3
|
iblock = 3
|
||||||
|
|
||||||
! call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOs,nVVs,lambda,eT,ERI, &
|
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOs,nVVs,lambda,eT,ERI, &
|
||||||
! Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(isp_T))
|
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(isp_T))
|
||||||
|
|
||||||
! call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI,X1s,Y1s,rho1s,X2s,Y2s,rho2s)
|
call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI,X1s,Y1s,rho1s,X2s,Y2s,rho2s)
|
||||||
|
|
||||||
! call static_Tmatrix_TA(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,lambda,ERI,Omega1s,rho1s,Omega2s,rho2s,TA)
|
call static_Tmatrix_TA(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,lambda,ERI,Omega1s,rho1s,Omega2s,rho2s,TA)
|
||||||
! if(.not.TDA) call static_Tmatrix_TB(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,lambda,ERI,Omega1s,rho1s,Omega2s,rho2s,TB)
|
if(.not.TDA) call static_Tmatrix_TB(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,lambda,ERI,Omega1s,rho1s,Omega2s,rho2s,TB)
|
||||||
|
|
||||||
! isp_T = 2
|
isp_T = 2
|
||||||
! iblock = 4
|
iblock = 4
|
||||||
|
|
||||||
! call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOt,nVVt,lambda,eT,ERI, &
|
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOt,nVVt,lambda,eT,ERI, &
|
||||||
! Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(isp_T))
|
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(isp_T))
|
||||||
|
|
||||||
! call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI,X1t,Y1t,rho1t,X2t,Y2t,rho2t)
|
call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI,X1t,Y1t,rho1t,X2t,Y2t,rho2t)
|
||||||
|
|
||||||
! call static_Tmatrix_TA(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,lambda,ERI,Omega1t,rho1t,Omega2t,rho2t,TA)
|
call static_Tmatrix_TA(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,lambda,ERI,Omega1t,rho1t,Omega2t,rho2t,TA)
|
||||||
! if(.not.TDA) call static_Tmatrix_TB(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,lambda,ERI,Omega1t,rho1t,Omega2t,rho2t,TB)
|
if(.not.TDA) call static_Tmatrix_TB(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,lambda,ERI,Omega1t,rho1t,Omega2t,rho2t,TB)
|
||||||
|
|
||||||
! end if
|
end if
|
||||||
|
|
||||||
call linear_response_Tmatrix(ispin,.false.,TDA,eta,nBas,nC,nO,nV,nR,nS,lambda,eGT,ERI,TA,TB, &
|
call linear_response_Tmatrix(ispin,.false.,TDA,eta,nBas,nC,nO,nV,nR,nS,lambda,eGT,ERI,TA,TB, &
|
||||||
EcAC(ispin),Omega(:,ispin),XpY(:,:,ispin),XmY(:,:,ispin))
|
EcAC(ispin),Omega(:,ispin),XpY(:,:,ispin),XmY(:,:,ispin))
|
||||||
@ -191,31 +188,31 @@ subroutine ACFDT_Tmatrix(exchange_kernel,doXBS,dRPA,TDA_T,TDA,BSE,singlet,triple
|
|||||||
TA(:,:) = 0d0
|
TA(:,:) = 0d0
|
||||||
TB(:,:) = 0d0
|
TB(:,:) = 0d0
|
||||||
|
|
||||||
! if(doXBS) then
|
if(doXBS) then
|
||||||
|
|
||||||
! isp_T = 1
|
isp_T = 1
|
||||||
! iblock = 3
|
iblock = 3
|
||||||
|
|
||||||
! call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOs,nVVs,lambda,eT,ERI, &
|
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOs,nVVs,lambda,eT,ERI, &
|
||||||
! Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(isp_T))
|
Omega1s,X1s,Y1s,Omega2s,X2s,Y2s,EcRPA(isp_T))
|
||||||
|
|
||||||
! call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI,X1s,Y1s,rho1s,X2s,Y2s,rho2s)
|
call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOs,nVVs,ERI,X1s,Y1s,rho1s,X2s,Y2s,rho2s)
|
||||||
|
|
||||||
! call static_Tmatrix_TA(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,lambda,ERI,Omega1s,rho1s,Omega2s,rho2s,TA)
|
call static_Tmatrix_TA(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,lambda,ERI,Omega1s,rho1s,Omega2s,rho2s,TA)
|
||||||
! if(.not.TDA) call static_Tmatrix_TB(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,lambda,ERI,Omega1s,rho1s,Omega2s,rho2s,TB)
|
if(.not.TDA) call static_Tmatrix_TB(eta,nBas,nC,nO,nV,nR,nS,nOOs,nVVs,lambda,ERI,Omega1s,rho1s,Omega2s,rho2s,TB)
|
||||||
|
|
||||||
! isp_T = 2
|
isp_T = 2
|
||||||
! iblock = 4
|
iblock = 4
|
||||||
|
|
||||||
! call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOt,nVVt,lambda,eT,ERI, &
|
call linear_response_pp(iblock,TDA_T,nBas,nC,nO,nV,nR,nOOt,nVVt,lambda,eT,ERI, &
|
||||||
! Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(isp_T))
|
Omega1t,X1t,Y1t,Omega2t,X2t,Y2t,EcRPA(isp_T))
|
||||||
|
|
||||||
! call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI,X1t,Y1t,rho1t,X2t,Y2t,rho2t)
|
call excitation_density_Tmatrix(iblock,nBas,nC,nO,nV,nR,nOOt,nVVt,ERI,X1t,Y1t,rho1t,X2t,Y2t,rho2t)
|
||||||
|
|
||||||
! call static_Tmatrix_TA(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,lambda,ERI,Omega1t,rho1t,Omega2t,rho2t,TA)
|
call static_Tmatrix_TA(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,lambda,ERI,Omega1t,rho1t,Omega2t,rho2t,TA)
|
||||||
! if(.not.TDA) call static_Tmatrix_TB(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,lambda,ERI,Omega1t,rho1t,Omega2t,rho2t,TB)
|
if(.not.TDA) call static_Tmatrix_TB(eta,nBas,nC,nO,nV,nR,nS,nOOt,nVVt,lambda,ERI,Omega1t,rho1t,Omega2t,rho2t,TB)
|
||||||
|
|
||||||
! end if
|
end if
|
||||||
|
|
||||||
call linear_response_Tmatrix(ispin,.false.,TDA,eta,nBas,nC,nO,nV,nR,nS,lambda,eGT,ERI,TA,TB, &
|
call linear_response_Tmatrix(ispin,.false.,TDA,eta,nBas,nC,nO,nV,nR,nS,lambda,eGT,ERI,TA,TB, &
|
||||||
EcAC(ispin),Omega(:,ispin),XpY(:,:,ispin),XmY(:,:,ispin))
|
EcAC(ispin),Omega(:,ispin),XpY(:,:,ispin),XmY(:,:,ispin))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rhow,Cx_choice,doNcentered,kappa,ExDD)
|
subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,nCC,aCC,nGrid,weight,rhow,Cx_choice,doNcentered,kappa,ExDD)
|
||||||
|
|
||||||
! Compute the unrestricted version of the curvature-corrected exchange ensemble derivative
|
! Compute the unrestricted version of the curvature-corrected exchange ensemble derivative
|
||||||
|
|
||||||
@ -9,8 +9,8 @@ subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,aCC_w1,aCC_w2,nGr
|
|||||||
|
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: wEns(nEns)
|
double precision,intent(in) :: wEns(nEns)
|
||||||
double precision,intent(in) :: aCC_w1(3)
|
integer,intent(in) :: nCC
|
||||||
double precision,intent(in) :: aCC_w2(3)
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
double precision,intent(in) :: weight(nGrid)
|
double precision,intent(in) :: weight(nGrid)
|
||||||
double precision,intent(in) :: rhow(nGrid)
|
double precision,intent(in) :: rhow(nGrid)
|
||||||
@ -46,20 +46,49 @@ subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,aCC_w1,aCC_w2,nGr
|
|||||||
|
|
||||||
! Parameters for N -> N-1
|
! Parameters for N -> N-1
|
||||||
|
|
||||||
a1 = aCC_w1(1)
|
a1 = aCC(1,1)
|
||||||
b1 = aCC_w1(2)
|
b1 = aCC(2,1)
|
||||||
c1 = aCC_w1(3)
|
c1 = aCC(3,1)
|
||||||
|
|
||||||
|
|
||||||
! Parameters for N -> N+1
|
! Parameters for N -> N+1
|
||||||
|
|
||||||
a2 = aCC_w2(1)
|
a2 = aCC(1,2)
|
||||||
b2 = aCC_w2(2)
|
b2 = aCC(2,2)
|
||||||
c2 = aCC_w2(3)
|
c2 = aCC(3,2)
|
||||||
|
|
||||||
w1 = wEns(2)
|
w1 = wEns(2)
|
||||||
w2 = wEns(3)
|
w2 = wEns(3)
|
||||||
|
|
||||||
|
|
||||||
|
if (doNcentered) then
|
||||||
|
|
||||||
|
select case (Cx_choice)
|
||||||
|
|
||||||
|
case(1)
|
||||||
|
dCxdw1 = 2.d0*a1*(w1-1.d0)+(2.d0+3.d0*(w1-2.d0)*w1)*b1+2.d0*(w1-1.d0)*(1.d0+2.d0*(w1-2.d0)*w1)*c1
|
||||||
|
dCxdw2 = 0.d0
|
||||||
|
|
||||||
|
case(2)
|
||||||
|
dCxdw1 = 0.d0
|
||||||
|
dCxdw2 = 2.d0*a2*(w2-1.d0)+(2.d0+3.d0*(w2-2.d0)*w2)*b2+2.d0*(w2-1.d0)*(1.d0+2.d0*(w2-2.d0)*w2)*c2
|
||||||
|
|
||||||
|
case(3)
|
||||||
|
dCxdw1 = (2.d0*a1*(w1-1.d0)+(2.d0+3.d0*(w1-2.d0)*w1)*b1+2.d0*(w1-1.d0)*(1.d0+2.d0*(w1-2.d0)*w1)*c1) &
|
||||||
|
* (1d0 - w2*(2d0 - w2)*(a2 + b2*(w2 - 1d0) + c2*(w2 - 1d0)**2))
|
||||||
|
|
||||||
|
dCxdw2 = (1d0 - w1*(2d0 - w1)*(a1 + b1*(w1 - 1.d0) + c1*(w1 - 1.d0)**2)) &
|
||||||
|
* (2.d0*a2*(w2-1.d0)+(2.d0+3.d0*(w2-2.d0)*w2)*b2+2.d0*(w2-1.d0)*(1.d0+2.d0*(w2-2.d0)*w2)*c2)
|
||||||
|
|
||||||
|
case default
|
||||||
|
dCxdw1 = 0d0
|
||||||
|
dCxdw2 = 0d0
|
||||||
|
|
||||||
|
end select
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
|
||||||
select case (Cx_choice)
|
select case (Cx_choice)
|
||||||
|
|
||||||
case(1)
|
case(1)
|
||||||
@ -82,6 +111,8 @@ subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,aCC_w1,aCC_w2,nGr
|
|||||||
dCxdw2 = 0d0
|
dCxdw2 = 0d0
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
end if
|
||||||
|
|
||||||
|
|
||||||
dCxdw1 = CxLSDA*dCxdw1
|
dCxdw1 = CxLSDA*dCxdw1
|
||||||
dCxdw2 = CxLSDA*dCxdw2
|
dCxdw2 = CxLSDA*dCxdw2
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine UCC_lda_exchange_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,Cx_choice)
|
subroutine UCC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex)
|
||||||
|
|
||||||
! Compute the unrestricted version of the curvature-corrected exchange functional
|
! Compute the unrestricted version of the curvature-corrected exchange functional
|
||||||
|
|
||||||
@ -9,12 +9,13 @@ subroutine UCC_lda_exchange_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,C
|
|||||||
|
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: wEns(nEns)
|
double precision,intent(in) :: wEns(nEns)
|
||||||
double precision,intent(in) :: aCC_w1(3)
|
integer,intent(in) :: nCC
|
||||||
double precision,intent(in) :: aCC_w2(3)
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
double precision,intent(in) :: weight(nGrid)
|
double precision,intent(in) :: weight(nGrid)
|
||||||
double precision,intent(in) :: rho(nGrid)
|
double precision,intent(in) :: rho(nGrid)
|
||||||
integer,intent(in) :: Cx_choice
|
integer,intent(in) :: Cx_choice
|
||||||
|
logical,intent(in) :: doNcentered
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
@ -55,25 +56,38 @@ subroutine UCC_lda_exchange_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,C
|
|||||||
|
|
||||||
! Parameters for He N -> N-1
|
! Parameters for He N -> N-1
|
||||||
|
|
||||||
a1 = aCC_w1(1)
|
a1 = aCC(1,1)
|
||||||
b1 = aCC_w1(2)
|
b1 = aCC(2,1)
|
||||||
c1 = aCC_w1(3)
|
c1 = aCC(3,1)
|
||||||
|
|
||||||
! Parameters for He N -> N+1
|
! Parameters for He N -> N+1
|
||||||
|
|
||||||
a2 = aCC_w2(1)
|
a2 = aCC(1,2)
|
||||||
b2 = aCC_w2(2)
|
b2 = aCC(2,2)
|
||||||
c2 = aCC_w2(3)
|
c2 = aCC(3,2)
|
||||||
|
|
||||||
! Fx1 for states N and N-1
|
! Fx1 for states N and N-1
|
||||||
! Fx2 for states N and N+1
|
! Fx2 for states N and N+1
|
||||||
|
|
||||||
|
if(doNcentered) then
|
||||||
|
|
||||||
|
w1 = wEns(2)
|
||||||
|
Fx1 = 1d0 - w1*(2d0 - w1)*(a1 + b1*(w1 - 1d0) + c1*(w1 - 1d0)**2)
|
||||||
|
|
||||||
|
w2 = wEns(3)
|
||||||
|
Fx2 = 1d0 - w2*(2d0 - w2)*(a2 + b2*(w2 - 1d0) + c2*(w2 - 1d0)**2)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
|
||||||
w1 = wEns(2)
|
w1 = wEns(2)
|
||||||
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
|
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
|
||||||
|
|
||||||
w2 = wEns(3)
|
w2 = wEns(3)
|
||||||
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
|
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
select case (Cx_choice)
|
select case (Cx_choice)
|
||||||
|
|
||||||
case(1)
|
case(1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rhow,rho,Cx_choice,doNcentered,kappa,Ex)
|
subroutine UCC_lda_exchange_individual_energy(nEns,wEns,nCC,aCC,nGrid,weight,rhow,rho,Cx_choice,doNcentered,kappa,Ex)
|
||||||
|
|
||||||
! Compute the unrestricted version of the curvature-corrected exchange functional
|
! Compute the unrestricted version of the curvature-corrected exchange functional
|
||||||
|
|
||||||
@ -9,21 +9,22 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
|
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: wEns(nEns)
|
double precision,intent(in) :: wEns(nEns)
|
||||||
double precision,intent(in) :: aCC_w1(3)
|
integer,intent(in) :: nCC
|
||||||
double precision,intent(in) :: aCC_w2(3)
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
double precision,intent(in) :: weight(nGrid)
|
double precision,intent(in) :: weight(nGrid)
|
||||||
double precision,intent(in) :: rhow(nGrid)
|
double precision,intent(in) :: rhow(nGrid)
|
||||||
double precision,intent(in) :: rho(nGrid)
|
double precision,intent(in) :: rho(nGrid)
|
||||||
integer,intent(in) :: Cx_choice
|
integer,intent(in) :: Cx_choice
|
||||||
logical,intent(in) :: doNcentered
|
logical,intent(in) :: doNcentered
|
||||||
double precision,intent(in) :: kappa(nEns)
|
double precision,intent(in) :: kappa
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
integer :: iG
|
integer :: iG
|
||||||
double precision :: r,rI
|
double precision :: r,rI
|
||||||
double precision :: e_p,dedr
|
double precision :: e_p,dedr
|
||||||
|
double precision :: Exrr,ExrI,ExrrI
|
||||||
|
|
||||||
double precision :: a1,b1,c1,w1
|
double precision :: a1,b1,c1,w1
|
||||||
double precision :: a2,b2,c2,w2
|
double precision :: a2,b2,c2,w2
|
||||||
@ -40,15 +41,26 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
|
|
||||||
! Parameters for N -> N-1
|
! Parameters for N -> N-1
|
||||||
|
|
||||||
a1 = aCC_w1(1)
|
a1 = aCC(1,1)
|
||||||
b1 = aCC_w1(2)
|
b1 = aCC(2,1)
|
||||||
c1 = aCC_w1(3)
|
c1 = aCC(3,1)
|
||||||
|
|
||||||
! Parameters for N -> N+1
|
! Parameters for N -> N+1
|
||||||
|
|
||||||
a2 = aCC_w2(1)
|
a2 = aCC(1,2)
|
||||||
b2 = aCC_w2(2)
|
b2 = aCC(2,2)
|
||||||
c2 = aCC_w2(3)
|
c2 = aCC(3,2)
|
||||||
|
|
||||||
|
if(doNcentered) then
|
||||||
|
|
||||||
|
w1 = wEns(2)
|
||||||
|
Fx1 = 1d0 - w1*(2d0 - w1)*(a1 + b1*(w1 - 1d0) + c1*(w1 - 1d0)**2)
|
||||||
|
|
||||||
|
w2 = wEns(3)
|
||||||
|
Fx2 = 1d0 - w2*(2d0 - w2)*(a2 + b2*(w2 - 1d0) + c2*(w2 - 1d0)**2)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
|
||||||
w1 = wEns(2)
|
w1 = wEns(2)
|
||||||
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
|
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
|
||||||
@ -56,6 +68,8 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
w2 = wEns(3)
|
w2 = wEns(3)
|
||||||
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
|
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
select case (Cx_choice)
|
select case (Cx_choice)
|
||||||
|
|
||||||
case(1)
|
case(1)
|
||||||
@ -75,6 +89,11 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
! Compute LDA exchange matrix in the AO basis
|
! Compute LDA exchange matrix in the AO basis
|
||||||
|
|
||||||
Ex = 0d0
|
Ex = 0d0
|
||||||
|
Exrr = 0d0
|
||||||
|
ExrI = 0d0
|
||||||
|
ExrrI = 0d0
|
||||||
|
|
||||||
|
|
||||||
do iG=1,nGrid
|
do iG=1,nGrid
|
||||||
|
|
||||||
r = max(0d0,rhow(iG))
|
r = max(0d0,rhow(iG))
|
||||||
@ -85,11 +104,12 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
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)*dedr*r*r
|
Exrr = Exrr - weight(iG)*dedr*r*r
|
||||||
|
|
||||||
if(rI > threshold) then
|
if(rI > threshold) then
|
||||||
|
|
||||||
Ex = Ex + weight(iG)*(e_p*rI + dedr*r*rI)
|
ExrI = ExrI + weight(iG)*e_p*rI
|
||||||
|
ExrrI = ExrrI + weight(iG)*dedr*r*rI
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -97,4 +117,16 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
! De-scaling for N-centered ensemble
|
||||||
|
|
||||||
|
if(doNcentered) then
|
||||||
|
|
||||||
|
Exrr = kappa*Exrr
|
||||||
|
ExrI = kappa*ExrI
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
Ex = Exrr + ExrI + ExrrI
|
||||||
|
|
||||||
|
|
||||||
end subroutine UCC_lda_exchange_individual_energy
|
end subroutine UCC_lda_exchange_individual_energy
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine UCC_lda_exchange_potential(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx,Cx_choice)
|
subroutine UCC_lda_exchange_potential(nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,Fx,Cx_choice,doNcentered)
|
||||||
|
|
||||||
! Compute the unrestricted version of the curvature-corrected exchange potential
|
! Compute the unrestricted version of the curvature-corrected exchange potential
|
||||||
|
|
||||||
@ -9,14 +9,15 @@ subroutine UCC_lda_exchange_potential(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,
|
|||||||
|
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: wEns(nEns)
|
double precision,intent(in) :: wEns(nEns)
|
||||||
double precision,intent(in) :: aCC_w1(3)
|
integer,intent(in) :: nCC
|
||||||
double precision,intent(in) :: aCC_w2(3)
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
double precision,intent(in) :: weight(nGrid)
|
double precision,intent(in) :: weight(nGrid)
|
||||||
integer,intent(in) :: nBas
|
integer,intent(in) :: nBas
|
||||||
double precision,intent(in) :: AO(nBas,nGrid)
|
double precision,intent(in) :: AO(nBas,nGrid)
|
||||||
double precision,intent(in) :: rho(nGrid)
|
double precision,intent(in) :: rho(nGrid)
|
||||||
integer,intent(in) :: Cx_choice
|
integer,intent(in) :: Cx_choice
|
||||||
|
logical,intent(in) :: doNcentered
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
@ -57,25 +58,37 @@ subroutine UCC_lda_exchange_potential(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,
|
|||||||
|
|
||||||
! Parameters for He N -> N-1
|
! Parameters for He N -> N-1
|
||||||
|
|
||||||
a1 = aCC_w1(1)
|
a1 = aCC(1,1)
|
||||||
b1 = aCC_w1(2)
|
b1 = aCC(2,1)
|
||||||
c1 = aCC_w1(3)
|
c1 = aCC(3,1)
|
||||||
|
|
||||||
! Parameters for He N -> N+1
|
! Parameters for He N -> N+1
|
||||||
|
|
||||||
a2 = aCC_w2(1)
|
a2 = aCC(1,2)
|
||||||
b2 = aCC_w2(2)
|
b2 = aCC(2,2)
|
||||||
c2 = aCC_w2(3)
|
c2 = aCC(3,2)
|
||||||
|
|
||||||
! Fx1 for states N and N-1
|
! Fx1 for states N and N-1
|
||||||
! Fx2 for states N and N+1
|
! Fx2 for states N and N+1
|
||||||
|
|
||||||
|
if(doNcentered) then
|
||||||
|
|
||||||
|
w1 = wEns(2)
|
||||||
|
Fx1 = 1d0 - w1*(2d0 - w1)*(a1 + b1*(w1 - 1d0) + c1*(w1 - 1d0)**2)
|
||||||
|
|
||||||
|
w2 = wEns(3)
|
||||||
|
Fx2 = 1d0 - w2*(2d0 - w2)*(a2 + b2*(w2 - 1d0) + c2*(w2 - 1d0)**2)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
w1 = wEns(2)
|
w1 = wEns(2)
|
||||||
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
|
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
|
||||||
|
|
||||||
w2 = wEns(3)
|
w2 = wEns(3)
|
||||||
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
|
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
select case (Cx_choice)
|
select case (Cx_choice)
|
||||||
|
|
||||||
case(1)
|
case(1)
|
||||||
|
@ -23,7 +23,7 @@ subroutine UVWN5_lda_correlation_individual_energy(nGrid,weight,rhow,rho,doNcent
|
|||||||
double precision :: a_f,x0_f,xx0_f,b_f,c_f,x_f,q_f
|
double precision :: a_f,x0_f,xx0_f,b_f,c_f,x_f,q_f
|
||||||
double precision :: a_a,x0_a,xx0_a,b_a,c_a,x_a,q_a
|
double precision :: a_a,x0_a,xx0_a,b_a,c_a,x_a,q_a
|
||||||
double precision :: dfzdz,dxdrs,dxdx_p,dxdx_f,dxdx_a,decdx_p,decdx_f,decdx_a
|
double precision :: dfzdz,dxdrs,dxdx_p,dxdx_f,dxdx_a,decdx_p,decdx_f,decdx_a
|
||||||
double precision :: dzdr ,dfzdr ,drsdr ,decdr_p ,decdr_f ,decdr_a, decdr
|
double precision :: dzdra,dzdrb,dfzdra,dfzdrb,drsdr,decdr_p,decdr_f,decdr_a,decdra,decdrb,decdr
|
||||||
double precision :: ec_z,ec_p,ec_f,ec_a
|
double precision :: ec_z,ec_p,ec_f,ec_a
|
||||||
double precision :: fz,d2fz
|
double precision :: fz,d2fz
|
||||||
|
|
||||||
@ -67,49 +67,46 @@ subroutine UVWN5_lda_correlation_individual_energy(nGrid,weight,rhow,rho,doNcent
|
|||||||
raI = max(0d0,rho(iG,1))
|
raI = max(0d0,rho(iG,1))
|
||||||
rbI = max(0d0,rho(iG,2))
|
rbI = max(0d0,rho(iG,2))
|
||||||
|
|
||||||
! spin-up contribution
|
|
||||||
|
|
||||||
r = ra
|
|
||||||
rI = raI
|
|
||||||
|
|
||||||
if(r > threshold) then
|
|
||||||
|
|
||||||
rs = (4d0*pi*r/3d0)**(-1d0/3d0)
|
|
||||||
x = sqrt(rs)
|
|
||||||
|
|
||||||
x_f = x*x + b_f*x + c_f
|
|
||||||
xx0_f = x0_f*x0_f + b_f*x0_f + c_f
|
|
||||||
q_f = sqrt(4d0*c_f - b_f*b_f)
|
|
||||||
|
|
||||||
ec_f = a_f*( log(x**2/x_f) + 2d0*b_f/q_f*atan(q_f/(2d0*x + b_f)) &
|
|
||||||
- b_f*x0_f/xx0_f*( log((x - x0_f)**2/x_f) + 2d0*(b_f + 2d0*x0_f)/q_f*atan(q_f/(2d0*x + b_f)) ) )
|
|
||||||
|
|
||||||
drsdr = - (36d0*pi)**(-1d0/3d0)*r**(-4d0/3d0)
|
|
||||||
dxdrs = 0.5d0/sqrt(rs)
|
|
||||||
|
|
||||||
dxdx_f = 2d0*x + b_f
|
|
||||||
|
|
||||||
decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
|
||||||
- b_f*x0_f/xx0_f*( 2/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
|
||||||
|
|
||||||
decdr_f = drsdr*dxdrs*decdx_f
|
|
||||||
|
|
||||||
Ecrr(1) = Ecrr(1) - weight(iG)*decdr_f*r*r
|
|
||||||
|
|
||||||
if(rI > threshold) then
|
|
||||||
|
|
||||||
EcrI(1) = EcrI(1) + weight(iG)*ec_f*rI
|
|
||||||
EcrrI(1) = EcrrI(1) + weight(iG)*decdr_f*r*rI
|
|
||||||
|
|
||||||
end if
|
|
||||||
|
|
||||||
end if
|
|
||||||
|
|
||||||
! up-down contribution
|
|
||||||
|
|
||||||
r = ra + rb
|
r = ra + rb
|
||||||
rI = raI + rbI
|
rI = raI + rbI
|
||||||
|
|
||||||
|
! spin-up contribution
|
||||||
|
|
||||||
|
! if(r > threshold) then
|
||||||
|
|
||||||
|
! rs = (4d0*pi*r/3d0)**(-1d0/3d0)
|
||||||
|
! x = sqrt(rs)
|
||||||
|
!
|
||||||
|
! x_f = x*x + b_f*x + c_f
|
||||||
|
! xx0_f = x0_f*x0_f + b_f*x0_f + c_f
|
||||||
|
! q_f = sqrt(4d0*c_f - b_f*b_f)
|
||||||
|
!
|
||||||
|
! ec_f = a_f*( log(x**2/x_f) + 2d0*b_f/q_f*atan(q_f/(2d0*x + b_f)) &
|
||||||
|
! - b_f*x0_f/xx0_f*( log((x - x0_f)**2/x_f) + 2d0*(b_f + 2d0*x0_f)/q_f*atan(q_f/(2d0*x + b_f)) ) )
|
||||||
|
!
|
||||||
|
! drsdr = - (36d0*pi)**(-1d0/3d0)*r**(-4d0/3d0)
|
||||||
|
! dxdrs = 0.5d0/sqrt(rs)
|
||||||
|
|
||||||
|
! dxdx_f = 2d0*x + b_f
|
||||||
|
|
||||||
|
! decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
||||||
|
! - b_f*x0_f/xx0_f*( 2/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
||||||
|
|
||||||
|
! decdr_f = drsdr*dxdrs*decdx_f
|
||||||
|
|
||||||
|
! Ecrr(1) = Ecrr(1) - weight(iG)*decdr_f*r*r
|
||||||
|
|
||||||
|
! if(rI > threshold) then
|
||||||
|
|
||||||
|
! EcrI(1) = EcrI(1) + weight(iG)*ec_f*rI
|
||||||
|
! EcrrI(1) = EcrrI(1) + weight(iG)*decdr_f*r*rI
|
||||||
|
|
||||||
|
! end if
|
||||||
|
!
|
||||||
|
! end if
|
||||||
|
|
||||||
|
! up-down contribution
|
||||||
|
|
||||||
if(r > threshold) then
|
if(r > threshold) then
|
||||||
|
|
||||||
rs = (4d0*pi*r/3d0)**(-1d0/3d0)
|
rs = (4d0*pi*r/3d0)**(-1d0/3d0)
|
||||||
@ -144,9 +141,13 @@ subroutine UVWN5_lda_correlation_individual_energy(nGrid,weight,rhow,rho,doNcent
|
|||||||
|
|
||||||
ec_z = ec_p + ec_a*fz/d2fz*(1d0 - z**4) + (ec_f - ec_p)*fz*z**4
|
ec_z = ec_p + ec_a*fz/d2fz*(1d0 - z**4) + (ec_f - ec_p)*fz*z**4
|
||||||
|
|
||||||
dzdr = (1d0 - z)/r
|
|
||||||
dfzdz = (4d0/3d0)*((1d0 + z)**(1d0/3d0) - (1d0 - z)**(1d0/3d0))/(2d0*(2d0**(1d0/3d0) - 1d0))
|
dfzdz = (4d0/3d0)*((1d0 + z)**(1d0/3d0) - (1d0 - z)**(1d0/3d0))/(2d0*(2d0**(1d0/3d0) - 1d0))
|
||||||
dfzdr = dzdr*dfzdz
|
|
||||||
|
dzdra = + (1d0 - z)/r
|
||||||
|
dfzdra = dzdra*dfzdz
|
||||||
|
|
||||||
|
dzdrb = - (1d0 + z)/r
|
||||||
|
dfzdrb = dzdrb*dfzdz
|
||||||
|
|
||||||
drsdr = - (36d0*pi)**(-1d0/3d0)*r**(-4d0/3d0)
|
drsdr = - (36d0*pi)**(-1d0/3d0)*r**(-4d0/3d0)
|
||||||
dxdrs = 0.5d0/sqrt(rs)
|
dxdrs = 0.5d0/sqrt(rs)
|
||||||
@ -156,20 +157,27 @@ subroutine UVWN5_lda_correlation_individual_energy(nGrid,weight,rhow,rho,doNcent
|
|||||||
dxdx_a = 2d0*x + b_a
|
dxdx_a = 2d0*x + b_a
|
||||||
|
|
||||||
decdx_p = a_p*( 2d0/x - 4d0*b_p/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p &
|
decdx_p = a_p*( 2d0/x - 4d0*b_p/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p &
|
||||||
- b_p*x0_p/xx0_p*( 2/(x-x0_p) - 4d0*(b_p+2d0*x0_p)/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p ) )
|
- b_p*x0_p/xx0_p*( 2d0/(x-x0_p) - 4d0*(b_p+2d0*x0_p)/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p ) )
|
||||||
|
|
||||||
decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
||||||
- b_f*x0_f/xx0_f*( 2/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
- b_f*x0_f/xx0_f*( 2d0/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
||||||
|
|
||||||
decdx_a = a_a*( 2d0/x - 4d0*b_a/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a &
|
decdx_a = a_a*( 2d0/x - 4d0*b_a/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a &
|
||||||
- b_a*x0_a/xx0_a*( 2/(x-x0_a) - 4d0*(b_a+2d0*x0_a)/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a ) )
|
- b_a*x0_a/xx0_a*( 2d0/(x-x0_a) - 4d0*(b_a+2d0*x0_a)/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a ) )
|
||||||
|
|
||||||
decdr_p = drsdr*dxdrs*decdx_p
|
decdr_p = drsdr*dxdrs*decdx_p
|
||||||
decdr_f = drsdr*dxdrs*decdx_f
|
decdr_f = drsdr*dxdrs*decdx_f
|
||||||
decdr_a = drsdr*dxdrs*decdx_a
|
decdr_a = drsdr*dxdrs*decdx_a
|
||||||
|
|
||||||
decdr = decdr_p + decdr_a*fz/d2fz*(1d0-z**4) + ec_a*dfzdr/d2fz*(1d0-z**4) - 4d0*ec_a*fz/d2fz*dzdr*z**3 &
|
decdra = decdr_p + decdr_a*fz/d2fz*(1d0-z**4) + ec_a*dfzdra/d2fz*(1d0-z**4) - 4d0*ec_a*fz/d2fz*dzdra*z**3 &
|
||||||
+ (decdr_f - decdr_p)*fz*z**4 + (ec_f - ec_p)*dfzdr*z**4 + 4d0*(ec_f - ec_p)*fz*dzdr*z**3
|
+ (decdr_f - decdr_p)*fz*z**4 + (ec_f - ec_p)*dfzdra*z**4 + 4d0*(ec_f - ec_p)*fz*dzdra*z**3
|
||||||
|
|
||||||
|
decdrb = decdr_p + decdr_a*fz/d2fz*(1d0-z**4) + ec_a*dfzdrb/d2fz*(1d0-z**4) - 4d0*ec_a*fz/d2fz*dzdrb*z**3 &
|
||||||
|
+ (decdr_f - decdr_p)*fz*z**4 + (ec_f - ec_p)*dfzdrb*z**4 + 4d0*(ec_f - ec_p)*fz*dzdrb*z**3
|
||||||
|
|
||||||
|
decdr = 0d0
|
||||||
|
if(ra > threshold) decdr = decdr + decdra
|
||||||
|
if(rb > threshold) decdr = decdr + decdrb
|
||||||
|
|
||||||
Ecrr(2) = Ecrr(2) - weight(iG)*decdr*r*r
|
Ecrr(2) = Ecrr(2) - weight(iG)*decdr*r*r
|
||||||
|
|
||||||
@ -184,41 +192,38 @@ subroutine UVWN5_lda_correlation_individual_energy(nGrid,weight,rhow,rho,doNcent
|
|||||||
|
|
||||||
! spin-down contribution
|
! spin-down contribution
|
||||||
|
|
||||||
r = rb
|
! if(r > threshold) then
|
||||||
rI = rbI
|
|
||||||
|
|
||||||
if(r > threshold) then
|
! rs = (4d0*pi*r/3d0)**(-1d0/3d0)
|
||||||
|
! x = sqrt(rs)
|
||||||
|
|
||||||
rs = (4d0*pi*r/3d0)**(-1d0/3d0)
|
! x_f = x*x + b_f*x + c_f
|
||||||
x = sqrt(rs)
|
! xx0_f = x0_f*x0_f + b_f*x0_f + c_f
|
||||||
|
! q_f = sqrt(4d0*c_f - b_f*b_f)
|
||||||
|
|
||||||
x_f = x*x + b_f*x + c_f
|
! ec_f = a_f*( log(x**2/x_f) + 2d0*b_f/q_f*atan(q_f/(2d0*x + b_f)) &
|
||||||
xx0_f = x0_f*x0_f + b_f*x0_f + c_f
|
! - b_f*x0_f/xx0_f*( log((x - x0_f)**2/x_f) + 2d0*(b_f + 2d0*x0_f)/q_f*atan(q_f/(2d0*x + b_f)) ) )
|
||||||
q_f = sqrt(4d0*c_f - b_f*b_f)
|
|
||||||
|
|
||||||
ec_f = a_f*( log(x**2/x_f) + 2d0*b_f/q_f*atan(q_f/(2d0*x + b_f)) &
|
! drsdr = - (36d0*pi)**(-1d0/3d0)*r**(-4d0/3d0)
|
||||||
- b_f*x0_f/xx0_f*( log((x - x0_f)**2/x_f) + 2d0*(b_f + 2d0*x0_f)/q_f*atan(q_f/(2d0*x + b_f)) ) )
|
! dxdrs = 0.5d0/sqrt(rs)
|
||||||
|
|
||||||
drsdr = - (36d0*pi)**(-1d0/3d0)*r**(-4d0/3d0)
|
! dxdx_f = 2d0*x + b_f
|
||||||
dxdrs = 0.5d0/sqrt(rs)
|
|
||||||
|
|
||||||
dxdx_f = 2d0*x + b_f
|
! decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
||||||
|
! - b_f*x0_f/xx0_f*( 2/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
||||||
|
|
||||||
decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
! decdr_f = drsdr*dxdrs*decdx_f
|
||||||
- b_f*x0_f/xx0_f*( 2/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
|
||||||
|
|
||||||
decdr_f = drsdr*dxdrs*decdx_f
|
! Ecrr(3) = Ecrr(3) - weight(iG)*decdr_f*r*r
|
||||||
|
|
||||||
Ecrr(3) = Ecrr(3) - weight(iG)*decdr_f*r*r
|
! if(rI > threshold) then
|
||||||
|
|
||||||
if(rI > threshold) then
|
! EcrI(3) = EcrI(3) + weight(iG)*ec_f*rI
|
||||||
|
! EcrrI(3) = EcrrI(3) + weight(iG)*decdr_f*r*rI
|
||||||
|
|
||||||
EcrI(3) = EcrI(3) + weight(iG)*ec_f*rI
|
! end if
|
||||||
EcrrI(3) = EcrrI(3) + weight(iG)*decdr_f*r*rI
|
|
||||||
|
|
||||||
end if
|
! end if
|
||||||
|
|
||||||
end if
|
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ subroutine UVWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
|
|||||||
|
|
||||||
! Parameters of the functional
|
! Parameters of the functional
|
||||||
|
|
||||||
a_p = +0.0621814D0/2D0
|
a_p = +0.0621814D0/2d0
|
||||||
x0_p = -0.10498d0
|
x0_p = -0.10498d0
|
||||||
b_p = +3.72744d0
|
b_p = +3.72744d0
|
||||||
c_p = +12.9352d0
|
c_p = +12.9352d0
|
||||||
@ -97,7 +97,7 @@ subroutine UVWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
|
|||||||
|
|
||||||
ec_z = ec_p + ec_a*fz/d2fz*(1d0-z**4) + (ec_f - ec_p)*fz*z**4
|
ec_z = ec_p + ec_a*fz/d2fz*(1d0-z**4) + (ec_f - ec_p)*fz*z**4
|
||||||
|
|
||||||
dzdra = (1d0 - z)/r
|
dzdra = + (1d0 - z)/r
|
||||||
dfzdz = (4d0/3d0)*((1d0 + z)**(1d0/3d0) - (1d0 - z)**(1d0/3d0))/(2d0*(2d0**(1d0/3d0) - 1d0))
|
dfzdz = (4d0/3d0)*((1d0 + z)**(1d0/3d0) - (1d0 - z)**(1d0/3d0))/(2d0*(2d0**(1d0/3d0) - 1d0))
|
||||||
dfzdra = dzdra*dfzdz
|
dfzdra = dzdra*dfzdz
|
||||||
|
|
||||||
@ -109,13 +109,13 @@ subroutine UVWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
|
|||||||
dxdx_a = 2d0*x + b_a
|
dxdx_a = 2d0*x + b_a
|
||||||
|
|
||||||
decdx_p = a_p*( 2d0/x - 4d0*b_p/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p &
|
decdx_p = a_p*( 2d0/x - 4d0*b_p/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p &
|
||||||
- b_p*x0_p/xx0_p*( 2/(x-x0_p) - 4d0*(b_p+2d0*x0_p)/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p ) )
|
- b_p*x0_p/xx0_p*( 2d0/(x-x0_p) - 4d0*(b_p+2d0*x0_p)/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p ) )
|
||||||
|
|
||||||
decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
||||||
- b_f*x0_f/xx0_f*( 2/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
- b_f*x0_f/xx0_f*( 2d0/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
||||||
|
|
||||||
decdx_a = a_a*( 2d0/x - 4d0*b_a/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a &
|
decdx_a = a_a*( 2d0/x - 4d0*b_a/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a &
|
||||||
- b_a*x0_a/xx0_a*( 2/(x-x0_a) - 4d0*(b_a+2d0*x0_a)/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a ) )
|
- b_a*x0_a/xx0_a*( 2d0/(x-x0_a) - 4d0*(b_a+2d0*x0_a)/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a ) )
|
||||||
|
|
||||||
decdra_p = drsdra*dxdrs*decdx_p
|
decdra_p = drsdra*dxdrs*decdx_p
|
||||||
decdra_f = drsdra*dxdrs*decdx_f
|
decdra_f = drsdra*dxdrs*decdx_f
|
||||||
@ -167,13 +167,13 @@ subroutine UVWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
|
|||||||
dxdx_a = 2d0*x + b_a
|
dxdx_a = 2d0*x + b_a
|
||||||
|
|
||||||
decdx_p = a_p*( 2d0/x - 4d0*b_p/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p &
|
decdx_p = a_p*( 2d0/x - 4d0*b_p/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p &
|
||||||
- b_p*x0_p/xx0_p*( 2/(x-x0_p) - 4d0*(b_p+2d0*x0_p)/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p ) )
|
- b_p*x0_p/xx0_p*( 2d0/(x-x0_p) - 4d0*(b_p+2d0*x0_p)/( (b_p+2d0*x)**2 + q_p**2) - dxdx_p/x_p ) )
|
||||||
|
|
||||||
decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
decdx_f = a_f*( 2d0/x - 4d0*b_f/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f &
|
||||||
- b_f*x0_f/xx0_f*( 2/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
- b_f*x0_f/xx0_f*( 2d0/(x-x0_f) - 4d0*(b_f+2d0*x0_f)/( (b_f+2d0*x)**2 + q_f**2) - dxdx_f/x_f ) )
|
||||||
|
|
||||||
decdx_a = a_a*( 2d0/x - 4d0*b_a/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a &
|
decdx_a = a_a*( 2d0/x - 4d0*b_a/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a &
|
||||||
- b_a*x0_a/xx0_a*( 2/(x-x0_a) - 4d0*(b_a+2d0*x0_a)/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a ) )
|
- b_a*x0_a/xx0_a*( 2d0/(x-x0_a) - 4d0*(b_a+2d0*x0_a)/( (b_a+2d0*x)**2 + q_a**2) - dxdx_a/x_a ) )
|
||||||
|
|
||||||
decdrb_p = drsdrb*dxdrs*decdx_p
|
decdrb_p = drsdrb*dxdrs*decdx_p
|
||||||
decdrb_f = drsdrb*dxdrs*decdx_f
|
decdrb_f = drsdrb*dxdrs*decdx_f
|
||||||
@ -181,6 +181,7 @@ subroutine UVWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
|
|||||||
|
|
||||||
decdrb = decdrb_p + decdrb_a*fz/d2fz*(1d0-z**4) + ec_a*dfzdrb/d2fz*(1d0-z**4) - 4d0*ec_a*fz/d2fz*dzdrb*z**3 &
|
decdrb = decdrb_p + decdrb_a*fz/d2fz*(1d0-z**4) + ec_a*dfzdrb/d2fz*(1d0-z**4) - 4d0*ec_a*fz/d2fz*dzdrb*z**3 &
|
||||||
+ (decdrb_f - decdrb_p)*fz*z**4 + (ec_f - ec_p)*dfzdrb*z**4 + 4d0*(ec_f - ec_p)*fz*dzdrb*z**3
|
+ (decdrb_f - decdrb_p)*fz*z**4 + (ec_f - ec_p)*dfzdrb*z**4 + 4d0*(ec_f - ec_p)*fz*dzdrb*z**3
|
||||||
|
|
||||||
Fc(mu,nu,2) = Fc(mu,nu,2) + weight(iG)*AO(mu,iG)*AO(nu,iG)*(ec_z + decdrb*r)
|
Fc(mu,nu,2) = Fc(mu,nu,2) + weight(iG)*AO(mu,iG)*AO(nu,iG)*(ec_z + decdrb*r)
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
@ -62,8 +62,9 @@ subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,n
|
|||||||
integer :: nGrid
|
integer :: nGrid
|
||||||
double precision,allocatable :: root(:,:)
|
double precision,allocatable :: root(:,:)
|
||||||
double precision,allocatable :: weight(:)
|
double precision,allocatable :: weight(:)
|
||||||
double precision :: aCC_w1(3)
|
|
||||||
double precision :: aCC_w2(3)
|
integer :: nCC
|
||||||
|
double precision,allocatable :: aCC(:,:)
|
||||||
|
|
||||||
double precision,allocatable :: AO(:,:)
|
double precision,allocatable :: AO(:,:)
|
||||||
double precision,allocatable :: dAO(:,:,:)
|
double precision,allocatable :: dAO(:,:,:)
|
||||||
@ -99,21 +100,14 @@ subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,n
|
|||||||
write(*,*) '******************************************'
|
write(*,*) '******************************************'
|
||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
! Libxc version
|
|
||||||
|
|
||||||
! call xc_f90_version(vmajor, vminor, vmicro)
|
|
||||||
! write(*,'("Libxc version: ",I1,".",I1,".",I1)') vmajor, vminor, vmicro
|
|
||||||
|
|
||||||
! call xcinfo()
|
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! DFT options
|
! DFT options
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
! Allocate ensemble weights and MO coefficients
|
! Allocate ensemble weights and MO coefficients
|
||||||
|
|
||||||
allocate(wEns(maxEns),occnum(nBas,nspin,maxEns))
|
allocate(wEns(maxEns),aCC(maxCC,nEns-1),occnum(nBas,nspin,maxEns))
|
||||||
call read_options_dft(nBas,method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,aCC_w1,aCC_w2, &
|
call read_options_dft(nBas,method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,nCC,aCC, &
|
||||||
doNcentered,occnum,Cx_choice)
|
doNcentered,occnum,Cx_choice)
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
@ -245,7 +239,7 @@ subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,n
|
|||||||
end do
|
end do
|
||||||
|
|
||||||
call cpu_time(start_KS)
|
call cpu_time(start_KS)
|
||||||
call eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,maxSCF,thresh,max_diis,guess_type,mix, &
|
call eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nCC,aCC(1:nCC,1:nEns-1),nGrid,weight,maxSCF,thresh,max_diis,guess_type,mix, &
|
||||||
nNuc,ZNuc,rNuc,ENuc,nBas,AO,dAO,S,T,V,Hc,ERI,dipole_int,X,occnum,Cx_choice,doNcentered,Ew,eKS,cKS,PKS,Vxc)
|
nNuc,ZNuc,rNuc,ENuc,nBas,AO,dAO,S,T,V,Hc,ERI,dipole_int,X,occnum,Cx_choice,doNcentered,Ew,eKS,cKS,PKS,Vxc)
|
||||||
call cpu_time(end_KS)
|
call cpu_time(end_KS)
|
||||||
|
|
||||||
@ -262,7 +256,7 @@ subroutine eDFT(maxSCF,thresh,max_diis,guess_type,mix,nNuc,ZNuc,rNuc,ENuc,nBas,n
|
|||||||
if(method == 'eDFT-UKS') then
|
if(method == 'eDFT-UKS') then
|
||||||
|
|
||||||
call cpu_time(start_KS)
|
call cpu_time(start_KS)
|
||||||
call eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,maxSCF,thresh,max_diis,guess_type,mix, &
|
call eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nCC,aCC(1:nCC,1:nEns-1),nGrid,weight,maxSCF,thresh,max_diis,guess_type,mix, &
|
||||||
nNuc,ZNuc,rNuc,ENuc,nBas,AO,dAO,S,T,V,Hc,ERI,dipole_int,X,occnum,Cx_choice,doNcentered,Ew,eKS,cKS,PKS,Vxc)
|
nNuc,ZNuc,rNuc,ENuc,nBas,AO,dAO,S,T,V,Hc,ERI,dipole_int,X,occnum,Cx_choice,doNcentered,Ew,eKS,cKS,PKS,Vxc)
|
||||||
call cpu_time(end_KS)
|
call cpu_time(end_KS)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,maxSCF,thresh,max_diis,guess_type,mix, &
|
subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nCC,aCC,nGrid,weight,maxSCF,thresh,max_diis,guess_type,mix, &
|
||||||
nNuc,ZNuc,rNuc,ENuc,nBas,AO,dAO,S,T,V,Hc,ERI,dipole_int,X,occnum,Cx_choice,doNcentered,Ew,eps,c,Pw,Vxc)
|
nNuc,ZNuc,rNuc,ENuc,nBas,AO,dAO,S,T,V,Hc,ERI,dipole_int,X,occnum,Cx_choice,doNcentered,Ew,eps,c,Pw,Vxc)
|
||||||
|
|
||||||
! Perform unrestricted Kohn-Sham calculation for ensembles
|
! Perform unrestricted Kohn-Sham calculation for ensembles
|
||||||
@ -12,8 +12,8 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
integer,intent(in) :: x_DFA,c_DFA
|
integer,intent(in) :: x_DFA,c_DFA
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: wEns(nEns)
|
double precision,intent(in) :: wEns(nEns)
|
||||||
double precision,intent(in) :: aCC_w1(3)
|
integer,intent(in) :: nCC
|
||||||
double precision,intent(in) :: aCC_w2(3)
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
double precision,intent(in) :: weight(nGrid)
|
double precision,intent(in) :: weight(nGrid)
|
||||||
integer,intent(in) :: maxSCF,max_diis,guess_type
|
integer,intent(in) :: maxSCF,max_diis,guess_type
|
||||||
@ -259,9 +259,9 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
! Compute exchange potential
|
! Compute exchange potential
|
||||||
|
|
||||||
do ispin=1,nspin
|
do ispin=1,nspin
|
||||||
call unrestricted_exchange_potential(x_rung,x_DFA,LDA_centered,nEns,wEns(:),aCC_w1,aCC_w2,nGrid,weight(:),nBas, &
|
call unrestricted_exchange_potential(x_rung,x_DFA,LDA_centered,nEns,wEns(:),nCC,aCC,nGrid,weight(:),nBas, &
|
||||||
Pw(:,:,ispin),ERI(:,:,:,:),AO(:,:),dAO(:,:,:),rhow(:,ispin),drhow(:,:,ispin), &
|
Pw(:,:,ispin),ERI(:,:,:,:),AO(:,:),dAO(:,:,:),rhow(:,ispin),drhow(:,:,ispin), &
|
||||||
Fx(:,:,ispin),FxHF(:,:,ispin),Cx_choice)
|
Fx(:,:,ispin),FxHF(:,:,ispin),Cx_choice,doNcentered)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
! Compute correlation potential
|
! Compute correlation potential
|
||||||
@ -338,8 +338,9 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
! Exchange energy
|
! Exchange energy
|
||||||
|
|
||||||
do ispin=1,nspin
|
do ispin=1,nspin
|
||||||
call unrestricted_exchange_energy(x_rung,x_DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas, &
|
call unrestricted_exchange_energy(x_rung,x_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, &
|
||||||
Pw(:,:,ispin),FxHF(:,:,ispin),rhow(:,ispin),drhow(:,:,ispin),Ex(ispin),Cx_choice)
|
Pw(:,:,ispin),FxHF(:,:,ispin),rhow(:,ispin),drhow(:,:,ispin),Ex(ispin)&
|
||||||
|
,Cx_choice,doNcentered)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
! Correlation energy
|
! Correlation energy
|
||||||
@ -402,7 +403,7 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
|||||||
! Compute individual energies from ensemble energy
|
! Compute individual energies from ensemble energy
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
call unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas, &
|
call unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, &
|
||||||
AO,dAO,T,V,ERI,ENuc,eps,Pw,rhow,drhow,J,Fx,FxHF,Fc,P,rho,drho,Ew,E,Om,occnum, &
|
AO,dAO,T,V,ERI,ENuc,eps,Pw,rhow,drhow,J,Fx,FxHF,Fc,P,rho,drho,Ew,E,Om,occnum, &
|
||||||
Cx_choice,doNcentered)
|
Cx_choice,doNcentered)
|
||||||
|
|
||||||
|
@ -149,134 +149,68 @@ subroutine print_unrestricted_individual_energy(nEns,ENuc,Ew,ET,EV,EJ,Ex,Ec,Exc,
|
|||||||
! Total Energy and IP and EA
|
! Total Energy and IP and EA
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
|
||||||
! 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'
|
do iEns=2,nEns
|
||||||
! write(*,*)
|
write(*,'(A40,I2,A1,F16.10,A3)') ' Energy difference 1 -> ',iEns,':',Omaux(iEns)+OmxcDD(iEns),' au'
|
||||||
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(2), ' au'
|
write(*,*)
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2), ' au'
|
write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns), ' au'
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2), ' au'
|
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns), ' au'
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2),' au'
|
write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(iEns), ' au'
|
||||||
! write(*,*)
|
write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(iEns),' au'
|
||||||
! write(*,'(A43,F16.10,A4)') ' Electronic Affinity 1 -> 3:',-(Omaux(3)+OmxcDD(3)),' au'
|
write(*,*)
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',-Omaux(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',-OmxDD(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',-OmcDD(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3),' au'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',Omaux(2)+OmxcDD(2)+(Omaux(3)+OmxcDD(3)),' au'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(2)+Omaux(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2)+OmxDD(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2)+OmcDD(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)+OmxcDD(3),' au'
|
|
||||||
! write(*,*)
|
|
||||||
|
|
||||||
! write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
! write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
! write(*,'(A40,F16.10,A3)') ' Ionization Potential 1 -> 2:',(Omaux(2)+OmxcDD(2))*HaToeV,' eV'
|
write(*,'(A40,I2,A1,F16.10,A3)') ' Energy difference 1 -> ',iEns,':',(Omaux(iEns)+OmxcDD(iEns))*HaToeV,' eV'
|
||||||
! write(*,*)
|
write(*,*)
|
||||||
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(2)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns)*HaToeV, ' eV'
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns)*HaToeV, ' eV'
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(iEns)*HaToeV, ' eV'
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)*HaToeV,' eV'
|
write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(iEns)*HaToeV,' eV'
|
||||||
! write(*,*)
|
write(*,*)
|
||||||
! write(*,'(A40,F16.10,A3)') ' Electronic Affinity 1 -> 3:',-(Omaux(3)+OmxcDD(3))*HaToeV,' eV'
|
end do
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',-Omaux(3)*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',-OmxDD(3)*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',-OmcDD(3)*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3)*HaToeV,' eV'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',(Omaux(2)+OmxcDD(2)+(Omaux(3)+OmxcDD(3)))*HaToeV,' eV'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',(Omaux(2)+Omaux(3))*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',(OmxDD(2)+OmxDD(3))*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',(OmcDD(2)+OmcDD(3))*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',(OmxcDD(2)+OmxcDD(3))*HaToeV,' eV'
|
|
||||||
! write(*,*)
|
|
||||||
|
|
||||||
! write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
! write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
! write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
! write(*,'(A60)') ' IP and EA FROM INDIVIDUAL ENERGIES '
|
write(*,'(A60)') ' IP and EA FROM INDIVIDUAL ENERGIES '
|
||||||
! write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
! do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
! write(*,'(A40,I2,A2,F16.10,A3)') ' Individual energy state ',iEns,': ',E(iEns) + ENuc,' au'
|
write(*,'(A40,I2,A2,F16.10,A3)') ' Individual energy state ',iEns,': ',E(iEns) + ENuc,' au'
|
||||||
! end do
|
end do
|
||||||
! write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
|
|
||||||
! write(*,'(A43,F16.10,A4)') ' Ionization Potential 1 -> 2:',Om(2), ' au'
|
do iEns=2,nEns
|
||||||
! write(*,*)
|
write(*,'(A40,I2,A1,F16.10,A3)') ' Energy difference 1 -> ',iEns,':',Om(iEns), ' au'
|
||||||
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(2), ' au'
|
write(*,*)
|
||||||
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(2), ' au'
|
write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(iEns), ' au'
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(2), ' au'
|
write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(iEns), ' au'
|
||||||
! write(*,*)
|
write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(iEns), ' au'
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2), ' au'
|
write(*,*)
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2), ' au'
|
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns), ' au'
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2),' au'
|
write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(iEns), ' au'
|
||||||
! write(*,*)
|
write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(iENs),' au'
|
||||||
! write(*,'(A43,F16.10,A4)') ' Electronic Affinity 1 -> 3:',-Om(3), ' au'
|
write(*,*)
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',-Omx(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',-Omc(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',-Omxc(3), ' au'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',-OmxDD(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',-OmcDD(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3),' au'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',Om(2)+Om(3), ' au'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(2)+Omx(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(2)+Omc(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(2)+Omxc(3), ' au'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2)+OmxDD(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2)+OmcDD(3), ' au'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)+OmxcDD(3),' au'
|
|
||||||
! write(*,*)
|
|
||||||
|
|
||||||
! write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
|
|
||||||
! write(*,'(A43,F16.10,A4)') ' Ionization Potential 1 -> 2:',Om(2)*HaToeV, ' eV'
|
write(*,'(A40,I2,A1,F16.10,A3)') ' Energy difference 1 -> ',iEns,':',Om(iEns)*HaToeV, ' eV'
|
||||||
! write(*,*)
|
write(*,*)
|
||||||
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(2)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(iEns)*HaToeV, ' eV'
|
||||||
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(2)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(iEns)*HaToeV, ' eV'
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(2)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(iEns)*HaToeV, ' eV'
|
||||||
! write(*,*)
|
write(*,*)
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns)*HaToeV, ' eV'
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(iEns)*HaToeV, ' eV'
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)*HaToeV,' eV'
|
write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(iEns)*HaToeV,' eV'
|
||||||
! write(*,*)
|
write(*,*)
|
||||||
! write(*,'(A43,F16.10,A4)') ' Electronic Affinity 1 -> 3:',-Om(3)*HaToeV, ' eV'
|
end do
|
||||||
! write(*,*)
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',-Omx(3)*HaToeV, ' eV'
|
write(*,*)
|
||||||
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',-Omc(3)*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',-Omxc(3)*HaToeV, ' eV'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',-OmxDD(3)*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',-OmcDD(3)*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3)*HaToeV,' eV'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',(Om(2)+Om(3))*HaToeV, ' eV'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',(Omx(2)+Omx(3))*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',(Omc(2)+Omc(3))*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',(Omxc(2)+Omxc(3))*HaToeV, ' eV'
|
|
||||||
! write(*,*)
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',(OmxDD(2)+OmxDD(3))*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',(OmcDD(2)+OmcDD(3))*HaToeV, ' eV'
|
|
||||||
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',(OmxcDD(2)+OmxcDD(3))*HaToeV,' eV'
|
|
||||||
! write(*,*)
|
|
||||||
!
|
|
||||||
! write(*,'(A60)') '-------------------------------------------------'
|
|
||||||
|
|
||||||
! write(*,*)
|
|
||||||
|
|
||||||
end subroutine print_unrestricted_individual_energy
|
end subroutine print_unrestricted_individual_energy
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine read_options_dft(nBas,method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,aCC_w1,aCC_w2, &
|
subroutine read_options_dft(nBas,method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,nCC,aCC, &
|
||||||
doNcentered,occnum,Cx_choice)
|
doNcentered,occnum,Cx_choice)
|
||||||
|
|
||||||
! Read DFT options
|
! Read DFT options
|
||||||
@ -14,10 +14,11 @@ subroutine read_options_dft(nBas,method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,
|
|||||||
|
|
||||||
integer :: iBas
|
integer :: iBas
|
||||||
integer :: iEns
|
integer :: iEns
|
||||||
integer :: iParam
|
integer :: iCC
|
||||||
character(len=1) :: answer
|
character(len=1) :: answer
|
||||||
double precision,allocatable :: nEl(:)
|
double precision,allocatable :: nEl(:)
|
||||||
character(len=12) :: x_func,c_func
|
character(len=12) :: x_func
|
||||||
|
character(len=12) :: c_func
|
||||||
|
|
||||||
! Output variables
|
! Output variables
|
||||||
|
|
||||||
@ -28,8 +29,8 @@ subroutine read_options_dft(nBas,method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,
|
|||||||
integer,intent(out) :: nEns
|
integer,intent(out) :: nEns
|
||||||
logical,intent(out) :: doNcentered
|
logical,intent(out) :: doNcentered
|
||||||
double precision,intent(out) :: wEns(maxEns)
|
double precision,intent(out) :: wEns(maxEns)
|
||||||
double precision,intent(out) :: aCC_w1(3)
|
integer,intent(out) :: nCC
|
||||||
double precision,intent(out) :: aCC_w2(3)
|
double precision,intent(out) :: aCC(maxCC,maxEns-1)
|
||||||
double precision,intent(out) :: occnum(nBas,nspin,maxEns)
|
double precision,intent(out) :: occnum(nBas,nspin,maxEns)
|
||||||
|
|
||||||
integer,intent(out) :: Cx_choice
|
integer,intent(out) :: Cx_choice
|
||||||
@ -394,22 +395,24 @@ subroutine read_options_dft(nBas,method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,
|
|||||||
|
|
||||||
! Read parameters for weight-dependent functional
|
! Read parameters for weight-dependent functional
|
||||||
read(1,*)
|
read(1,*)
|
||||||
read(1,*) (aCC_w1(iParam),iParam=1,3)
|
read(1,*) nCC
|
||||||
read(1,*) (aCC_w2(iParam),iParam=1,3)
|
do iEns=2,nEns
|
||||||
|
read(1,*) (aCC(iCC,iEns-1),iCC=1,nCC)
|
||||||
|
end do
|
||||||
|
|
||||||
! Read choice of exchange coefficient
|
! Read choice of exchange coefficient
|
||||||
read(1,*)
|
read(1,*)
|
||||||
read(1,*) Cx_choice
|
read(1,*) Cx_choice
|
||||||
|
|
||||||
write(*,*)'----------------------------------------------------------'
|
write(*,*)'----------------------------------------------------------'
|
||||||
write(*,*)' parameters for w1-dependent exchange functional coefficient '
|
write(*,*)' Parameters for weight-dependent exchange functional '
|
||||||
write(*,*)'----------------------------------------------------------'
|
write(*,*)'----------------------------------------------------------'
|
||||||
call matout(3,1,aCC_w1)
|
do iEns=2,nEns
|
||||||
write(*,*)
|
write(*,'(A6,I2,A2)') 'State ',iEns,':'
|
||||||
|
do iCC=1,nCC
|
||||||
write(*,*)'----------------------------------------------------------'
|
write(*,'(I2,F10.6)') iCC,aCC(iCC,iEns-1)
|
||||||
write(*,*)' parameters for w2-dependent exchange functional coefficient '
|
end do
|
||||||
write(*,*)'----------------------------------------------------------'
|
end do
|
||||||
call matout(3,1,aCC_w2)
|
|
||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
! Close file with options
|
! Close file with options
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,P,FxHF, &
|
subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P,FxHF, &
|
||||||
rho,drho,Ex,Cx_choice)
|
rho,drho,Ex,Cx_choice,doNcentered)
|
||||||
|
|
||||||
! Compute the exchange energy
|
! Compute the exchange energy
|
||||||
|
|
||||||
@ -13,8 +13,8 @@ subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,aCC_w1,a
|
|||||||
logical,intent(in) :: LDA_centered
|
logical,intent(in) :: LDA_centered
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: wEns(nEns)
|
double precision,intent(in) :: wEns(nEns)
|
||||||
double precision,intent(in) :: aCC_w1(3)
|
integer,intent(in) :: nCC
|
||||||
double precision,intent(in) :: aCC_w2(3)
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
double precision,intent(in) :: weight(nGrid)
|
double precision,intent(in) :: weight(nGrid)
|
||||||
integer,intent(in) :: nBas
|
integer,intent(in) :: nBas
|
||||||
@ -23,6 +23,7 @@ subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,aCC_w1,a
|
|||||||
double precision,intent(in) :: rho(nGrid)
|
double precision,intent(in) :: rho(nGrid)
|
||||||
double precision,intent(in) :: drho(ncart,nGrid)
|
double precision,intent(in) :: drho(ncart,nGrid)
|
||||||
integer,intent(in) :: Cx_choice
|
integer,intent(in) :: Cx_choice
|
||||||
|
logical,intent(in) :: doNcentered
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
@ -42,8 +43,8 @@ subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,aCC_w1,a
|
|||||||
|
|
||||||
case(1)
|
case(1)
|
||||||
|
|
||||||
call unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,&
|
call unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,&
|
||||||
rho,Ex,Cx_choice)
|
rho,Ex,Cx_choice,doNcentered)
|
||||||
|
|
||||||
! GGA functionals
|
! GGA functionals
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,aCC_w1,a
|
|||||||
|
|
||||||
case(4)
|
case(4)
|
||||||
|
|
||||||
call unrestricted_hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,P,FxHF, &
|
call unrestricted_hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P,FxHF, &
|
||||||
rho,drho,Ex,Cx_choice)
|
rho,drho,Ex,Cx_choice)
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine unrestricted_exchange_potential(rung,DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,P, &
|
subroutine unrestricted_exchange_potential(rung,DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P, &
|
||||||
ERI,AO,dAO,rho,drho,Fx,FxHF,Cx_choice)
|
ERI,AO,dAO,rho,drho,Fx,FxHF,Cx_choice,doNcentered)
|
||||||
|
|
||||||
! Compute the exchange potential
|
! Compute the exchange potential
|
||||||
|
|
||||||
@ -13,8 +13,8 @@ subroutine unrestricted_exchange_potential(rung,DFA,LDA_centered,nEns,wEns,aCC_w
|
|||||||
logical,intent(in) :: LDA_centered
|
logical,intent(in) :: LDA_centered
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: wEns(nEns)
|
double precision,intent(in) :: wEns(nEns)
|
||||||
double precision,intent(in) :: aCC_w1(3)
|
integer,intent(in) :: nCC
|
||||||
double precision,intent(in) :: aCC_w2(3)
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
double precision,intent(in) :: weight(nGrid)
|
double precision,intent(in) :: weight(nGrid)
|
||||||
integer,intent(in) :: nBas
|
integer,intent(in) :: nBas
|
||||||
@ -25,6 +25,7 @@ subroutine unrestricted_exchange_potential(rung,DFA,LDA_centered,nEns,wEns,aCC_w
|
|||||||
double precision,intent(in) :: rho(nGrid)
|
double precision,intent(in) :: rho(nGrid)
|
||||||
double precision,intent(in) :: drho(ncart,nGrid)
|
double precision,intent(in) :: drho(ncart,nGrid)
|
||||||
integer,intent(in) :: Cx_choice
|
integer,intent(in) :: Cx_choice
|
||||||
|
logical,intent(in) :: doNcentered
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
@ -49,7 +50,8 @@ subroutine unrestricted_exchange_potential(rung,DFA,LDA_centered,nEns,wEns,aCC_w
|
|||||||
|
|
||||||
case(1)
|
case(1)
|
||||||
|
|
||||||
call unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx,Cx_choice)
|
call unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,Fx,&
|
||||||
|
Cx_choice,doNcentered)
|
||||||
|
|
||||||
! GGA functionals
|
! GGA functionals
|
||||||
|
|
||||||
@ -67,7 +69,7 @@ subroutine unrestricted_exchange_potential(rung,DFA,LDA_centered,nEns,wEns,aCC_w
|
|||||||
|
|
||||||
case(4)
|
case(4)
|
||||||
|
|
||||||
call unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,P, &
|
call unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P, &
|
||||||
ERI,AO,dAO,rho,drho,Fx,FxHF,Cx_choice)
|
ERI,AO,dAO,rho,drho,Fx,FxHF,Cx_choice)
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
@ -150,21 +150,6 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
|
|||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
|
||||||
! Checking Hartree contributions for each individual states
|
|
||||||
!------------------------------------------------------------------------
|
|
||||||
|
|
||||||
! print*,'Hartree contributions for each individual states'
|
|
||||||
! print*,''
|
|
||||||
! print*,''
|
|
||||||
! print*,'EJ(aa,1)=',EJ(1,1),'EJ(ab,1)=',EJ(2,1),'EJ(bb,1)=',EJ(3,1)
|
|
||||||
! print*,''
|
|
||||||
! print*,'EJ(aa,2)=',EJ(1,2),'EJ(ab,2)=',EJ(2,2),'EJ(bb,2)=',EJ(3,2)
|
|
||||||
! print*,''
|
|
||||||
! print*,'EJ(aa,3)=',EJ(1,3),'EJ(ab,3)=',EJ(2,3),'EJ(bb,3)=',EJ(3,3)
|
|
||||||
! print*,''
|
|
||||||
|
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Individual exchange energy
|
! Individual exchange energy
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
@ -175,37 +160,10 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
|
|||||||
Pw(:,:,ispin),P(:,:,ispin,iEns),rhow(:,ispin),drhow(:,:,ispin), &
|
Pw(:,:,ispin),P(:,:,ispin,iEns),rhow(:,ispin),drhow(:,:,ispin), &
|
||||||
rho(:,ispin,iEns),drho(:,:,ispin,iEns),Cx_choice,doNcentered,kappa(iEns), &
|
rho(:,ispin,iEns),drho(:,:,ispin,iEns),Cx_choice,doNcentered,kappa(iEns), &
|
||||||
Ex(ispin,iEns))
|
Ex(ispin,iEns))
|
||||||
|
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
|
||||||
! Checking exchange contributions for each individual states
|
|
||||||
!------------------------------------------------------------------------
|
|
||||||
! print*,''
|
|
||||||
! print*,''
|
|
||||||
! print*,'Exchange contributions for each individual states'
|
|
||||||
! print*,''
|
|
||||||
! print*,''
|
|
||||||
! print*,'Ex(aa,1) =' ,Ex(1,1),'Ex(bb,1) =' ,Ex(2,1)
|
|
||||||
! print*,''
|
|
||||||
! print*,'Ex(aa,2) =' ,Ex(1,2),'Ex(bb,2) =' ,Ex(2,2)
|
|
||||||
! print*,''
|
|
||||||
! print*,'Ex(aa,3) =' ,Ex(1,3),'Ex(bb,3) =' ,Ex(2,3)
|
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
|
||||||
! Checking number of alpha and beta electrons for each individual states
|
|
||||||
!------------------------------------------------------------------------
|
|
||||||
! print*,''
|
|
||||||
! print*,''
|
|
||||||
! print*,'Checking number of alpha and beta electrons for each individual states'
|
|
||||||
! print*,''
|
|
||||||
! print*,''
|
|
||||||
! print*,'nEl(a,1) = ',electron_number(nGrid,weight,rho(:,1,1)),'nEl(b,1) = ',electron_number(nGrid,weight,rho(:,2,1))
|
|
||||||
! print*,''
|
|
||||||
! print*,'nEl(a,2) = ',electron_number(nGrid,weight,rho(:,1,2)),'nEl(b,2) = ',electron_number(nGrid,weight,rho(:,2,2))
|
|
||||||
! print*,''
|
|
||||||
! print*,'nEl(a,3) = ',electron_number(nGrid,weight,rho(:,1,3)),'nEl(b,3) = ',electron_number(nGrid,weight,rho(:,2,3))
|
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Individual correlation energy
|
! Individual correlation energy
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,Cx_choice)
|
subroutine unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,rho,Ex,Cx_choice,doNcentered)
|
||||||
|
|
||||||
! Select LDA exchange functional
|
! Select LDA exchange functional
|
||||||
|
|
||||||
@ -11,12 +11,13 @@ subroutine unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aC
|
|||||||
logical,intent(in) :: LDA_centered
|
logical,intent(in) :: LDA_centered
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: wEns(nEns)
|
double precision,intent(in) :: wEns(nEns)
|
||||||
double precision,intent(in) :: aCC_w1(3)
|
integer,intent(in) :: nCC
|
||||||
double precision,intent(in) :: aCC_w2(3)
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
double precision,intent(in) :: weight(nGrid)
|
double precision,intent(in) :: weight(nGrid)
|
||||||
double precision,intent(in) :: rho(nGrid)
|
double precision,intent(in) :: rho(nGrid)
|
||||||
integer,intent(in) :: Cx_choice
|
integer,intent(in) :: Cx_choice
|
||||||
|
logical,intent(in) :: doNcentered
|
||||||
|
|
||||||
! Output variables
|
! Output variables
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ subroutine unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aC
|
|||||||
|
|
||||||
case (2)
|
case (2)
|
||||||
|
|
||||||
call UCC_lda_exchange_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,Cx_choice)
|
call UCC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex)
|
||||||
|
|
||||||
case default
|
case default
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx,Cx_choice)
|
subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,Fx &
|
||||||
|
,Cx_choice,doNcentered)
|
||||||
|
|
||||||
! Select LDA correlation potential
|
! Select LDA correlation potential
|
||||||
|
|
||||||
@ -12,14 +13,15 @@ subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,aCC_w1
|
|||||||
integer,intent(in) :: DFA
|
integer,intent(in) :: DFA
|
||||||
integer,intent(in) :: nEns
|
integer,intent(in) :: nEns
|
||||||
double precision,intent(in) :: wEns(nEns)
|
double precision,intent(in) :: wEns(nEns)
|
||||||
double precision,intent(in) :: aCC_w1(3)
|
integer,intent(in) :: nCC
|
||||||
double precision,intent(in) :: aCC_w2(3)
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
double precision,intent(in) :: weight(nGrid)
|
double precision,intent(in) :: weight(nGrid)
|
||||||
integer,intent(in) :: nBas
|
integer,intent(in) :: nBas
|
||||||
double precision,intent(in) :: AO(nBas,nGrid)
|
double precision,intent(in) :: AO(nBas,nGrid)
|
||||||
double precision,intent(in) :: rho(nGrid)
|
double precision,intent(in) :: rho(nGrid)
|
||||||
integer,intent(in) :: Cx_choice
|
integer,intent(in) :: Cx_choice
|
||||||
|
logical,intent(in) :: doNcentered
|
||||||
|
|
||||||
! Output variables
|
! Output variables
|
||||||
|
|
||||||
@ -35,7 +37,7 @@ subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,aCC_w1
|
|||||||
|
|
||||||
case (2)
|
case (2)
|
||||||
|
|
||||||
call UCC_lda_exchange_potential(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx,Cx_choice)
|
call UCC_lda_exchange_potential(nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,Fx,Cx_choice,doNcentered)
|
||||||
|
|
||||||
case default
|
case default
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user