class_docstr: Computes SPLIF voxel grid for a macromolecular complex.
  
  SPLIF fingerprints are based on a technique introduced in the
  following paper [1]_.
  
  The SPLIF voxelizer localizes local SPLIF descriptors in
  space, by assigning features to the voxel in which they
  originated. This technique may be useful for downstream
  learning methods such as convolutional networks.
  
  Featurizes a macromolecular complex into a tensor of shape
  `(voxels_per_edge, voxels_per_edge, voxels_per_edge, size)`
  where `voxels_per_edge = int(box_width/voxel_width)`.
  
  References
  ----------
  .. [1] Da, C., and D. Kireev. "Structural protein–ligand interaction
  fingerprints (SPLIF) for structure-based virtual screening:
  method and benchmark study." Journal of chemical information
  and modeling 54.9 (2014): 2555-2561.
docstr: Compute featurization for a molecular complex
  
  Parameters
  ----------
  datapoint: Tuple[str, str]
      Filenames for molecule and protein.
docstr_tok: ["Compute","featurization","for","a","molecular","complex","Parameters","--","--","--","--","--","datapoint",":","Tuple","[","str",",","str","]","Filenames","for","molecule","and","protein","."]
code: def _featurize(self, datapoint, **kwargs):
      """
      Compute featurization for a molecular complex
  
      Parameters
      ----------
      datapoint: Tuple[str, str]
          Filenames for molecule and protein.
      """
      if "complex" in kwargs:
          datapoint = kwargs.get("complex")
          raise DeprecationWarning(
              'Complex is being phased out as a parameter, please pass "datapoint" instead.'
          )
  
      try:
          fragments = load_complex(datapoint, add_hydrogens=False)
  
      except MoleculeLoadException:
          logger.warning(
              "This molecule cannot be loaded by Rdkit. Returning None"
          )
          return None
      pairwise_features = []
      # We compute pairwise contact fingerprints
      centroid = compute_contact_centroid(fragments, cutoff=self.cutoff)
      for frag1, frag2 in itertools.combinations(fragments, 2):
          distances = compute_pairwise_distances(frag1[0], frag2[0])
          frag1_xyz = subtract_centroid(frag1[0], centroid)
          frag2_xyz = subtract_centroid(frag2[0], centroid)
          xyzs = [frag1_xyz, frag2_xyz]
          pairwise_features.append(
              np.concatenate(
                  [
                      voxelize(
                          convert_atom_pair_to_voxel,
                          hash_function=hash_ecfp_pair,
                          coordinates=xyzs,
                          box_width=self.box_width,
                          voxel_width=self.voxel_width,
                          feature_dict=splif_dict,
                          nb_channel=self.size,
                      )
                      for splif_dict in featurize_splif(
                          frag1,
                          frag2,
                          self.contact_bins,
                          distances,
                          self.radius,
                      )
                  ],
                  axis=-1,
              )
          )
      # Features are of shape (voxels_per_edge, voxels_per_edge, voxels_per_edge, 1) so we should concatenate on the last axis.
      return np.concatenate(pairwise_features, axis=-1)
  
imports: import logging
  import itertools
  import numpy
  from deepchem.utils.hash_utils import hash_ecfp_pair
  from deepchem.utils.rdkit_utils import load_complex
  from deepchem.utils.rdkit_utils import compute_all_ecfp
  from deepchem.utils.rdkit_utils import MoleculeLoadException
  from deepchem.utils.rdkit_utils import compute_contact_centroid
  from deepchem.feat import ComplexFeaturizer
  from deepchem.utils.hash_utils import vectorize
  from deepchem.utils.voxel_utils import voxelize
  from deepchem.utils.voxel_utils import convert_atom_pair_to_voxel
  from deepchem.utils.geometry_utils import compute_pairwise_distances
  from deepchem.utils.geometry_utils import subtract_centroid
  from typing import Optional, Tuple, Dict, List
label_desc: Use image node_id 2 for calling the SplifVoxelizer obj's underlying member method code with example usage: obj._featurize(datapoint) and returns: np, None