SubstructMatchResults#

class nvmolkit.substructure.SubstructMatchResults(
atom_indices: ndarray,
match_indptr: ndarray,
pair_indptr: ndarray,
shape: tuple[int, int],
)#

Results of a batch substructure search.

Indexable as results[target_idx][query_idx] to obtain a list of numpy arrays, each containing the target atom indices for one match. Also supports results.get_pair(target_idx, query_idx) for direct access.

get_pair(
target_idx: int,
query_idx: int,
) list[ndarray]#

Return matches for a single (target, query) pair.

Parameters:
  • target_idx – Index into the targets list.

  • query_idx – Index into the queries list.

Returns:

List of numpy arrays, each containing target atom indices for one match.