class_docstr: Test RdkitGridFeaturizer class defined in rdkit_grid_featurizer module.
code: def test_combined(self):
      ecfp_power = 5
      splif_power = 5
      box_width = 75.0
      voxel_width = 1.0
      voxels_per_edge = int(box_width / voxel_width)
  
      # test voxel features
      featurizer = RdkitGridFeaturizer(
          voxel_width=voxel_width,
          box_width=box_width,
          feature_types=["voxel_combined"],
          ecfp_power=ecfp_power,
          splif_power=splif_power,
          flatten=False,
          sanitize=True,
      )
      feature_tensor = featurizer.featurize(
          [(self.ligand_file, self.protein_file)]
      )
      self.assertIsInstance(feature_tensor, np.ndarray)
      voxel_total_len = (
          2**ecfp_power
          + len(featurizer.cutoffs["splif_contact_bins"])
          * 2**splif_power
          + len(featurizer.cutoffs["hbond_dist_bins"])
          + 5
      )
      self.assertEqual(
          feature_tensor.shape,
          (
              1,
              voxels_per_edge,
              voxels_per_edge,
              voxels_per_edge,
              voxel_total_len,
          ),
      )
  
      # test flat features
      featurizer = RdkitGridFeaturizer(
          voxel_width=1.0,
          box_width=75.0,
          feature_types=["flat_combined"],
          ecfp_power=ecfp_power,
          splif_power=splif_power,
          sanitize=True,
      )
      feature_tensor = featurizer.featurize(
          [(self.ligand_file, self.protein_file)]
      )
      self.assertIsInstance(feature_tensor, np.ndarray)
      flat_total_len = (
          3 * 2**ecfp_power
          + len(featurizer.cutoffs["splif_contact_bins"])
          * 2**splif_power
          + len(featurizer.cutoffs["hbond_dist_bins"])
      )
      self.assertEqual(feature_tensor.shape, (1, flat_total_len))
  
      # check if aromatic features are ignored if sanitize=False
      featurizer = RdkitGridFeaturizer(
          voxel_width=1.0,
          box_width=75.0,
          feature_types=["all_combined"],
          ecfp_power=ecfp_power,
          splif_power=splif_power,
          flatten=True,
          sanitize=False,
      )
  
      self.assertTrue("pi_stack" not in featurizer.feature_types)
      self.assertTrue("cation_pi" not in featurizer.feature_types)
      feature_tensor = featurizer.featurize(
          [(self.ligand_file, self.protein_file)]
      )
      self.assertIsInstance(feature_tensor, np.ndarray)
      self.assertEqual(feature_tensor.shape, (1, 56109538))
  
file_path: deepchem/deepchem/feat/tests/test_rdkit_grid_features.py
imports: import os
  import unittest
  import numpy
  from deepchem.feat import RdkitGridFeaturizer
label_desc: Use image node_id 5 for calling the TestRdkitGridFeaturizer obj's underlying member method code with example usage: obj.test_combined() without return types