openff.recharge.utilities.geometry.compute_inverse_distance_matrix
- openff.recharge.utilities.geometry.compute_inverse_distance_matrix(points_a: ndarray, points_b: ndarray) ndarray [source]
- openff.recharge.utilities.geometry.compute_inverse_distance_matrix(points_a: torch.Tensor, points_b: torch.Tensor) torch.Tensor
Computes a matrix of the inverse distances between all of the points in
points_a
and all of the points inpoints_b
.Notes
This function is not currently vectorised but may be in the future.
- Parameters
points_a – The first list of points with shape=(n_points_a, n_dim).
points_b – The second list of points with shape=(n_points_b, n_dim).
- Returns
The squared distance matrix where
d_ij = 1.0 / sqrt((a_i - b_i) ^ 2)
with shape=(n_points_a, n_points_b).