code: def compute_binding_pocket_features(
      pocket_featurizer,
      ligand_featurizer,
      pdb_subdir,
      pdb_code,
      threshold=0.3,
  ):
      """Compute features for a given complex"""
      protein_file = os.path.join(
          pdb_subdir, "%s_protein.pdb" % pdb_code
      )
      ligand_file = os.path.join(pdb_subdir, "%s_ligand.sdf" % pdb_code)
      ligand_mol2 = os.path.join(
          pdb_subdir, "%s_ligand.mol2" % pdb_code
      )
  
      # Extract active site
      (
          active_site_box,
          active_site_atoms,
          active_site_coords,
      ) = dc.dock.binding_pocket.extract_active_site(
          protein_file, ligand_file
      )
  
      # Featurize ligand
      mol = Chem.MolFromMol2File(str(ligand_mol2), removeHs=False)
      if mol is None:
          return None, None
      # Default for CircularFingerprint
      n_ligand_features = 1024
      ligand_features = ligand_featurizer.featurize([mol])
  
      # Featurize pocket
      finder = dc.dock.ConvexHullPocketFinder()
      pockets, pocket_atoms, pocket_coords = finder.find_pockets(
          protein_file, ligand_file
      )
      n_pockets = len(pockets)
      n_pocket_features = dc.feat.BindingPocketFeaturizer.n_features
  
      features = np.zeros(
          (n_pockets, n_pocket_features + n_ligand_features)
      )
      pocket_features = pocket_featurizer.featurize(
          protein_file, pockets, pocket_atoms, pocket_coords
      )
      # Note broadcast operation
      features[:, :n_pocket_features] = pocket_features
      features[:, n_pocket_features:] = ligand_features
  
      # Compute labels for pockets
      labels = np.zeros(n_pockets)
      pocket_atoms[active_site_box] = active_site_atoms
      for ind, pocket in enumerate(pockets):
          overlap = dc.dock.binding_pocket.compute_overlap(
              pocket_atoms, active_site_box, pocket
          )
          if overlap > threshold:
              labels[ind] = 1
          else:
              labels[ind] = 0
      return features, labels
  
file_path: deepchem/examples/binding_pockets/binding_pocket_datasets.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import unicode_literals
  import os
  import numpy
  import pandas
  import shutil
  import time
  import re
  from rdkit import Chem
  import deepchem
label_desc: Use image node_id 1 for calling a global function with example usage: compute_binding_pocket_features(pocket_featurizer, ligand_featurizer, pdb_subdir, pdb_code, threshold) and returns: features,  labels, None,  None