class_docstr: Test mol graphs.
class_docstr_tok: ["Test","mol","graphs","."]
docstr: Tests that adj-list is canonicalized properly.
docstr_tok: ["Tests","that","adj-list","is","canonicalized","properly","."]
code: def test_get_adjacency_list(self):
      """Tests that adj-list is canonicalized properly."""
      atom_features = np.array(
          [
              [40, 41, 42, 43],
              [44, 45, 46, 47],
              [48, 49, 50, 51],
              [52, 53, 54, 55],
              [56, 57, 58, 59],
          ]
      )
      canon_adj_list = [[1, 2], [0, 3], [0, 3], [1, 2, 4], [3]]
      mol = ConvMol(atom_features, canon_adj_list)
      # Sorting is done by atom degree as before. So the ordering goes
      # 4, 0, 1, 2, 3 now in terms of the original ordering. The mapping
      # from new position to old position is
      # {(4, 0), (0, 1), (1, 2), (2, 3), (3, 4)}. Check that adjacency
      # list respects this reordering and returns correct adjacency list.
      assert mol.get_adjacency_list() == [
          [4],
          [2, 3],
          [1, 4],
          [1, 4],
          [2, 3, 0],
      ]
  
file_path: deepchem/deepchem/feat/tests/test_mol_graphs.py
imports: import unittest
  import numpy
  from deepchem.feat.mol_graphs import ConvMol
label_desc: Use image node_id 4 for calling the TestMolGraphs obj's underlying member method code with example usage: obj.test_get_adjacency_list() without return types