      function dist(x,y)

c  this subroutine written by alain st-amant of the department of
c  pharmaceutical chemistry, university of california, san francisco.
c  all rights reserved.  this is part of the DeFT project.

      implicit real*8(a-h,o-z)

      dimension x(3),y(3)

      xx=x(1)-y(1)
      yy=x(2)-y(2)
      zz=x(3)-y(3)

      dist=sqrt(xx*xx+yy*yy+zz*zz)

      return
      end
