OESubSearchQuery(const OEQMolBase &query, const size_t maxmatches=1000u)
Creates an OESubSearchQuery object.
- The query molecule (OEQMolBase).
- The maximum number of matches that will be kept.
void SetFilter(const OESystem::OEUnaryPredicate<OEMolBase>&)
Sets a molecule predicate that can be used to filter out molecules based on molecular properties other than the existence of a certain substructure.
During the search, the predicate set by the OESubSearchQuery.SetFilter method is utilized after the screening phase and before the atom-by-atom validation of the substructure search match. Note that to minimize the memory footprints, the OESubSearchDatabase only stores the molecular graphs (no coordinates) and the titles of the molecules.
- Predicate Functors chapter
size_t GetMaxMatches() const
Returns the maximum match limit when searching OESubSearchDatabase. The OESubSearchDatabase.GetMatchIndices and OESubSearchDatabase.GetMatchTitles methods will terminate when this limit is reached. The default is 1000.
void SetMaxMatches(const size_t limit)
Sets the maximum match limit.
While there is no upper limit on how many matches can be retrieve by the search, it is not recommended to set this limit very high (>10K). Searching a very large database with a very generic query can result in internally storing millions of indices or titles. The total number of matches can be determined (without storing all matches) either using the OESubSearchDatabase.NumMatches method or via the OESubSearchResult.NumTotalMatches counter when using the OESubSearchDatabase.Search method.