11#ifndef RD_MULTIFPBREADER_H_APR2016
12#define RD_MULTIFPBREADER_H_APR2016
55 typedef std::tuple<double, unsigned int, unsigned int>
ResultTuple;
65 df_initOnSearch(initOnSearch),
66 df_takeOwnership(false) {}
74 MultiFPBReader(std::vector<FPBReader *> &readers,
bool takeOwnership =
false,
75 bool initOnSearch =
false);
79 if (df_takeOwnership) {
80 for (
auto &rdr : d_readers) {
96 unsigned int length()
const {
return d_readers.size(); }
123 d_readers.push_back(rdr);
127 return d_readers.size();
143 double threshold = 0.7,
144 int numThreads = 1)
const;
147 boost::shared_array<std::uint8_t> bv,
double threshold = 0.7,
148 int numThreads = 1)
const {
153 double threshold = 0.7,
154 int numThreads = 1)
const;
171 double ca,
double cb,
172 double threshold = 0.7,
173 int numThreads = 1)
const;
176 boost::shared_array<std::uint8_t> bv,
double ca,
double cb,
177 double threshold = 0.7,
int numThreads = 1)
const {
182 double ca,
double cb,
183 double threshold = 0.7,
184 int numThreads = 1)
const;
191 const std::uint8_t *bv,
int numThreads = 1)
const;
194 boost::shared_array<std::uint8_t> bv,
int numThreads = 1)
const {
202 std::vector<FPBReader *> d_readers;
203 bool df_init{
false}, df_initOnSearch{
false}, df_takeOwnership{
false};
209 MultiFPBReader(
const MultiFPBReader &);
210 MultiFPBReader &operator=(
const MultiFPBReader &);
contains a simple class for reading and searching FPB files
#define PRECONDITION(expr, mess)
a class for bit vectors that are densely occupied
class for reading and searching FPB files
void init()
Read the data from the file and initialize internal data structures.
std::vector< ResultTuple > getTanimotoNeighbors(const std::uint8_t *bv, double threshold=0.7, int numThreads=1) const
returns tanimoto neighbors that are within a similarity threshold
std::vector< ResultTuple > getTverskyNeighbors(const std::uint8_t *bv, double ca, double cb, double threshold=0.7, int numThreads=1) const
returns Tversky neighbors that are within a similarity threshold
unsigned int length() const
returns the number of readers
std::vector< ResultTuple > getTverskyNeighbors(const ExplicitBitVect &ebv, double ca, double cb, double threshold=0.7, int numThreads=1) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
unsigned int addReader(FPBReader *rdr)
adds a new FPBReader to our list
void init()
Read the data from the file and initialize internal data structures.
MultiFPBReader(std::vector< FPBReader * > &readers, bool takeOwnership=false, bool initOnSearch=false)
MultiFPBReader(bool initOnSearch)
std::vector< std::pair< unsigned int, unsigned int > > getContainingNeighbors(boost::shared_array< std::uint8_t > bv, int numThreads=1) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::tuple< double, unsigned int, unsigned int > ResultTuple
unsigned int nBits() const
std::vector< ResultTuple > getTanimotoNeighbors(const ExplicitBitVect &ebv, double threshold=0.7, int numThreads=1) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::vector< ResultTuple > getTverskyNeighbors(boost::shared_array< std::uint8_t > bv, double ca, double cb, double threshold=0.7, int numThreads=1) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::vector< std::pair< unsigned int, unsigned int > > getContainingNeighbors(const std::uint8_t *bv, int numThreads=1) const
returns indices of all fingerprints that completely contain this one
std::vector< std::pair< unsigned int, unsigned int > > getContainingNeighbors(const ExplicitBitVect &ebv, int numThreads=1) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::vector< ResultTuple > getTanimotoNeighbors(boost::shared_array< std::uint8_t > bv, double threshold=0.7, int numThreads=1) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
FPBReader * getReader(unsigned int which)
returns a particular reader
#define RDKIT_DATASTRUCTS_EXPORT