      logical function collid(cprobe,rprobe,c,r,n)

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.
c
c  this is based on a subroutine taken out of connolly's ms program.

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

      dimension cprobe(*),c(3,*),r(*)

      if(n.gt.0) then

                       do 1001 i=1,n

                       s=rprobe+r(i)

                       ss=s*s

                       xx=cprobe(1)-c(1,i)
                       yy=cprobe(2)-c(2,i)
                       zz=cprobe(3)-c(3,i)

                       dd=xx*xx+yy*yy+zz*zz

                       if(dd.lt.ss) goto 1002

 1001                  continue

                 endif

      collid=.false.
      return

 1002 collid=.true.
      return

      end
