subroutine potent(x,v,f,number) c calculates the potential energy and derivative c for a number of standard functions implicit real*8 (a-h,o-z) if(number.le.0) goto 100 xi=1.0/x alambda = 1.1d0 sect = 1.d0 + (alambda - 1.d0)*0.95d0 c alambda is the extent of the square well interaction goto (1,2,3,4,5,6,7,8) number 1 continue c lennard jones 6-12 potential c x2=xi**2 c x6=x2**3 c v=4.d0*(x6-1.d0)*x6 c f=24.d0*x6*x2*(2.d0*x6-1.d0) if (x.lt.alambda) then if (x.ge.1.d0) then if(x.le.sect) then v = (x - 1.d0)/(19.d0*(alambda - 1.d0)) -1.d0 f = -1.d0*xi/(19.d0*(alambda - 1.d0)) else v= 19.d0*(x - alambda)/(alambda - 1.d0) f= -19.d0*xi/(alambda - 1.d0) endif else v=xi**15 - 2.d0 f=15.d0*(xi**17) endif else v=0.d0 f=0.d0 endif return 2 continue c coulomb potential v=xi f=v**3 return 3 continue data tdsqpi/1.128379167/ xsq=x**2 call gammi(gm,0.5d0,xsq,sqpi) v=xi*sqpiv*gm data sqpiv/.564189584d0/ f=xi**2*(v+tdsqpi*exp(-x**2)) return 4 continue c repulsive yukawa potential v=exp(-x)/x f=xi*v*(xi+1.d0) return 5 continue v=exp(-x) v2=v*v f=xi*(2*v2-v) v=v2-v return 6 continue c rahman stillinger lember hh force y6=exp(-40.*(x-2.0)) v=20.*y6/(1.+y6) f=40.*v/(1.+y6) y6=-17.03002*exp(-7.60626*(x-1.4525)**2) v=v+y6 f=xi*(f+y6*15.21252*(x-1.4525)) return 7 continue c rahman stillinger lemberg oh potential v=2.6677*xi**14.97 f=14.97*v*xi**2 y7=exp(-5.49305*(x-2.2)) v7=-6.*y7/(1.0+y7) v=v+v7 f=f+xi*v7*5.49305/(1.0+y7) return 8 continue c rahman stillinger lemberg oo potential v=23401.9*xi**8.3927 f=8.3927*v*xi*xi return 100 v=0.0 f=0.0 return end