      function vec_dot(nd,v1,v2) ! Bernd Berg Jul 6 2005.
C Dot product of two vectors.
      include 'implicit.sta'  
      include '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

