class_docstr: The continuous-filter convolutional neural network SchNet from the
  `"SchNet: A Continuous-filter Convolutional Neural Network for Modeling
  Quantum Interactions" <https://arxiv.org/abs/1706.08566>`_ paper that uses
  the interactions blocks of the form.
  
  .. math::
      \mathbf{x}^{\prime}_i = \sum_{j \in \mathcal{N}(i)} \mathbf{x}_j \odot
      h_{\mathbf{\Theta}} ( \exp(-\gamma(\mathbf{e}_{j,i} - \mathbf{\mu}))),
  
  here :math:`h_{\mathbf{\Theta}}` denotes an MLP and
  :math:`\mathbf{e}_{j,i}` denotes the interatomic distances between atoms.
  
  .. note::
  
      For an example of using a pretrained SchNet variant, see
      `examples/qm9_pretrained_schnet.py
      <https://github.com/pyg-team/pytorch_geometric/blob/master/examples/
      qm9_pretrained_schnet.py>`_.
  
  Args:
      hidden_channels (int, optional): Hidden embedding size.
          (default: :obj:`128`)
      num_filters (int, optional): The number of filters to use.
          (default: :obj:`128`)
      num_interactions (int, optional): The number of interaction blocks.
          (default: :obj:`6`)
      num_gaussians (int, optional): The number of gaussians :math:`\mu`.
          (default: :obj:`50`)
      interaction_graph (callable, optional): The function used to compute
          the pairwise interaction graph and interatomic distances. If set to
          :obj:`None`, will construct a graph based on :obj:`cutoff` and
          :obj:`max_num_neighbors` properties.
          If provided, this method takes in :obj:`pos` and :obj:`batch`
          tensors and should return :obj:`(edge_index, edge_weight)` tensors.
          (default :obj:`None`)
      cutoff (float, optional): Cutoff distance for interatomic interactions.
          (default: :obj:`10.0`)
      max_num_neighbors (int, optional): The maximum number of neighbors to
          collect for each node within the :attr:`cutoff` distance.
          (default: :obj:`32`)
      readout (str, optional): Whether to apply :obj:`"add"` or :obj:`"mean"`
          global aggregation. (default: :obj:`"add"`)
      dipole (bool, optional): If set to :obj:`True`, will use the magnitude
          of the dipole moment to make the final prediction, *e.g.*, for
          target 0 of :class:`torch_geometric.datasets.QM9`.
          (default: :obj:`False`)
      mean (float, optional): The mean of the property to predict.
          (default: :obj:`None`)
      std (float, optional): The standard deviation of the property to
          predict. (default: :obj:`None`)
      atomref (torch.Tensor, optional): The reference of single-atom
          properties.
          Expects a vector of shape :obj:`(max_atomic_number, )`.
class_docstr_tok: ["The","continuous-filter","convolutional","neural","network","SchNet","from","the","`","``","SchNet",":","A","Continuous-filter","Convolutional","Neural","Network","for","Modeling","Quantum","Interactions","''","<","https",":","\/\/arxiv.org\/abs\/1706.08566",">","`","_","paper","that","uses","the","interactions","blocks","of","the","form",".","..","math",":",":","\\mathbf","{","x","}","^","{","\\prime","}","_i","=","\\sum_","{","j","\\in","\\mathcal","{","N","}","(","i",")","}","\\mathbf","{","x","}","_j","\\odot","h_","{","\\mathbf","{","\\Theta","}","}","(","\\exp","(","-\\gamma","(","\\mathbf","{","e","}","_","{","j",",","i","}","-","\\mathbf","{","\\mu","}",")",")",")",",","here",":","math",":","`","h_","{","\\mathbf","{","\\Theta","}","}","`","denotes","an","MLP","and",":","math",":","`","\\mathbf","{","e","}","_","{","j",",","i","}","`","denotes","the","interatomic","distances","between","atoms",".","..","note",":",":","For","an","example","of","using","a","pretrained","SchNet","variant",",","see","`","examples\/qm9_pretrained_schnet.py","<","https",":","\/\/github.com\/pyg-team\/pytorch_geometric\/blob\/master\/examples\/","qm9_pretrained_schnet.py",">","`","_",".","Args",":","hidden_channels","(","int",",","optional",")",":","Hidden","embedding","size",".","(","default",":",":","obj",":","`","128","`",")","num_filters","(","int",",","optional",")",":","The","number","of","filters","to","use",".","(","default",":",":","obj",":","`","128","`",")","num_interactions","(","int",",","optional",")",":","The","number","of","interaction","blocks",".","(","default",":",":","obj",":","`","6","`",")","num_gaussians","(","int",",","optional",")",":","The","number","of","gaussians",":","math",":","`","\\mu","`",".","(","default",":",":","obj",":","`","50","`",")","interaction_graph","(","callable",",","optional",")",":","The","function","used","to","compute","the","pairwise","interaction","graph","and","interatomic","distances",".","If","set","to",":","obj",":","`","None","`",",","will","construct","a","graph","based","on",":","obj",":","`","cutoff","`","and",":","obj",":","`","max_num_neighbors","`","properties",".","If","provided",",","this","method","takes","in",":","obj",":","`","pos","`","and",":","obj",":","`","batch","`","tensors","and","should","return",":","obj",":","`","(","edge_index",",","edge_weight",")","`","tensors",".","(","default",":","obj",":","`","None","`",")","cutoff","(","float",",","optional",")",":","Cutoff","distance","for","interatomic","interactions",".","(","default",":",":","obj",":","`","10.0","`",")","max_num_neighbors","(","int",",","optional",")",":","The","maximum","number","of","neighbors","to","collect","for","each","node","within","the",":","attr",":","`","cutoff","`","distance",".","(","default",":",":","obj",":","`","32","`",")","readout","(","str",",","optional",")",":","Whether","to","apply",":","obj",":","`","``","add","''","`","or",":","obj",":","`","``","mean","''","`","global","aggregation",".","(","default",":",":","obj",":","`","``","add","''","`",")","dipole","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","will","use","the","magnitude","of","the","dipole","moment","to","make","the","final","prediction",",","*","e.g",".","*",",","for","target","0","of",":","class",":","`","torch_geometric.datasets.QM9","`",".","(","default",":",":","obj",":","`","False","`",")","mean","(","float",",","optional",")",":","The","mean","of","the","property","to","predict",".","(","default",":",":","obj",":","`","None","`",")","std","(","float",",","optional",")",":","The","standard","deviation","of","the","property","to","predict",".","(","default",":",":","obj",":","`","None","`",")","atomref","(","torch.Tensor",",","optional",")",":","The","reference","of","single-atom","properties",".","Expects","a","vector","of","shape",":","obj",":","`","(","max_atomic_number",",",")","`","."]
code: def __init__(
      self,
      hidden_channels: int = 128,
      num_filters: int = 128,
      num_interactions: int = 6,
      num_gaussians: int = 50,
      cutoff: float = 10.0,
      interaction_graph: Optional[Callable] = None,
      max_num_neighbors: int = 32,
      readout: str = "add",
      dipole: bool = False,
      mean: Optional[float] = None,
      std: Optional[float] = None,
      atomref: OptTensor = None,
  ):
      super().__init__()
  
      self.hidden_channels = hidden_channels
      self.num_filters = num_filters
      self.num_interactions = num_interactions
      self.num_gaussians = num_gaussians
      self.cutoff = cutoff
      self.dipole = dipole
      self.sum_aggr = SumAggregation()
      self.readout = aggr_resolver("sum" if self.dipole else readout)
      self.mean = mean
      self.std = std
      self.scale = None
  
      if self.dipole:
          import ase
  
          atomic_mass = torch.from_numpy(ase.data.atomic_masses)
          self.register_buffer("atomic_mass", atomic_mass)
  
      # Support z == 0 for padding atoms so that their embedding vectors
      # are zeroed and do not receive any gradients.
      self.embedding = Embedding(100, hidden_channels, padding_idx=0)
  
      if interaction_graph is not None:
          self.interaction_graph = interaction_graph
      else:
          self.interaction_graph = RadiusInteractionGraph(
              cutoff, max_num_neighbors
          )
  
      self.distance_expansion = GaussianSmearing(
          0.0, cutoff, num_gaussians
      )
  
      self.interactions = ModuleList()
      for _ in range(num_interactions):
          block = InteractionBlock(
              hidden_channels, num_gaussians, num_filters, cutoff
          )
          self.interactions.append(block)
  
      self.lin1 = Linear(hidden_channels, hidden_channels // 2)
      self.act = ShiftedSoftplus()
      self.lin2 = Linear(hidden_channels // 2, 1)
  
      self.register_buffer("initial_atomref", atomref)
      self.atomref = None
      if atomref is not None:
          self.atomref = Embedding(100, 1)
          self.atomref.weight.data.copy_(atomref)
  
      self.reset_parameters()
  
imports: import os
  import os.path
  import warnings
  from math import pi
  from typing import Callable, Dict, Optional, Tuple
  import numpy
  import torch
  import torch.nn.functional
  from torch import Tensor
  from torch.nn import Embedding, Linear, ModuleList, Sequential
  from torch_geometric.data import Dataset, download_url, extract_zip
  from torch_geometric.nn import MessagePassing, SumAggregation, radius_graph
  from torch_geometric.nn.resolver import aggregation_resolver
  from torch_geometric.typing import OptTensor
label_desc: Use image node_id 1 to create a new SchNet object from inherited base classes: torch.nn with example: obj = SchNet(hidden_channels, num_filters, num_interactions, num_gaussians, cutoff, interaction_graph, max_num_neighbors, readout, dipole, mean, std, atomref)