The OEFastFPDatabase class is designed to perform rapid in-memory or memory-mapped fingerprint searches using the popcount method. Each OEFastFPDatabase object is associated with a fingerprint type (OEFPTypeBase) that is set when the database is initialized from a pre-generated binary fingerprint file.
GraphSim TK currently only supports the popcount search method for fingerprints with the size of multiple of 256. This means that the OEFPType.MACCS166 fingerprint type is currently not supported. When using other custom fingerprint types (see User-defined Fingerprint section) the size of the fingerprint must be a multiple of 256 in order to be able to search it with the popcount method.
OEFastFPDatabase gives identical results to OEFPDatabase. However OEFPDatabase calculates similarity scores in single precision (float) while OEFastFPDatabase uses double precision. As a result small similarity score differences can be observed.
OEFastFPDatabase(const std::string &dbfile, unsigned int memtype=OEFastFPDatabaseMemoryType::Default)
Constructs an OEFastFPDatabase object.
const OEFPTypeBase *GetFPTypeBase() const
OESystem::OEIterBase<OESimScore> *GetSortedScores(const OEChem::OEMolBase &mol, const OEFPDatabaseOptions &opts) const OESystem::OEIterBase<OESimScore> *GetSortedScores(const OEFingerPrint &fp, const OEFPDatabaseOptions &opts) const
Performs similarity calculations between a molecule or a fingerprint and the fingerprints stored in the OEFastFPDatabase object. It returns an iterator over the calculated similarity scores (OESimScore) in sorted order. Each OESimScore holds a similarity score and index of the corresponding fingerprint of the database.
bool IsValid() const
Returns whether the database was initialized correctly.