4
1
mirror of https://github.com/pfloos/quack synced 2024-11-19 04:22:39 +01:00

commit for clotilde weight-dependent functionals

This commit is contained in:
Clotilde Marut 2021-11-10 09:48:33 +01:00
parent 388db3ca6e
commit d2182e22d7
11 changed files with 287 additions and 190 deletions

View File

@ -4,38 +4,38 @@
# Hartree = 0: H # Hartree = 0: H
# LDA = 1: S51,CC-S51 # LDA = 1: S51,CC-S51
# 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 CC-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 1
# Number of states in ensemble (nEns) # Number of states in ensemble (nEns)
4
# 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
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 0
1 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
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
# Ensemble weights: wEns(1),...,wEns(nEns-1)
0.00 0.00 1.00
# N-centered?
F
# Parameters for CC weight-dependent exchange functional
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
2 2
# 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 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 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 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 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 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 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 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 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 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 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 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 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 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)
0.0 0.0 0.0
# Ncentered ?
T
# Parameters for CC weight-dependent exchange functional
-0.766201 -0.155585 0.00130104
0.00 0.00 0.00 0.00
# choice of UCC exchange coefficient : 1 for Cx1, 2 for Cx2, 3 for Cx1*Cx2
1

View File

@ -60,28 +60,59 @@ subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,aCC_w1,aCC_w2,nGr
w1 = wEns(2) w1 = wEns(2)
w2 = wEns(3) w2 = wEns(3)
select case (Cx_choice)
case(1) if (doNcentered) then
dCxdw1 = (0.5d0*b1 + (2d0*a1 + 0.5d0*c1)*(w1 - 0.5d0) - (1d0 - w1)*w1*(3d0*b1 + 4d0*c1*(w1 - 0.5d0)))
dCxdw2 = 0.d0 select case (Cx_choice)
case(2) case(1)
dCxdw1 = 0.d0 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.5d0*b2 + (2d0*a2 + 0.5d0*c2)*(w2 - 0.5d0) - (1d0 - w2)*w2*(3d0*b2 + 4d0*c2*(w2 - 0.5d0))) dCxdw2 = 0.d0
case(3) case(2)
dCxdw1 = (0.5d0*b1 + (2d0*a1 + 0.5d0*c1)*(w1 - 0.5d0) - (1d0 - w1)*w1*(3d0*b1 + 4d0*c1*(w1 - 0.5d0))) & dCxdw1 = 0.d0
* (1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)) 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
dCxdw2 = (1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)) & case(3)
* (0.5d0*b2 + (2d0*a2 + 0.5d0*c2)*(w2 - 0.5d0) - (1d0 - w2)*w2*(3d0*b2 + 4d0*c2*(w2 - 0.5d0))) 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))
case default dCxdw2 = (1d0 - w1*(2d0 - w1)*(a1 + b1*(w1 - 1.d0) + c1*(w1 - 1.d0)**2)) &
dCxdw1 = 0d0 * (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)
dCxdw2 = 0d0
case default
dCxdw1 = 0d0
dCxdw2 = 0d0
end select
else
select case (Cx_choice)
case(1)
dCxdw1 = (0.5d0*b1 + (2d0*a1 + 0.5d0*c1)*(w1 - 0.5d0) - (1d0 - w1)*w1*(3d0*b1 + 4d0*c1*(w1 - 0.5d0)))
dCxdw2 = 0.d0
case(2)
dCxdw1 = 0.d0
dCxdw2 =(0.5d0*b2 + (2d0*a2 + 0.5d0*c2)*(w2 - 0.5d0) - (1d0 - w2)*w2*(3d0*b2 + 4d0*c2*(w2 - 0.5d0)))
case(3)
dCxdw1 = (0.5d0*b1 + (2d0*a1 + 0.5d0*c1)*(w1 - 0.5d0) - (1d0 - w1)*w1*(3d0*b1 + 4d0*c1*(w1 - 0.5d0))) &
* (1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2))
dCxdw2 = (1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)) &
* (0.5d0*b2 + (2d0*a2 + 0.5d0*c2)*(w2 - 0.5d0) - (1d0 - w2)*w2*(3d0*b2 + 4d0*c2*(w2 - 0.5d0)))
case default
dCxdw1 = 0d0
dCxdw2 = 0d0
end select
end if
end select
dCxdw1 = CxLSDA*dCxdw1 dCxdw1 = CxLSDA*dCxdw1
dCxdw2 = CxLSDA*dCxdw2 dCxdw2 = CxLSDA*dCxdw2

View File

@ -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,aCC_w1,aCC_w2,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
@ -15,6 +15,7 @@ subroutine UCC_lda_exchange_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,C
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
@ -68,11 +69,24 @@ subroutine UCC_lda_exchange_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,C
! 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
w1 = wEns(2) if(doNcentered) then
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
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)
w2 = wEns(3) else
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
w1 = wEns(2)
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
w2 = wEns(3)
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
endif
select case (Cx_choice) select case (Cx_choice)

View File

@ -17,13 +17,14 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
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
@ -50,11 +51,24 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
b2 = aCC_w2(2) b2 = aCC_w2(2)
c2 = aCC_w2(3) c2 = aCC_w2(3)
w1 = wEns(2) if(doNcentered) then
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
w2 = wEns(3) w1 = wEns(2)
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**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)
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
w2 = wEns(3)
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
endif
select case (Cx_choice) select case (Cx_choice)
@ -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

View File

@ -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,aCC_w1,aCC_w2,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
@ -17,6 +17,7 @@ subroutine UCC_lda_exchange_potential(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,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
@ -70,11 +71,23 @@ subroutine UCC_lda_exchange_potential(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,
! 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
w1 = wEns(2) if(doNcentered) then
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
w2 = wEns(3) w1 = wEns(2)
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**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)
Fx1 = 1d0 - w1*(1d0 - w1)*(a1 + b1*(w1 - 0.5d0) + c1*(w1 - 0.5d0)**2)
w2 = wEns(3)
Fx2 = 1d0 - w2*(1d0 - w2)*(a2 + b2*(w2 - 0.5d0) + c2*(w2 - 0.5d0)**2)
endif
select case (Cx_choice) select case (Cx_choice)

View File

@ -261,7 +261,7 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
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(:),aCC_w1,aCC_w2,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
@ -339,7 +339,8 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
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,aCC_w1,aCC_w2,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

View File

@ -149,134 +149,134 @@ 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' write(*,'(A43,F16.10,A4)') ' Ionization Potential 1 -> 2:',Omaux(2)+OmxcDD(2),' au'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(2), ' au' write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(2), ' au'
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2), ' au' write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2), ' au'
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2), ' au' write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2), ' au'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2),' au' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2),' au'
! write(*,*) write(*,*)
! write(*,'(A43,F16.10,A4)') ' Electronic Affinity 1 -> 3:',-(Omaux(3)+OmxcDD(3)),' 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)') ' auxiliary energy contribution : ',-Omaux(3), ' au'
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',-OmxDD(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)') ' c ensemble derivative : ',-OmcDD(3), ' au'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3),' au' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3),' au'
! write(*,*) write(*,*)
! write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',Omaux(2)+OmxcDD(2)+(Omaux(3)+OmxcDD(3)),' au' write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',Omaux(2)+OmxcDD(2)+(Omaux(3)+OmxcDD(3)),' au'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(2)+Omaux(3), ' au' 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)') ' 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)') ' c ensemble derivative : ',OmcDD(2)+OmcDD(3), ' au'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)+OmxcDD(3),' au' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)+OmxcDD(3),' au'
! write(*,*) write(*,*)
! write(*,'(A60)') '-------------------------------------------------' write(*,'(A60)') '-------------------------------------------------'
! write(*,*) write(*,*)
! write(*,'(A40,F16.10,A3)') ' Ionization Potential 1 -> 2:',(Omaux(2)+OmxcDD(2))*HaToeV,' eV' write(*,'(A40,F16.10,A3)') ' Ionization Potential 1 -> 2:',(Omaux(2)+OmxcDD(2))*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(2)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2)*HaToeV, ' eV' write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2)*HaToeV, ' eV' write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)*HaToeV,' eV' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)*HaToeV,' eV'
! write(*,*) write(*,*)
! write(*,'(A40,F16.10,A3)') ' Electronic Affinity 1 -> 3:',-(Omaux(3)+OmxcDD(3))*HaToeV,' eV' write(*,'(A40,F16.10,A3)') ' Electronic Affinity 1 -> 3:',-(Omaux(3)+OmxcDD(3))*HaToeV,' eV'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',-Omaux(3)*HaToeV, ' eV' 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)') ' x ensemble derivative : ',-OmxDD(3)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',-OmcDD(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(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3)*HaToeV,' eV'
! write(*,*) write(*,*)
! write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',(Omaux(2)+OmxcDD(2)+(Omaux(3)+OmxcDD(3)))*HaToeV,' eV' write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',(Omaux(2)+OmxcDD(2)+(Omaux(3)+OmxcDD(3)))*HaToeV,' eV'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',(Omaux(2)+Omaux(3))*HaToeV, ' eV' 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)') ' 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)') ' c ensemble derivative : ',(OmcDD(2)+OmcDD(3))*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',(OmxcDD(2)+OmxcDD(3))*HaToeV,' eV' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',(OmxcDD(2)+OmxcDD(3))*HaToeV,' eV'
! write(*,*) 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' write(*,'(A43,F16.10,A4)') ' Ionization Potential 1 -> 2:',Om(2), ' au'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(2), ' au' write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(2), ' au'
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(2), ' au' write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(2), ' au'
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(2), ' au' write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(2), ' au'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2), ' au' write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2), ' au'
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2), ' au' write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2), ' au'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2),' au' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2),' au'
! write(*,*) write(*,*)
! write(*,'(A43,F16.10,A4)') ' Electronic Affinity 1 -> 3:',-Om(3), ' 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)') ' x energy contribution : ',-Omx(3), ' au'
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',-Omc(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(*,'(A44, F16.10,A3)') ' xc energy contribution : ',-Omxc(3), ' au'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',-OmxDD(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)') ' c ensemble derivative : ',-OmcDD(3), ' au'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3),' au' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3),' au'
! write(*,*) write(*,*)
! write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',Om(2)+Om(3), ' au' write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',Om(2)+Om(3), ' au'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',Omx(2)+Omx(3), ' au' 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)') ' c energy contribution : ',Omc(2)+Omc(3), ' au'
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(2)+Omxc(3), ' au' write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(2)+Omxc(3), ' au'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(2)+OmxDD(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)') ' c ensemble derivative : ',OmcDD(2)+OmcDD(3), ' au'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)+OmxcDD(3),' au' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)+OmxcDD(3),' au'
! write(*,*) write(*,*)
! write(*,'(A60)') '-------------------------------------------------' write(*,'(A60)') '-------------------------------------------------'
! write(*,'(A43,F16.10,A4)') ' Ionization Potential 1 -> 2:',Om(2)*HaToeV, ' eV' write(*,'(A43,F16.10,A4)') ' Ionization Potential 1 -> 2:',Om(2)*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(2)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(2)*HaToeV, ' eV' write(*,'(A44, F16.10,A3)') ' c energy contribution : ',Omc(2)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(2)*HaToeV, ' eV' write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',Omxc(2)*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(2)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2)*HaToeV, ' eV' write(*,'(A44, F16.10,A3)') ' c ensemble derivative : ',OmcDD(2)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)*HaToeV,' eV' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',OmxcDD(2)*HaToeV,' eV'
! write(*,*) write(*,*)
! write(*,'(A43,F16.10,A4)') ' Electronic Affinity 1 -> 3:',-Om(3)*HaToeV, ' eV' write(*,'(A43,F16.10,A4)') ' Electronic Affinity 1 -> 3:',-Om(3)*HaToeV, ' eV'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',-Omx(3)*HaToeV, ' eV' write(*,'(A44, F16.10,A3)') ' x energy contribution : ',-Omx(3)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' c energy contribution : ',-Omc(3)*HaToeV, ' eV' 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(*,'(A44, F16.10,A3)') ' xc energy contribution : ',-Omxc(3)*HaToeV, ' eV'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',-OmxDD(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)') ' c ensemble derivative : ',-OmcDD(3)*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3)*HaToeV,' eV' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',-OmxcDD(3)*HaToeV,' eV'
! write(*,*) write(*,*)
! write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',(Om(2)+Om(3))*HaToeV, ' eV' write(*,'(A43,F16.10,A4)') ' Fundamental Gap :',(Om(2)+Om(3))*HaToeV, ' eV'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' x energy contribution : ',(Omx(2)+Omx(3))*HaToeV, ' eV' 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)') ' c energy contribution : ',(Omc(2)+Omc(3))*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',(Omxc(2)+Omxc(3))*HaToeV, ' eV' write(*,'(A44, F16.10,A3)') ' xc energy contribution : ',(Omxc(2)+Omxc(3))*HaToeV, ' eV'
! write(*,*) write(*,*)
! write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',(OmxDD(2)+OmxDD(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)') ' c ensemble derivative : ',(OmcDD(2)+OmcDD(3))*HaToeV, ' eV'
! write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',(OmxcDD(2)+OmxcDD(3))*HaToeV,' eV' write(*,'(A44, F16.10,A3)') ' xc ensemble derivative : ',(OmxcDD(2)+OmxcDD(3))*HaToeV,' eV'
! write(*,*) write(*,*)
!
! write(*,'(A60)') '-------------------------------------------------' write(*,'(A60)') '-------------------------------------------------'
! write(*,*) write(*,*)
end subroutine print_unrestricted_individual_energy end subroutine print_unrestricted_individual_energy

View File

@ -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,aCC_w1,aCC_w2,nGrid,weight,nBas,P,FxHF, &
rho,drho,Ex,Cx_choice) rho,drho,Ex,Cx_choice,doNcentered)
! Compute the exchange energy ! Compute the exchange energy
@ -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
@ -43,7 +44,7 @@ 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,aCC_w1,aCC_w2,nGrid,weight,&
rho,Ex,Cx_choice) rho,Ex,Cx_choice,doNcentered)
! GGA functionals ! GGA functionals

View File

@ -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,aCC_w1,aCC_w2,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
@ -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,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx,&
Cx_choice,doNcentered)
! GGA functionals ! GGA functionals

View File

@ -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,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,Cx_choice,doNcentered)
! Select LDA exchange functional ! Select LDA exchange functional
@ -17,6 +17,7 @@ subroutine unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aC
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,aCC_w1,aCC_w2,nGrid,weight,rho,Cx_choice,doNcentered,Ex)
case default case default

View File

@ -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,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx &
,Cx_choice,doNcentered)
! Select LDA correlation potential ! Select LDA correlation potential
@ -20,6 +21,7 @@ subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,aCC_w1
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,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx,Cx_choice,doNcentered)
case default case default