Envelopes¶
Available Envelopes¶
graph-pes
exposes the Envelope
base class, together with implementations of a few common envelope functions:
- class graph_pes.models.components.distances.PolynomialEnvelope(cutoff, p=6)[source]¶
Bases:
Envelope
A thrice differentiable envelope function.
where
is the cutoff radius, and .
Implementing a new Envelope¶
- class graph_pes.models.components.distances.Envelope(*args, **kwargs)[source]¶
Any envelope function,
, for smoothing potentials must implement a forward method that takes in a tensor of distances and returns a tensor of the same shape, where the values outside the cutoff are set to zero.- forward(r)[source]¶
Perform the envelope function.
- Parameters:
r (torch.Tensor) – The distances to envelope.
- Return type: