code: def __init__(
      self, num_spherical, num_radial, cutoff=5.0, envelope_exponent=5
  ):
      super(torsion_emb, self).__init__()
      assert num_radial <= 64
      self.num_spherical = num_spherical  #
      self.num_radial = num_radial
      self.cutoff = cutoff
      # self.envelope = Envelope(envelope_exponent)
  
      bessel_forms = bessel_basis(num_spherical, num_radial)
      sph_harm_forms = real_sph_harm(num_spherical, zero_m_only=False)
      self.sph_funcs = []
      self.bessel_funcs = []
  
      x = sym.symbols("x")
      theta = sym.symbols("theta")
      phi = sym.symbols("phi")
      modules = {"sin": torch.sin, "cos": torch.cos}
      for i in range(self.num_spherical):
          if i == 0:
              sph1 = sym.lambdify(
                  [theta, phi], sph_harm_forms[i][0], modules
              )
              self.sph_funcs.append(
                  lambda x, y: torch.zeros_like(x)
                  + torch.zeros_like(y)
                  + sph1(0, 0)
              )  # torch.zeros_like(x) + torch.zeros_like(y)
          else:
              for k in range(-i, i + 1):
                  sph = sym.lambdify(
                      [theta, phi], sph_harm_forms[i][k + i], modules
                  )
                  self.sph_funcs.append(sph)
          for j in range(self.num_radial):
              bessel = sym.lambdify([x], bessel_forms[i][j], modules)
              self.bessel_funcs.append(bessel)
  
imports: import numpy
  from scipy.optimize import brentq
  from scipy import special
  import torch
  from math import sqrt, pi
label_desc: Use image node_id 1 to create a new torsion_emb object from inherited base classes: torch.nn with example: obj = torsion_emb(num_spherical, num_radial, cutoff, envelope_exponent)