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
randr_cutoffmust be the same.r (torch.Tensor) – A tensor of shape
(batch_size, n_atoms, n_atoms)wherer[b, i, j]is the distance between atomsiandjfor theb-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 thanr_cutofffromr.
- Returns:
switching_value – A tensor of shape
(batch_size, n_atoms, n_atoms)whereswitching_value[b, i, j]is the value of the switching function between atomsiandjfor theb-th batch.- Return type:
torch.Tensor