class_docstr: QM9 dataset for graph property prediction (regression)
  
  This dataset consists of 130,831 molecules with 12 regression targets.
  Nodes correspond to atoms and edges correspond to bonds.
  
  Reference:
  
  - `"Quantum-Machine.org" <http://quantum-machine.org/datasets/>`_
  - `"Directional Message Passing for Molecular Graphs" <https://arxiv.org/abs/2003.03123>`_
  
  Statistics:
  
  - Number of graphs: 130,831
  - Number of regression targets: 12
  
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | Keys   | Property                         | Description                                                                       | Unit                                        |
  +========+==================================+===================================================================================+=============================================+
  | mu     | :math:`\mu`                      | Dipole moment                                                                     | :math:`\textrm{D}`                          |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | alpha  | :math:`\alpha`                   | Isotropic polarizability                                                          | :math:`{a_0}^3`                             |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | homo   | :math:`\epsilon_{\textrm{HOMO}}` | Highest occupied molecular orbital energy                                         | :math:`\textrm{eV}`                         |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | lumo   | :math:`\epsilon_{\textrm{LUMO}}` | Lowest unoccupied molecular orbital energy                                        | :math:`\textrm{eV}`                         |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | gap    | :math:`\Delta \epsilon`          | Gap between :math:`\epsilon_{\textrm{HOMO}}` and :math:`\epsilon_{\textrm{LUMO}}` | :math:`\textrm{eV}`                         |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | r2     | :math:`\langle R^2 \rangle`      | Electronic spatial extent                                                         | :math:`{a_0}^2`                             |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | zpve   | :math:`\textrm{ZPVE}`            | Zero point vibrational energy                                                     | :math:`\textrm{eV}`                         |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | U0     | :math:`U_0`                      | Internal energy at 0K                                                             | :math:`\textrm{eV}`                         |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | U      | :math:`U`                        | Internal energy at 298.15K                                                        | :math:`\textrm{eV}`                         |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | H      | :math:`H`                        | Enthalpy at 298.15K                                                               | :math:`\textrm{eV}`                         |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | G      | :math:`G`                        | Free energy at 298.15K                                                            | :math:`\textrm{eV}`                         |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  | Cv     | :math:`c_{\textrm{v}}`           | Heat capavity at 298.15K                                                          | :math:`\frac{\textrm{cal}}{\textrm{mol K}}` |
  +--------+----------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------+
  
  Parameters
  ----------
  label_keys: list
      Names of the regression property, which should be a subset of the keys in the table above.
  edge_funcs: list
      A list of edge-wise user-defined functions <https://docs.dgl.ai/en/0.6.x/api/python/udf.html#edge-wise-user-defined-function> for chemical bonds. Default: None
  cutoff: float
      Cutoff distance for interatomic interactions, i.e. two atoms are connected in the corresponding graph if the distance between them is no larger than this.
      Default: 5.0 Angstrom
  raw_dir : str
      Raw file directory to download/contains the input data directory.
      Default: ~/.dgl/
  force_reload : bool
      Whether to reload the dataset. Default: False
  verbose: bool
      Whether to print out progress information. Default: True
  
  Attributes
  ----------
  num_labels : int
      Number of labels for each graph, i.e. number of prediction tasks
  
  Raises
  ------
  UserWarning
      If the raw data is changed in the remote server by the author.
  
  Examples
  --------
  >>> data = QM9Dataset(label_keys=['mu', 'gap'], cutoff=5.0)
  >>> data.num_classes
  2
  >>>
  >>> # iterate over the dataset
  >>> for g, label in data:
  ...     R = g.ndata['R'] # get coordinates of each atom
  ...     Z = g.ndata['Z'] # get atomic numbers of each atom
  ...     # your code here...
  >>>
class_docstr_tok: ["QM9","dataset","for","graph","property","prediction","(","regression",")","This","dataset","consists","of","130,831","molecules","with","12","regression","targets",".","Nodes","correspond","to","atoms","and","edges","correspond","to","bonds",".","Reference",":","-","`","``","Quantum-Machine.org","''","<","http",":","\/\/quantum-machine.org\/datasets\/",">","`","_","-","`","``","Directional","Message","Passing","for","Molecular","Graphs","''","<","https",":","\/\/arxiv.org\/abs\/2003.03123",">","`","_","Statistics",":","-","Number","of","graphs",":","130,831","-","Number","of","regression","targets",":","12","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","Keys","|","Property","|","Description","|","Unit","|","+========+==================================+===================================================================================+=============================================+","|","mu","|",":","math",":","`","\\mu","`","|","Dipole","moment","|",":","math",":","`","\\textrm","{","D","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","alpha","|",":","math",":","`","\\alpha","`","|","Isotropic","polarizability","|",":","math",":","`","{","a_0","}","^3","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","homo","|",":","math",":","`","\\epsilon_","{","\\textrm","{","HOMO","}","}","`","|","Highest","occupied","molecular","orbital","energy","|",":","math",":","`","\\textrm","{","eV","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","lumo","|",":","math",":","`","\\epsilon_","{","\\textrm","{","LUMO","}","}","`","|","Lowest","unoccupied","molecular","orbital","energy","|",":","math",":","`","\\textrm","{","eV","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","gap","|",":","math",":","`","\\Delta","\\epsilon","`","|","Gap","between",":","math",":","`","\\epsilon_","{","\\textrm","{","HOMO","}","}","`","and",":","math",":","`","\\epsilon_","{","\\textrm","{","LUMO","}","}","`","|",":","math",":","`","\\textrm","{","eV","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","r2","|",":","math",":","`","\\langle","R^2","\\rangle","`","|","Electronic","spatial","extent","|",":","math",":","`","{","a_0","}","^2","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","zpve","|",":","math",":","`","\\textrm","{","ZPVE","}","`","|","Zero","point","vibrational","energy","|",":","math",":","`","\\textrm","{","eV","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","U0","|",":","math",":","`","U_0","`","|","Internal","energy","at","0K","|",":","math",":","`","\\textrm","{","eV","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","U","|",":","math",":","`","U","`","|","Internal","energy","at","298.15K","|",":","math",":","`","\\textrm","{","eV","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","H","|",":","math",":","`","H","`","|","Enthalpy","at","298.15K","|",":","math",":","`","\\textrm","{","eV","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","G","|",":","math",":","`","G","`","|","Free","energy","at","298.15K","|",":","math",":","`","\\textrm","{","eV","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","Cv","|",":","math",":","`","c_","{","\\textrm","{","v","}","}","`","|","Heat","capavity","at","298.15K","|",":","math",":","`","\\frac","{","\\textrm","{","cal","}","}","{","\\textrm","{","mol","K","}","}","`","|","+","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","Parameters","--","--","--","--","--","label_keys",":","list","Names","of","the","regression","property",",","which","should","be","a","subset","of","the","keys","in","the","table","above",".","edge_funcs",":","list","A","list","of","edge-wise","user-defined","functions","<","https",":","\/\/docs.dgl.ai\/en\/0.6.x\/api\/python\/udf.html","#","edge-wise-user-defined-function",">","for","chemical","bonds",".","Default",":","None","cutoff",":","float","Cutoff","distance","for","interatomic","interactions",",","i.e",".","two","atoms","are","connected","in","the","corresponding","graph","if","the","distance","between","them","is","no","larger","than","this",".","Default",":","5.0","Angstrom","raw_dir",":","str","Raw","file","directory","to","download\/contains","the","input","data","directory",".","Default",":","~\/.dgl\/","force_reload",":","bool","Whether","to","reload","the","dataset",".","Default",":","False","verbose",":","bool","Whether","to","print","out","progress","information",".","Default",":","True","Attributes","--","--","--","--","--","num_labels",":","int","Number","of","labels","for","each","graph",",","i.e",".","number","of","prediction","tasks","Raises","--","--","--","UserWarning","If","the","raw","data","is","changed","in","the","remote","server","by","the","author",".","Examples","--","--","--","--",">",">",">","data","=","QM9Dataset","(","label_keys=","[","'mu","'",",","'gap","'","]",",","cutoff=5.0",")",">",">",">","data.num_classes","2",">",">",">",">",">",">","#","iterate","over","the","dataset",">",">",">","for","g",",","label","in","data",":","...","R","=","g.ndata","[","'","R","'","]","#","get","coordinates","of","each","atom","...","Z","=","g.ndata","[","'","Z","'","]","#","get","atomic","numbers","of","each","atom","...","#","your","code","here","...",">",">",">"]
docstr: Get graph and label by index
  
  Parameters
  ----------
  idx : int
      Item index
  
  Returns
  -------
  dgl.DGLGraph
      The graph contains:
      - ``ndata['R']``: the coordinates of each atom
      - ``ndata['Z']``: the atomic number
  Tensor
      Property values of molecular graphs
docstr_tok: ["Get","graph","and","label","by","index","Parameters","--","--","--","--","--","idx",":","int","Item","index","Returns","--","--","--","-","dgl.DGLGraph","The","graph","contains",":","-","``","ndata","[","'","R","'","]","``",":","the","coordinates","of","each","atom","-","``","ndata","[","'","Z","'","]","``",":","the","atomic","number","Tensor","Property","values","of","molecular","graphs"]
code: def __getitem__(self, idx):
      r"""Get graph and label by index
  
      Parameters
      ----------
      idx : int
          Item index
  
      Returns
      -------
      dgl.DGLGraph
          The graph contains:
          - ``ndata['R']``: the coordinates of each atom
          - ``ndata['Z']``: the atomic number
      Tensor
          Property values of molecular graphs
      """
      return self.graphs[idx], self.line_graphs[idx], self.label[idx]
  
file_path: dgl/examples/pytorch/dimenet/qm9.py
imports: import os
  import dgl
  import numpy
  import scipy.sparse
  import torch
  from dgl.convert import graph
  from dgl.data import QM9Dataset
  from dgl.data.utils import load_graphs, save_graphs
  from tqdm import trange
label_desc: Use image node_id 9 for calling the QM9 obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: self,  self,  self