mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-05 22:04:27 +08:00
Minor tweaks to SubstructLibrary (#3564)
* - added some missing const keywords - added an addFingerprint overload to allow passing pointers - added a test * changes in response to review * removed print * added missing shared_ptr declaration * added PatternNumBitsHolder serialization * - merged with upstream changes and resolved conflicts - got rid of PatternNumBitsHolder and leveraged the serialization version to get the PatternHolder to be backwards-compatible * built substructLibV1.pkl with an older version of boost * reverted serialization version to 1 only write numBits if != 2048 and only read numBits if it exists in the archive * bogus commit just to trigger a rebuild
This commit is contained in:
@@ -276,7 +276,7 @@ int internalGetMatches(
|
||||
|
||||
std::vector<unsigned int> SubstructLibrary::getMatches(
|
||||
const ROMol &query, bool recursionPossible, bool useChirality,
|
||||
bool useQueryQueryMatches, int numThreads, int maxResults) {
|
||||
bool useQueryQueryMatches, int numThreads, int maxResults) const {
|
||||
return getMatches(query, 0, mols->size(), recursionPossible, useChirality,
|
||||
useQueryQueryMatches, numThreads, maxResults);
|
||||
}
|
||||
@@ -284,7 +284,7 @@ std::vector<unsigned int> SubstructLibrary::getMatches(
|
||||
std::vector<unsigned int> SubstructLibrary::getMatches(
|
||||
const ROMol &query, unsigned int startIdx, unsigned int endIdx,
|
||||
bool recursionPossible, bool useChirality, bool useQueryQueryMatches,
|
||||
int numThreads, int maxResults) {
|
||||
int numThreads, int maxResults) const {
|
||||
std::vector<unsigned int> idxs;
|
||||
internalGetMatches(query, *mols, fps, startIdx, endIdx,
|
||||
recursionPossible, useChirality,
|
||||
@@ -296,7 +296,7 @@ unsigned int SubstructLibrary::countMatches(const ROMol &query,
|
||||
bool recursionPossible,
|
||||
bool useChirality,
|
||||
bool useQueryQueryMatches,
|
||||
int numThreads) {
|
||||
int numThreads) const {
|
||||
return countMatches(query, 0, mols->size(), recursionPossible, useChirality,
|
||||
useQueryQueryMatches, numThreads);
|
||||
}
|
||||
@@ -304,7 +304,7 @@ unsigned int SubstructLibrary::countMatches(const ROMol &query,
|
||||
unsigned int SubstructLibrary::countMatches(
|
||||
const ROMol &query, unsigned int startIdx, unsigned int endIdx,
|
||||
bool recursionPossible, bool useChirality, bool useQueryQueryMatches,
|
||||
int numThreads) {
|
||||
int numThreads) const {
|
||||
return internalGetMatches(query, *mols, fps, startIdx, endIdx,
|
||||
recursionPossible, useChirality,
|
||||
useQueryQueryMatches, numThreads, -1);
|
||||
@@ -312,7 +312,7 @@ unsigned int SubstructLibrary::countMatches(
|
||||
|
||||
bool SubstructLibrary::hasMatch(const ROMol &query, bool recursionPossible,
|
||||
bool useChirality, bool useQueryQueryMatches,
|
||||
int numThreads) {
|
||||
int numThreads) const {
|
||||
const int maxResults = 1;
|
||||
return getMatches(query, recursionPossible, useChirality,
|
||||
useQueryQueryMatches, numThreads, maxResults)
|
||||
@@ -322,7 +322,7 @@ bool SubstructLibrary::hasMatch(const ROMol &query, bool recursionPossible,
|
||||
bool SubstructLibrary::hasMatch(const ROMol &query, unsigned int startIdx,
|
||||
unsigned int endIdx, bool recursionPossible,
|
||||
bool useChirality, bool useQueryQueryMatches,
|
||||
int numThreads) {
|
||||
int numThreads) const {
|
||||
const int maxResults = 1;
|
||||
return getMatches(query, startIdx, endIdx, recursionPossible, useChirality,
|
||||
useQueryQueryMatches, numThreads, maxResults)
|
||||
|
||||
Reference in New Issue
Block a user