openff.recharge.utilities.geometry.compute_vector_field
- openff.recharge.utilities.geometry.compute_vector_field(points_a: ndarray, points_b: ndarray) ndarray [source]
- openff.recharge.utilities.geometry.compute_vector_field(points_a: torch.Tensor, points_b: torch.Tensor) torch.Tensor
Computes a tensor containing the vectors which point from all of the points in
points_a
to all of the points inpoints_b
and have magnitudes equal to the inverse squared distance between the points.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 vector field tensor with shape=(n_points_b, n_dim, n_points_a) and where
tensor[i, :, j] = (b_i - a_j) / ||b_i - a_j|| ^ 3)