PRELIMINARY-IMAGE This is a preliminary API until 2020.Oct and may be improved based on user feedback. It is currently available in C++ and Python.

class OESubSearchQuery

The OESubSearchQuery class is used to submit queries to be searched in a database (OESubSearchDatabase).


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.


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 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 OESubSearchDatabase::Search method.