Repository navigation
Screen SubstructLibrary queries with pattern fingerprints - #361
Merged
scal444 merged 1 commit intoOct 8, 2026
Merged
Conversation
scal444
force-pushed
the
substructlib-4-pattern-screen
branch
from
October 8, 2026 16:48
264b773 to
53befc5
Compare
Contributor
|
scal444
force-pushed
the
substructlib-4-pattern-screen
branch
from
October 8, 2026 17:04
53befc5 to
851acf6
Compare
Keep an RDKit pattern fingerprint for every molecule and, before the exact search, screen each query on the GPU the way RDKit's PatternHolder does: a molecule passes only if it has at least as many atoms as the query and carries every query fingerprint bit. Each GPU stores its molecules' fingerprints transposed, one bitmap over molecules per fingerprint bit, so the screen ANDs the query's bitmaps rarest bit first and stops once no molecule in a 32-molecule word survives. Only molecules that pass are searched: hasSubstructMatch() takes an optional list of candidate targets, planned by the new MiniBatchPlanner::prepareSelectedTargetsMiniBatch(). Queries with recursive SMARTS still search every target, since recursive-pattern matching needs contiguous target ranges. Molecules matched with RDKit are screened on the CPU with the same fingerprints. The screen is on by default and never changes results; usePatternFingerprints=false turns it off, as does the benchmark's --no_pattern_fingerprints flag.
scal444
force-pushed
the
substructlib-4-pattern-screen
branch
from
October 8, 2026 17:28
851acf6 to
f113a3c
Compare
evasnow1992
approved these changes
Oct 8, 2026
evasnow1992
left a comment
Collaborator
There was a problem hiding this comment.
Changes look good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This matches RDKit's pattern fingerprint prescreening, with a ~5-6x speedup.
Final PR for #350