MolecularDiffusion.modules.layers.esen.nn.radial

Copyright (c) Meta, Inc. and its affiliates.

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Classes

EnvelopedBesselBasis

GaussianSmearing

PolynomialEnvelope

Polynomial envelope function that ensures a smooth cutoff.

RadialMLP

Contruct a radial function (linear layers + layer normalization + SiLU) given a list of channels

SphericalBesselBasis

1D spherical Bessel basis

Functions

gaussian(→ torch.Tensor)

Module Contents

class MolecularDiffusion.modules.layers.esen.nn.radial.EnvelopedBesselBasis(num_radial: int, cutoff: float)

Bases: torch.nn.Module

forward(d)
envelope
inv_cutoff
rbf
class MolecularDiffusion.modules.layers.esen.nn.radial.GaussianSmearing(start: float = -5.0, stop: float = 5.0, num_gaussians: int = 50, basis_width_scalar: float = 1.0)

Bases: torch.nn.Module

forward(dist) torch.Tensor
coeff
num_output = 50
class MolecularDiffusion.modules.layers.esen.nn.radial.PolynomialEnvelope(exponent: int = 5)

Bases: torch.nn.Module

Polynomial envelope function that ensures a smooth cutoff.

forward(d_scaled: torch.Tensor) torch.Tensor
a: float
b: float
c: float
p: float
class MolecularDiffusion.modules.layers.esen.nn.radial.RadialMLP(channels_list)

Bases: torch.nn.Module

Contruct a radial function (linear layers + layer normalization + SiLU) given a list of channels

forward(inputs: torch.Tensor) torch.Tensor
net
class MolecularDiffusion.modules.layers.esen.nn.radial.SphericalBesselBasis(num_radial: int, cutoff: float)

Bases: torch.nn.Module

1D spherical Bessel basis

Parameters:
  • num_radial (int) – Controls maximum frequency.

  • cutoff (float) – Cutoff distance in Angstrom.

forward(d_scaled: torch.Tensor) torch.Tensor
frequencies
norm_const
MolecularDiffusion.modules.layers.esen.nn.radial.gaussian(x: torch.Tensor, mean, std) torch.Tensor