getSubstructMatches#
- nvmolkit.substructure.getSubstructMatches(
- targets: Sequence[Mol],
- queries: Sequence[Mol],
- config: SubstructSearchConfig | None = None,
Perform batch substructure matching on GPU, returning full atom-index mappings.
Supports match deduplication (
uniquify) and recursive SMARTS queries. Does not currently support chirality-aware matching (useChirality), enhanced stereochemistry (useEnhancedStereo), or other advanced RDKitSubstructMatchParametersoptions.- Parameters:
targets – List of target RDKit molecules.
queries – List of query RDKit molecules (typically from SMARTS).
config –
SubstructSearchConfigwith execution settings. IfNone, uses default configuration.
- Returns:
A
SubstructMatchResultsproviding list-like access to match results. Index asresults[target_idx][query_idx]to get a list of numpy arrays, each containing the target atom indices for one match.