class_docstr: Test ConvMolFeaturizer featurizes properly.
docstr: Test on carbon nitrogen molecule
docstr_tok: ["Test","on","carbon","nitrogen","molecule"]
code: def test_carbon_nitrogen(self):
      """Test on carbon nitrogen molecule"""
      # Note there is a central nitrogen of degree 4, with 4 carbons
      # of degree 1 (connected only to central nitrogen).
      raw_smiles = ["C[N+](C)(C)C"]
      import rdkit.Chem
  
      mols = [rdkit.Chem.MolFromSmiles(s) for s in raw_smiles]
      featurizer = ConvMolFeaturizer()
      mols = featurizer.featurize(mols)
      mol = mols[0]
  
      # 5 atoms in compound
      assert mol.get_num_atoms() == 5
  
      # Get the adjacency lists grouped by degree
      deg_adj_lists = mol.get_deg_adjacency_lists()
      assert np.array_equal(
          deg_adj_lists[0], np.zeros([0, 0], dtype=np.int32)
      )
      # The 4 outer atoms connected to central nitrogen
      assert np.array_equal(
          deg_adj_lists[1],
          np.array([[4], [4], [4], [4]], dtype=np.int32),
      )
      assert np.array_equal(
          deg_adj_lists[2], np.zeros([0, 2], dtype=np.int32)
      )
      assert np.array_equal(
          deg_adj_lists[3], np.zeros([0, 3], dtype=np.int32)
      )
      # Central nitrogen connected to everything else.
      assert np.array_equal(
          deg_adj_lists[4], np.array([[0, 1, 2, 3]], dtype=np.int32)
      )
      assert np.array_equal(
          deg_adj_lists[5], np.zeros([0, 5], dtype=np.int32)
      )
      assert np.array_equal(
          deg_adj_lists[6], np.zeros([0, 6], dtype=np.int32)
      )
  
file_path: deepchem/deepchem/feat/tests/test_graph_features.py
imports: import unittest
  import numpy
  from deepchem.feat.graph_features import ConvMolFeaturizer
label_desc: Use image node_id 1 for calling the TestConvMolFeaturizer obj's underlying member method code with example usage: obj.test_carbon_nitrogen() without return types