code: def __init__(self, num_radial, num_spherical, cutoff=8.0):
      super(angle_emb, self).__init__()
      assert num_radial <= 64
      self.num_spherical = num_spherical
      self.num_radial = num_radial
      self.cutoff = cutoff
  
      bessel_formulas = bessel_basis(num_spherical, num_radial)
      Y_lm = real_sph_harm(
          num_spherical, spherical_coordinates=True, zero_m_only=True
      )
      self.sph_funcs = []  # (num_spherical,)
      self.bessel_funcs = []  # (num_spherical * num_radial,)
  
      x = sym.symbols("x")
      theta = sym.symbols("theta")
      modules = {"sin": torch.sin, "cos": torch.cos, "sqrt": torch.sqrt}
      m = 0  # only single angle
      for l in range(len(Y_lm)):  # num_spherical
          if l == 0:
              # Y_00 is only a constant -> function returns value and not tensor
              first_sph = sym.lambdify([theta], Y_lm[l][m], modules)
              self.sph_funcs.append(
                  lambda theta: torch.zeros_like(theta)
                  + first_sph(theta)
              )
          else:
              self.sph_funcs.append(
                  sym.lambdify([theta], Y_lm[l][m], modules)
              )
          for n in range(num_radial):
              self.bessel_funcs.append(
                  sym.lambdify([x], bessel_formulas[l][n], modules)
              )
  
file_path: DIG/dig/threedgraph/method/comenet/ocp/utils.py
imports: import torch
  import sympy
  import numpy
  from scipy.optimize import brentq
  from scipy import special
label_desc: Use image node_id 1 to create a new angle_emb object from inherited base classes: torch.nn with example: obj = angle_emb(num_radial, num_spherical, cutoff)