aenet.torch_featurize.ChebyshevPolynomials
- class aenet.torch_featurize.ChebyshevPolynomials(*args: Any, **kwargs: Any)[source]
Vectorized Chebyshev polynomial evaluation using cosine form.
Uses T_n(x) = cos(n * arccos(x)) for numerical stability and efficient vectorization across all polynomial orders.
- Parameters:
max_order (int) – Maximum Chebyshev polynomial order to compute
r_min (float) – Minimum distance (inner cutoff) in Angstroms
r_max (float) – Maximum distance (outer cutoff) in Angstroms
dtype (torch.dtype, optional) – Data type for computations (default: torch.float64)
Examples
>>> cheb = ChebyshevPolynomials(max_order=5, r_min=0.5, r_max=4.0) >>> r = torch.tensor([1.0, 2.0, 3.0], dtype=torch.float64) >>> T = cheb(r) # Shape: (3, 6) for orders 0-5
Methods
__init__(max_order, r_min, r_max[, dtype])cutoff_derivative(r, Rc)Derivative of the cosine cutoff function.
cutoff_function(r, Rc)Cosine cutoff function.
evaluate_with_derivatives(r)Evaluate Chebyshev polynomials and their derivatives.
forward(r)Evaluate Chebyshev polynomials for given distances.
rescale_distances(r)Rescale distances from [r_min, r_max] to [-1, 1].