class_docstr: The re-implementation for DimeNet++ from the `"Fast and Uncertainty-Aware Directional Message Passing for Non-Equilibrium Molecules" <https://arxiv.org/abs/2011.14115>`_ paper
  under the 3DGN gramework from `"Spherical Message Passing for 3D Molecular Graphs" <https://openreview.net/forum?id=givsRXsOt9r>`_ paper.
  
  Args:
      energy_and_force (bool, optional): If set to :obj:`True`, will predict energy and take the negative of the derivative of the energy with respect to the atomic positions as predicted forces. (default: :obj:`False`)
      cutoff (float, optional): Cutoff distance for interatomic interactions. (default: :obj:`5.0`)
      num_layers (int, optional): Number of building blocks. (default: :obj:`4`)
      hidden_channels (int, optional): Hidden embedding size. (default: :obj:`128`)
      out_channels (int, optional): Size of each output sample. (default: :obj:`1`)
      int_emb_size (int, optional): Embedding size used for interaction triplets. (default: :obj:`64`)
      basis_emb_size (int, optional): Embedding size used in the basis transformation. (default: :obj:`8`)
      out_emb_channels (int, optional): Embedding size used for atoms in the output block. (default: :obj:`256`)
      num_spherical (int, optional): Number of spherical harmonics. (default: :obj:`7`)
      num_radial (int, optional): Number of radial basis functions. (default: :obj:`6`)
      envelop_exponent (int, optional): Shape of the smooth cutoff. (default: :obj:`5`)
      num_before_skip (int, optional): Number of residual layers in the interaction blocks before the skip connection. (default: :obj:`1`)
      num_after_skip (int, optional): Number of residual layers in the interaction blocks before the skip connection. (default: :obj:`2`)
      num_output_layers (int, optional): Number of linear layers for the output blocks. (default: :obj:`3`)
      act: (function, optional): The activation funtion. (default: :obj:`swish`) 
      output_init: (str, optional): The initialization fot the output. It could be :obj:`GlorotOrthogonal` and :obj:`zeros`. (default: :obj:`GlorotOrthogonal`)       
class_docstr_tok: ["The","re-implementation","for","DimeNet++","from","the","`","``","Fast","and","Uncertainty-Aware","Directional","Message","Passing","for","Non-Equilibrium","Molecules","''","<","https",":","\/\/arxiv.org\/abs\/2011.14115",">","`","_","paper","under","the","3DGN","gramework","from","`","``","Spherical","Message","Passing","for","3D","Molecular","Graphs","''","<","https",":","\/\/openreview.net\/forum","?","id=givsRXsOt9r",">","`","_","paper",".","Args",":","energy_and_force","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","will","predict","energy","and","take","the","negative","of","the","derivative","of","the","energy","with","respect","to","the","atomic","positions","as","predicted","forces",".","(","default",":",":","obj",":","`","False","`",")","cutoff","(","float",",","optional",")",":","Cutoff","distance","for","interatomic","interactions",".","(","default",":",":","obj",":","`","5.0","`",")","num_layers","(","int",",","optional",")",":","Number","of","building","blocks",".","(","default",":",":","obj",":","`","4","`",")","hidden_channels","(","int",",","optional",")",":","Hidden","embedding","size",".","(","default",":",":","obj",":","`","128","`",")","out_channels","(","int",",","optional",")",":","Size","of","each","output","sample",".","(","default",":",":","obj",":","`","1","`",")","int_emb_size","(","int",",","optional",")",":","Embedding","size","used","for","interaction","triplets",".","(","default",":",":","obj",":","`","64","`",")","basis_emb_size","(","int",",","optional",")",":","Embedding","size","used","in","the","basis","transformation",".","(","default",":",":","obj",":","`","8","`",")","out_emb_channels","(","int",",","optional",")",":","Embedding","size","used","for","atoms","in","the","output","block",".","(","default",":",":","obj",":","`","256","`",")","num_spherical","(","int",",","optional",")",":","Number","of","spherical","harmonics",".","(","default",":",":","obj",":","`","7","`",")","num_radial","(","int",",","optional",")",":","Number","of","radial","basis","functions",".","(","default",":",":","obj",":","`","6","`",")","envelop_exponent","(","int",",","optional",")",":","Shape","of","the","smooth","cutoff",".","(","default",":",":","obj",":","`","5","`",")","num_before_skip","(","int",",","optional",")",":","Number","of","residual","layers","in","the","interaction","blocks","before","the","skip","connection",".","(","default",":",":","obj",":","`","1","`",")","num_after_skip","(","int",",","optional",")",":","Number","of","residual","layers","in","the","interaction","blocks","before","the","skip","connection",".","(","default",":",":","obj",":","`","2","`",")","num_output_layers","(","int",",","optional",")",":","Number","of","linear","layers","for","the","output","blocks",".","(","default",":",":","obj",":","`","3","`",")","act",":","(","function",",","optional",")",":","The","activation","funtion",".","(","default",":",":","obj",":","`","swish","`",")","output_init",":","(","str",",","optional",")",":","The","initialization","fot","the","output",".","It","could","be",":","obj",":","`","GlorotOrthogonal","`","and",":","obj",":","`","zeros","`",".","(","default",":",":","obj",":","`","GlorotOrthogonal","`",")"]
code: def __init__(
      self,
      energy_and_force=False,
      cutoff=5.0,
      num_layers=4,
      hidden_channels=128,
      out_channels=1,
      int_emb_size=64,
      basis_emb_size=8,
      out_emb_channels=256,
      num_spherical=7,
      num_radial=6,
      envelope_exponent=5,
      num_before_skip=1,
      num_after_skip=2,
      num_output_layers=3,
      act=swish,
      output_init="GlorotOrthogonal",
  ):
      super(DimeNetPP, self).__init__()
  
      self.cutoff = cutoff
      self.energy_and_force = energy_and_force
  
      self.init_e = init(num_radial, hidden_channels, act)
      self.init_v = update_v(
          hidden_channels,
          out_emb_channels,
          out_channels,
          num_output_layers,
          act,
          output_init,
      )
      self.init_u = update_u()
      self.emb = emb(
          num_spherical, num_radial, self.cutoff, envelope_exponent
      )
  
      self.update_vs = torch.nn.ModuleList(
          [
              update_v(
                  hidden_channels,
                  out_emb_channels,
                  out_channels,
                  num_output_layers,
                  act,
                  output_init,
              )
              for _ in range(num_layers)
          ]
      )
  
      self.update_es = torch.nn.ModuleList(
          [
              update_e(
                  hidden_channels,
                  int_emb_size,
                  basis_emb_size,
                  num_spherical,
                  num_radial,
                  num_before_skip,
                  num_after_skip,
                  act,
              )
              for _ in range(num_layers)
          ]
      )
  
      self.update_us = torch.nn.ModuleList(
          [update_u() for _ in range(num_layers)]
      )
  
      self.reset_parameters()
  
imports: import torch
  from torch import nn
  from torch.nn import Linear, Embedding
  from torch_geometric.nn.inits import glorot_orthogonal
  from torch_geometric.nn import radius_graph
  from torch_scatter import scatter
  from math import sqrt
  from ...utils import xyz_to_dat
  from .features import dist_emb, angle_emb
label_desc: Use image node_id 1 to create a new DimeNetPP object from inherited base classes: torch.nn with example: obj = DimeNetPP(energy_and_force, cutoff, num_layers, hidden_channels, out_channels, int_emb_size, basis_emb_size, out_emb_channels, num_spherical, num_radial, envelope_exponent, num_before_skip, num_after_skip, num_output_layers, act, output_init)