The Elk Code
x_pbe.f90
Go to the documentation of this file.
1 
2 ! This routine is based on code written by K. Burke.
3 
4 elemental subroutine x_pbe(kappa,mu,rho,s,u,v,ex,vx)
5 implicit none
6 ! arguments
7 real(8), intent(in) :: kappa,mu
8 real(8), intent(in) :: rho,s,u,v
9 real(8), intent(out) :: ex,vx
10 ! local variables
11 real(8), parameter :: ax=-0.7385587663820224058d0
12 real(8), parameter :: thrd=1.d0/3.d0
13 real(8), parameter :: thrd4=4.d0/3.d0
14 real(8) ul,exu,s2,p0
15 real(8) fxpbe,fs,fss
16 ul=mu/kappa
17 ! LDA exchange energy density
18 exu=ax*rho**thrd
19 ! PBE enhancement factor
20 s2=s**2
21 p0=1.d0+ul*s2
22 fxpbe=1.d0+kappa-kappa/p0
23 ex=exu*fxpbe
24 fs=2.d0*kappa*ul/(p0*p0)
25 fss=-4.d0*ul*s*fs/p0
26 ! exchange potential
27 vx=exu*(thrd4*fxpbe-(u-thrd4*s2*s)*fss-v*fs)
28 end subroutine
29 
elemental subroutine x_pbe(kappa, mu, rho, s, u, v, ex, vx)
Definition: x_pbe.f90:5