anchor.diff:        bktdb%ndiv(i) = max(floor(xrange(i) / dmin), 1)
         bktdb%d(i) = xrange(i) / bktdb%ndiv(i) * (1.d0 + EPS)
       enddo
  +    if (DEBUG >= 1) write(0,*) 'DEBUG: bucketDB_setup: ndiv, d: ', bktdb%ndiv, bktdb%d
  +    call assert(all(bktdb%d > 0.d0), 'bucketDB_setup: invalid bktdb%d')
       allocate(bktdb%buckets(bktdb%ndiv(1), bktdb%ndiv(2), bktdb%ndiv(3)))
       do k = 1, bktdb%ndiv(3)
         do j = 1, bktdb%ndiv(2)
  
positive.code:     real(kind=kreal), intent(in) :: x(3)        !< coordinate of point
      integer(kind=kint) :: baddr(3)
      integer(kind=kint) :: i
      do i = 1, 3
        baddr(i) = floor((x(i) - bktdb%x_min(i)) / bktdb%d(i)) + 1
      enddo
      if (DEBUG >= 2) write(0,*) '  DEBUG: bucketDB_getBucketID: ',x,baddr
  
negative.code:     integer(kind=kint), intent(out), target :: cand(ncand)  !< array to store candidates
      integer(kind=kint) :: baddr(3), i, j, k, n, cnt, is, ie, js, je, ks, ke
      integer(kind=kint), pointer :: pcand(:)
      if (bid < 0 .or. ncand == 0) return
      baddr = decode_bid(bktdb, bid)
      cnt = 0
      is = max(baddr(1)-1, 1)
  