class_docstr: Utility to batch graphs featurized by GroverFeaturizer
  
  GraphData created by created GroverFeaturizer has pre-computed attributes
  which needs to be aggregated before passing to the Grover model. This
  class batches graph by taking into account the pre-computed and additional
  attributes and returns a batched graph which can be passed to the Grover
  model.
  
  The batching method takes in a dc.feat.GraphData object created by
  GroverFeaturizer. New node indices and edge indices are
  computed by stacking the adjacency matrices of the graphs diagonally
  into a joint single adjacency matrix. On the new adjacency matrix,
  the method compute additional features like atom-to-bond indexes
  and bond-to-atom indexes. The rest of the features are computed by stacking
  the attributes as in dc.feat.BatchGraphData.
  
  
  Parameters
  ----------
  molgraph: List[GraphData]
      A list of GraphData objects created by GroverFeaturizer
  
  Example
  -------
  >>> import deepchem as dc
  >>> smiles = ['CC', 'CCC', 'CC(=O)C']
  >>> featurizer = dc.feat.GroverFeaturizer(features_generator=dc.feat.CircularFingerprint())
  >>> graphs = featurizer.featurize(smiles)
  >>> batched_graph = BatchGroverGraph(graphs)
class_docstr_tok: ["Utility","to","batch","graphs","featurized","by","GroverFeaturizer","GraphData","created","by","created","GroverFeaturizer","has","pre-computed","attributes","which","needs","to","be","aggregated","before","passing","to","the","Grover","model",".","This","class","batches","graph","by","taking","into","account","the","pre-computed","and","additional","attributes","and","returns","a","batched","graph","which","can","be","passed","to","the","Grover","model",".","The","batching","method","takes","in","a","dc.feat.GraphData","object","created","by","GroverFeaturizer",".","New","node","indices","and","edge","indices","are","computed","by","stacking","the","adjacency","matrices","of","the","graphs","diagonally","into","a","joint","single","adjacency","matrix",".","On","the","new","adjacency","matrix",",","the","method","compute","additional","features","like","atom-to-bond","indexes","and","bond-to-atom","indexes",".","The","rest","of","the","features","are","computed","by","stacking","the","attributes","as","in","dc.feat.BatchGraphData",".","Parameters","--","--","--","--","--","molgraph",":","List","[","GraphData","]","A","list","of","GraphData","objects","created","by","GroverFeaturizer","Example","--","--","--","-",">",">",">","import","deepchem","as","dc",">",">",">","smiles","=","[","'CC","'",",","'CCC","'",",","'CC","(","=O",")","C","'","]",">",">",">","featurizer","=","dc.feat.GroverFeaturizer","(","features_generator=dc.feat.CircularFingerprint","(",")",")",">",">",">","graphs","=","featurizer.featurize","(","smiles",")",">",">",">","batched_graph","=","BatchGroverGraph","(","graphs",")"]
docstr: Returns the components of BatchGroverGraph.
  
  Example
  -------
  >>> import deepchem as dc
  >>> smiles = ['CC', 'CCC', 'CC(=O)C']
  >>> featurizer = dc.feat.GroverFeaturizer(features_generator=dc.feat.CircularFingerprint())
  >>> graphs = featurizer.featurize(smiles)
  >>> batched_graph = BatchGroverGraph(graphs)
  >>> components = batched_graph.get_components()
  
  Returns
  -------
  components: Tuple
      A tuple containing PyTorch tensors with the atom features, bond features, graph structure,
      two lists indicating the scope of the atoms and bonds (i.e. which molecules they belong to)
      and functional group labels.
docstr_tok: ["Returns","the","components","of","BatchGroverGraph",".","Example","--","--","--","-",">",">",">","import","deepchem","as","dc",">",">",">","smiles","=","[","'CC","'",",","'CCC","'",",","'CC","(","=O",")","C","'","]",">",">",">","featurizer","=","dc.feat.GroverFeaturizer","(","features_generator=dc.feat.CircularFingerprint","(",")",")",">",">",">","graphs","=","featurizer.featurize","(","smiles",")",">",">",">","batched_graph","=","BatchGroverGraph","(","graphs",")",">",">",">","components","=","batched_graph.get_components","(",")","Returns","--","--","--","-","components",":","Tuple","A","tuple","containing","PyTorch","tensors","with","the","atom","features",",","bond","features",",","graph","structure",",","two","lists","indicating","the","scope","of","the","atoms","and","bonds","(","i.e",".","which","molecules","they","belong","to",")","and","functional","group","labels","."]
code: def get_components(self):
      """Returns the components of BatchGroverGraph.
  
      Example
      -------
      >>> import deepchem as dc
      >>> smiles = ['CC', 'CCC', 'CC(=O)C']
      >>> featurizer = dc.feat.GroverFeaturizer(features_generator=dc.feat.CircularFingerprint())
      >>> graphs = featurizer.featurize(smiles)
      >>> batched_graph = BatchGroverGraph(graphs)
      >>> components = batched_graph.get_components()
  
      Returns
      -------
      components: Tuple
          A tuple containing PyTorch tensors with the atom features, bond features, graph structure,
          two lists indicating the scope of the atoms and bonds (i.e. which molecules they belong to)
          and functional group labels.
      """
      return (
          self.f_atoms,
          self.f_bonds,
          self.a2b,
          self.b2a,
          self.b2revb,
          self.a2a,
          self.a_scope,
          self.b_scope,
          self.fg_labels,
      )
  
file_path: deepchem/deepchem/utils/grover.py
imports: import numpy
  from typing import List, Any
  from numpy.typing import ArrayLike
  from deepchem.feat.graph_data import BatchGraphData, GraphData
  from deepchem.feat.molecule_featurizers.dmpnn_featurizer import GraphConvConstants
label_desc: Use image node_id 2 for calling the BatchGroverGraph obj's underlying member method code with example usage: obj.get_components() and returns: self,  self,  self,  self,  self,  self,  self,  self,  self