c---------------------------------------------------------------------- program MULTI c finds many different properties of 1 and 2 electron densities in 3 dimensions, either exponential c or gaussian, either analytic or from Hooke's atom or read in from Cyrus' exact densities c c author: Kieron Burke c in: mode(0=>out vs. r,1=>just engies,2=>do lambda scaling) c =Num, # of electrons c =next pot (1=Coulomb, 2=harmonic) c =np (if next=1, then np=smoothing; next=2, np=1=Kais) c =ncorr (0=uncorrelated, 1=correlated) c =n=num of grid points c =r0*alpha, r0=length scale for grid c =nmat = matrix size for Hooke's atom calc. c =nl,ngga = no. of lambda values, and gga to use c =methods for fake lambda c =nbeta = flag to indicate if beta is listed, or to be calcl c also need densities for two-electron ions, if called. include 'basics.inc' include 'con.inc' include 'dens.inc' include 'pot.inc' include 'sys.inc' c include 'res.d' include 'lam.inc' c mk= max number of calculations c vcgga=gga (or exact) correlation potential for a specific case c egga(j,k) c j : 1=>X, 2=>C c k : 1=LSD,2=PW91,3=PBE,4=BLYP c tcgga(j,k) c j : 1=> Tc, 2=>Uc c vgga(i,j,k) c i : r c ts,ex,ec,tc,uc 0=exact,1=LSD,... c c m - max size of radial grid c n - actual size in calculations c r0 - length scale of grid c dy = 1/n c beta - parameter determining external potential c next=1=>beta=alpha=Z c omega=alpha^2 c r0alph=r0*alpha c mode - (0=>out vs. r,1=>just engies,2=>do lambda scaling) c nmat - matrix size when doing Hooke's atom calc. c nl - no. of lambda values for scaling calc. c ngga - which gga to use, if only using one. c alpha - length scale of external potential c next=1=>alpha=Z c next=2=>alpha=sqrt(m*omega) c num - number of electrons (1 or 2) c next - type of external potential (1=Coulomb, 2=Harmonic) c np - variations in next c next=1, np=1=>smoothed c next=2, np=1=>kais c ncorr - correlated (0=>uncorre, 1=>corr) c c dens - density c grad - gradient of density c d2 = d^2 rho/ dr^2 c dlap - laplacian of density c dl(i) - log(density) c c vs - KS potential c vnuc - external potential c vh - hartree pot. c vx - exchange pot. c vc - correlation potential c ml - max. no. of values of lambda c tslf - Ts for different external potentials c exlf - ex for different external potentials c Eclf - Ec for different external potentials c Tclf - Tc for different external potentials c Uclf - Uc for different external potentials c vextlf - vextlf for different external potentials c xlf - chosen value for lambda (by one of 4 different methods) c gamlf - 1/xlf c nlf - flag for which method to calculate xlf by. parameter(mk=200) dimension vcgga(0:m) dimension egga(2,4),tcgga(2,4) dimension ts(0:4),ex(0:4),ec(0:4),tc(0:4),uc(0:4) external fnorm,tstf,tsvw