Radial functions
Radial basis functions turn distances into scalar model features. ELFES includes fixed and learnable spherical Bessel bases and a fixed Gaussian basis. PolynomialEnvelope supplies a smooth cutoff factor that can be combined with a distance expansion.
SphericalBesselBasis
SphericalBesselBasis(cutoff: float, num_basis: int)
Bases: _SphericalBesselBasis
Fixed orthonormal zero-order spherical Bessel radial basis.
For cutoff radius \(r_\mathrm{c}\) and \(n = 1, \ldots, N\), the basis functions are
They are orthonormal on \([0, r_\mathrm{c}]\) with radial measure \(r^2\,\mathrm{d}r\). At the origin, the implementation uses the analytic limit
The frequencies \(n\pi\) are fixed.
Parameters:
-
cutoff(float) –Cutoff radius \(r_\mathrm{c}\).
-
num_basis(int) –Number of basis functions \(N\).
LearnableSphericalBesselBasis
LearnableSphericalBesselBasis(cutoff: float, num_basis: int)
Bases: _SphericalBesselBasis
Learnable zero-order spherical Bessel radial basis.
This basis has the same initial functions as :class:SphericalBesselBasis,
but optimizes their dimensionless frequencies, initialized to
\(n\pi\) for \(n = 1, \ldots, N\).
Parameters:
-
cutoff(float) –Cutoff radius \(r_\mathrm{c}\).
-
num_basis(int) –Number of basis functions \(N\).
GaussianBasis
GaussianBasis(cutoff: float, num_basis: int, *, width_scale: float = 2.0)
Bases: Module
Fixed Gaussian basis with uniformly spaced centers.
For \(n = 0, \ldots, N - 1\), define
The basis functions are
The centers and widths are fixed rather than learned. Gaussian functions do not vanish at \(r_\mathrm{c}\), so a separate cutoff remains necessary when edge messages must go smoothly to zero.
Parameters:
-
cutoff(float) –Cutoff radius \(r_\mathrm{c}\) and location of the final center.
-
num_basis(int) –Number of Gaussian functions \(N\); must be at least two.
-
width_scale(float, default:2.0) –Width scale \(s\) relative to the center spacing.
PolynomialEnvelope
PolynomialEnvelope(cutoff: float, power: int = 6)
Bases: Module
DimeNet polynomial envelope with two vanishing derivatives.
With \(x = r / r_\mathrm{c}\) and positive integer power \(p\), the cutoff is
Its value, slope, and curvature all reach zero at \(r_\mathrm{c}\), giving a smooth transition to zero. The default \(p = 6\) is the common NequIP-style choice.
Parameters:
-
cutoff(float) –Cutoff radius \(r_\mathrm{c}\).
-
power(int, default:6) –Polynomial power \(p\).