find_coordinate_matching_permutation

find_coordinate_matching_permutation(coords, new_coords, return_row_ordering=False, tol=None): 

LLM Docstring

Find the permutation that best matches one set of coordinates to another by iterative nearest-neighbour assignment.

Builds the coordinate distance matrix and greedily pairs up the closest remaining atoms, optionally enforcing a maximum-deviation tol. Either the combined column permutation or the separate row/column orderings can be returned.

  • coords: np.ndarray

    the source coordinates

  • new_coords: np.ndarray

    the target coordinates

  • return_row_ordering: bool

    return separate row/column orderings

  • tol: float | None

    maximum allowed matching deviation (raises if exceeded)

  • :returns: np.ndarray | tuple

    the matching permutation (or the row/column orderings)


Feedback

Examples

Templates

Documentation