      function vec_dot(nd,v1,v2) ! bernd berg jul 6 2005.
c dot product of two vectors.
      include '../../libs/fortran/implicit.sta'  
      include '../../libs/fortran/constants.par'
      dimension v1(nd),v2(nd)
      vec_dot=zero
      do id=1,nd
        vec_dot=vec_dot+v1(id)*v2(id)
      enddo
      return
      end

