countSubstructMatches#
- nvmolkit.substructure.countSubstructMatches(
- targets: Sequence[Mol],
- queries: Sequence[Mol],
- config: SubstructSearchConfig | None = None,
Count substructure matches per target/query pair.
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:
2-D numpy array of
intwith shape(len(targets), len(queries)).results[target_idx, query_idx]is the number of substructure matches.