tfep.nn.embeddings.radial.behler_parrinello_cosine_switching_function

tfep.nn.embeddings.radial.behler_parrinello_cosine_switching_function(r_cutoff, r, force_zero_after_cutoff=True)[source]

Compute the value of the Behler-Parrinello switching function.

Parameters:
  • r_cutoff (float) – The cutoff imposed by the switching function. The units of r and r_cutoff must be the same.

  • r (torch.Tensor) – A tensor of shape (batch_size, n_atoms, n_atoms) where r[b, i, j] is the distance between atoms i and j for the b-th batch.

  • force_zero_after_cutoff (bool, optional) – If False, the function assumes that values after the cutoff are not provided and thus no element of the switching function needs to be explicitly set to 0.0. This can save a calculation if you have already removed distances greater than r_cutoff from r.

Returns:

switching_value – A tensor of shape (batch_size, n_atoms, n_atoms) where switching_value[b, i, j] is the value of the switching function between atoms i and j for the b-th batch.

Return type:

torch.Tensor