c---------------------------------------------------------------------- subroutine CORPBE2(RS,ZET,T,UU,VV,WW,lgga,lpot,ec,vcup,vcdn, 1 H,DVCUP,DVCDN) c Official PBE correlation code. c c c author: K. Burke, May 14, 1996. C INPUT: RS=SEITZ RADIUS=(3/4pi rho)^(1/3) C : ZET=RELATIVE SPIN POLARIZATION = (rhoup-rhodn)/rho C : t=ABS(GRAD rho)/(rho*2.*KS*G) -- only needed for PBE C : UU=(GRAD rho)*GRAD(ABS(GRAD rho))/(rho**2 * (2*KS*G)**3) C : VV=(LAPLACIAN rho)/(rho * (2*KS*G)**2) C : WW=(GRAD rho)*(GRAD ZET)/(rho * (2*KS*G)**2 c : UU,VV,WW, only needed for PBE potential c : lgga=flag to do gga (0=>LSD only) c : lpot=flag to do potential (0=>energy only) c output: ec=lsd correlation energy from [a] c : vcup=lsd up correlation potential c : vcdn=lsd dn correlation potential c : h=NONLOCAL PART OF CORRELATION ENERGY PER ELECTRON c : dvcup=nonlocal correction to vcup c : dvcdn=nonlocal correction to vcdn c calls: -- c---------------------------------------------------------------------- c---------------------------------------------------------------------- c References: c [a] J.P.~Perdew, K.~Burke, and M.~Ernzerhof, c {\sl Generalized gradient approximation made simple}, sub. c to Phys. Rev.Lett. May 1996. c [b] J. P. Perdew, K. Burke, and Y. Wang, {\sl Real-space cutoff c construction of a generalized gradient approximation: The PW91 c density functional}, submitted to Phys. Rev. B, Feb. 1996. c [c] J. P. Perdew and Y. Wang, Phys. Rev. B {\bf 45}, 13244 (1992). c---------------------------------------------------------------------- c---------------------------------------------------------------------- c thrd*=various multiples of 1/3 c numbers for use in LSD energy spin-interpolation formula, [c](9). c GAM= 2^(4/3)-2 c FZZ=f''(0)= 8/(9*GAM) c numbers for construction of PBE c gamma=(1-log(2))/pi^2 c bet=coefficient in gradient expansion for correlation, [a](4). c eta=small number to stop d phi/ dzeta from blowing up at c |zeta|=1. IMPLICIT REAL*8 (A-H,O-Z) parameter(thrd=1.d0/3.d0,thrdm=-thrd,thrd2=2.d0*thrd) parameter(sixthm=thrdm/2.d0) parameter(thrd4=4.d0*thrd) parameter(GAM=0.5198420997897463295344212145565d0) parameter(fzz=8.d0/(9.d0*GAM)) parameter(gamma=0.03109069086965489503494086371273d0) parameter(bet=0.06672455060314922d0,delt=bet/gamma) parameter(eta=1.d-12)