10
1
mirror of https://github.com/pfloos/quack synced 2024-12-23 04:43:42 +01:00

clean up CC-S51 functional

This commit is contained in:
Pierre-Francois Loos 2021-11-24 11:53:25 +01:00
parent aadf942f83
commit b0413b1d13
4 changed files with 14 additions and 67 deletions

View File

@ -44,14 +44,13 @@ subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,nCC,aCC,nGrid,wei
allocate(dExdw(nEns)) allocate(dExdw(nEns))
! Parameters for N -> N-1 ! Parameters for first state
a1 = aCC(1,1) a1 = aCC(1,1)
b1 = aCC(2,1) b1 = aCC(2,1)
c1 = aCC(3,1) c1 = aCC(3,1)
! Parameters for second state
! Parameters for N -> N+1
a2 = aCC(1,2) a2 = aCC(1,2)
b2 = aCC(2,2) b2 = aCC(2,2)
@ -60,6 +59,7 @@ subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,nCC,aCC,nGrid,wei
w1 = wEns(2) w1 = wEns(2)
w2 = wEns(3) w2 = wEns(3)
! Defining enhancements factor for weight-dependent functionals
if (doNcentered) then if (doNcentered) then
@ -88,7 +88,6 @@ subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,nCC,aCC,nGrid,wei
else else
select case (Cx_choice) select case (Cx_choice)
case(1) case(1)

View File

@ -30,44 +30,19 @@ subroutine UCC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,
double precision :: Ex double precision :: Ex
! Single excitation parameter ! Parameters for first state
! a1 = 0.0d0
! b1 = 0.0d0
! c1 = 0.0d0
! Parameters for H2 at equilibrium
! a2 = +0.5751782560799208d0
! b2 = -0.021108186591137282d0
! c2 = -0.36718902716347124d0
! Parameters for stretch H2
! a2 = + 0.01922622507087411d0
! b2 = - 0.01799647558018601d0
! c2 = - 0.022945430666782573d0
! Parameters for He
! a2 = 1.9125735895875828d0
! b2 = 2.715266992840757d0
! c2 = 2.1634223380633086d0
! Parameters for He N -> N-1
a1 = aCC(1,1) a1 = aCC(1,1)
b1 = aCC(2,1) b1 = aCC(2,1)
c1 = aCC(3,1) c1 = aCC(3,1)
! Parameters for He N -> N+1 ! Parameters for second state
a2 = aCC(1,2) a2 = aCC(1,2)
b2 = aCC(2,2) b2 = aCC(2,2)
c2 = aCC(3,2) c2 = aCC(3,2)
! Fx1 for states N and N-1 ! Defining enhancements factor for weight-dependent functionals
! Fx2 for states N and N+1
if(doNcentered) then if(doNcentered) then
@ -79,7 +54,6 @@ subroutine UCC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,
else 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)
@ -112,9 +86,7 @@ subroutine UCC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,
r = max(0d0,rho(iG)) r = max(0d0,rho(iG))
if(r > threshold) then if(r > threshold) Ex = Ex + weight(iG)*Cx*r**(4d0/3d0)
Ex = Ex + weight(iG)*Cx*r**(4d0/3d0)
endif
enddo enddo

View File

@ -39,18 +39,20 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho
double precision,external :: electron_number double precision,external :: electron_number
! Parameters for N -> N-1 ! Parameters for first state
a1 = aCC(1,1) a1 = aCC(1,1)
b1 = aCC(2,1) b1 = aCC(2,1)
c1 = aCC(3,1) c1 = aCC(3,1)
! Parameters for N -> N+1 ! Parameters for second state
a2 = aCC(1,2) a2 = aCC(1,2)
b2 = aCC(2,2) b2 = aCC(2,2)
c2 = aCC(3,2) c2 = aCC(3,2)
! Defining enhancements factor for weight-dependent functionals
if(doNcentered) then if(doNcentered) then
w1 = wEns(2) w1 = wEns(2)
@ -61,7 +63,6 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho
else 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)

View File

@ -32,44 +32,19 @@ subroutine UCC_lda_exchange_potential(nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho
double precision,intent(out) :: Fx(nBas,nBas) double precision,intent(out) :: Fx(nBas,nBas)
! Single excitation parameter ! Parameters for first state
! a1 = 0.0d0
! b1 = 0.0d0
! c1 = 0.0d0
! Parameters for H2 at equilibrium
! a2 = +0.5751782560799208d0
! b2 = -0.021108186591137282d0
! c2 = -0.36718902716347124d0
! Parameters for stretch H2
! a2 = + 0.01922622507087411d0
! b2 = - 0.01799647558018601d0
! c2 = - 0.022945430666782573d0
! Parameters for He
! a2 = 1.9125735895875828d0
! b2 = 2.715266992840757d0
! c2 = 2.1634223380633086d0
! Parameters for He N -> N-1
a1 = aCC(1,1) a1 = aCC(1,1)
b1 = aCC(2,1) b1 = aCC(2,1)
c1 = aCC(3,1) c1 = aCC(3,1)
! Parameters for He N -> N+1 ! Parameters for second state
a2 = aCC(1,2) a2 = aCC(1,2)
b2 = aCC(2,2) b2 = aCC(2,2)
c2 = aCC(3,2) c2 = aCC(3,2)
! Fx1 for states N and N-1 ! Defining enhancements factor for weight-dependent functionals
! Fx2 for states N and N+1
if(doNcentered) then if(doNcentered) then