******************************************************************************** * * * 2DHF version 1-2003 * * Copyright (C) 1996 Jacek Kobus, Leif Laaksonen, Dage Sundholm * * * * This software may be used and distributed according to the terms * * of the GNU General Public License, see README and COPYING. * * * ******************************************************************************** c ### thofe ### c c Calculates a Thomas-Fermi potential (a modified version of dentfa c by Desclaux) function thofe(r,ek,qk,dz,ch,slim) implicit integer*4 (i-n) implicit real*8 (a-h,o-z) thofe=0.d0 if((dz+ch).lt.1.d-04) return if(abs(qk+ek).lt.1.d-10) return w=r*(qk+ek)/2.d0*(dz+ch)**(1.d0/3.d0) w=sqrt(w/0.88534d0) t=w*(0.601120d0*w+1.810610d0)+1.d0 w=w*(w*(w*(w*(0.047930d0*w+0.214650d0)+0.771120d0)+ & 1.395150d0)+1.810610d0)+1.d0 thofe=slim*(1.d0-(t/w)*(t/w))*2.d0/(r*(qk+ek)) return end