code: def get_cells(coords, neighbor_cutoff):
      """Computes cells given molecular coordinates.
  
      Parameters
      ----------
      coords: np.array
        Cartesian coordaintes [Angstrom]
      neighbor_cutoff: float
        Threshold distance [Angstroms] for counting neighbors.
  
      Returns
      -------
      x_bins: list
        List contains tuples of x_cell boundaries
      y_bins: list
        List contains tuples of y_cell boundaries
      z_bins: list
        List contains tuples of z_cell boundaries
  
      """
  
      x_max, x_min = np.amax(coords[:, 0]), np.amin(coords[:, 0])
      y_max, y_min = np.amax(coords[:, 1]), np.amin(coords[:, 1])
      z_max, z_min = np.amax(coords[:, 2]), np.amin(coords[:, 2])
  
      # Compute cells for this molecule. O(constant)
      x_bins, y_bins, z_bins = [], [], []
      x_current, y_current, z_current = x_min, y_min, z_min
      # min == max if molecule is planar in some direction
      # we should still create a bin
      if not x_min == x_max:
          while x_current < x_max:
              x_bins.append((x_current, x_current + neighbor_cutoff))
              x_current += neighbor_cutoff
      else:
          x_bins.append((x_current, x_current + neighbor_cutoff))
      if not y_min == y_max:
          while y_current < y_max:
              y_bins.append((y_current, y_current + neighbor_cutoff))
              y_current += neighbor_cutoff
      else:
          y_bins.append((y_current, y_current + neighbor_cutoff))
      if not z_min == z_max:
          while z_current < z_max:
              z_bins.append((z_current, z_current + neighbor_cutoff))
              z_current += neighbor_cutoff
      else:
          z_bins.append((z_current, z_current + neighbor_cutoff))
      return x_bins, y_bins, z_bins
  
file_path: deepchem/contrib/atomicconv/feat/atomicnet_coordinates.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import unicode_literals
  import numpy
  from rdkit import Chem
  from deepchem.feat import Featurizer
  from deepchem.feat import ComplexFeaturizer
  from deepchem.utils import pad_array
label_desc: Use image node_id 1 for calling a global function with example usage: get_cells(coords, neighbor_cutoff) and returns: x_bins,  y_bins,  z_bins