c---------------------------------------------------------------------- subroutine EASYPBE(up,agrup,delgrup,uplap,dn,agrdn,delgrdn,dnlap, c is a driver for the PBE subroutines, using simple inputs c 1 agr,delgr,lcor,lpot, 1 exlsd,vxuplsd,vxdnlsd,eclsd,vcuplsd,vcdnlsd, 1 expw91,vxuppw91,vxdnpw91,ecpw91,vcuppw91,vcdnpw91, 1 expbe,vxuppbe,vxdnpbe,ecpbe,vcuppbe,vcdnpbe, 1 exb,vxupb,vxdnb,eclyp,vcuplyp,vcdum) c author: K. Burke, May 14, 1996, modified April 7, c to include Becke 88 exchange and LYP correlation c WARNING: LYP for spin-unpolarized only c in: up - up density c agrup - |grad up| c delgrup - (grad up).(grad |grad up|) c uplap - grad^2 c up - Laplacian of up c dn,agrdn,delgrdn,dnlap - corresponding down quantities c agr - |grad rho| c delgr - (grad rho).(grad |grad rho|) c lcor - flag to do correlation(=0=>don't) c lpot - flag to do potential(=0=>don't) c out: exlsd - LSD exchange energy density, so that c ExLSD - int d^3r rho(r) exlsd(r) c vxuplsd - up LSD exchange potential c vxdnlsd - down LSD exchange potential c exclsd - LSD exchange-correlation energy density c vxcuplsd - up LSD exchange-correlation potential c vxcdnlsd - down LSD exchange-correlation potential c expw91,vxuppw91,vxdnpw91,ecpw91,etc.=PW91 quantities c expbe,vxuppbe,vxdnpbe,ecpbe,etc.=PBE quantities c exb,vxupb,vxdnb,eclyp,etc.=BLYP quantities c calls: EXCHPBE, EXCH, CORPBE2, CORLSD, CORPW91, LYP c c needed constants: pi32=3 pi**2 c alpha=(9pi/4)**thrd implicit real*8(a-h,o-z) parameter(thrd=1.d0/3.d0,thrd2=2.d0*thrd) parameter(pi32=29.608813203268075856503472999628d0) parameter(pi=3.1415926535897932384626433832795d0) parameter(alpha=1.91915829267751300662482032624669d0) c---------------------------------------------------------------------- c PBE exchange c use Ex[up,dn]=0.5*(Ex[2*up]+Ex[2*dn]) (i.e., exact spin-scaling) c do up exchange c fk=local Fermi wavevector for 2*up=(3 pi^2 (2up))^(1/3) c s=dimensionless density gradient=|grad rho|/ (2*fk*rho)_(rho=2*up) c u=delgrad/(rho^2*(2*fk)**3)_(rho=2*up) c v=Laplacian/(rho*(2*fk)**2)_(rho=2*up)