uf3.representation.angles.generate_triplets¶
- generate_triplets(i_where: numpy.ndarray, j_where: numpy.ndarray, sup_composition: numpy.ndarray, hashes: numpy.ndarray, distance_matrix: numpy.ndarray, knot_sets: List[List[numpy.ndarray]]) List[Tuple][source]¶
Identify unique “i-j-j’” tuples by combining provided i-j pairs, then compute i-j, i-k, and j-k pair distances from i-j-k tuples,
distance matrix, and knot sequence for cutoffs.
TODO: refactor to break up into smaller, reusable functions
- Parameters
i_where (np.ndarray) – sorted “i” indices
j_where (np.ndarray) – sorted “j” indices
sup_composition (np.ndarray) – composition given by atomic numbers.
hashes (np.ndarray) – array of unique integer hashes for interactions.
distance_matrix (np.ndarray) – pair distance matrix.
knot_sets (np.ndarray) – list of lists of knot sequences per interaction
- Returns
array of shape (n_triangles, 3)
- Return type
tuples_idx (np.ndarray)