OECPDDatabase

Attention

This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python.

class OECPDDatabase

This class provides an interface to use an external compound database to identify similar compounds to a Brood-generated hitlist, as described in Similarity to available compounds.

The OECPDDatabase class defines the following public methods:

Constructor

OECPDDatabase()

Default constructor.

GetNumMolecules

unsigned GetNumMolecules()

Returns the number of molecules in the prepared external compound database that are ready for hitlist comparison.

See also IsPrepared method.

GetSimilarMolecules

bool GetSimilarMolecules(const OEChem::OEMolBase& hitMol,
                         std::vector<std::string>& vecCpddbInfo)
std::vector<std::string> GetSimilarMolecules(const OEChem::OEMolBase& hitMol)

Retrieves information (SMILES and labels) for molecules similar to the provided hit molecule from the external compound database. The bool overload returns true when similar molecules are found. This method should be used after the compound database has been prepared using the Prep method.

HasNewFingerPrints

bool HasNewFingerPrints()

Returns true if new fingerprints were generated during preparation.

See also Prep method.

IsPrepared

bool IsPrepared()

Returns whether the external compound database has been prepared.

Prep

unsigned Prep(OEChem::oemolistream& cpddbifs,
              OESystem::OETracerBase& tracer = OESystem::OENoTracer)

Prepares the input stream molecules by generating 2D fingerprints for each, if they do not already have one. The method returns an unsigned. The unsigned code number can be extracted using OEGetBroodStatus.

Write

bool Write(OEChem::oemolistream& cpddbifs,
           OEChem::oemolostream& cpddbofs)

Writes newly generated fingerprints from cpddbifs into cpddbofs for more efficient reuse in future runs.

See also HasNewFingerPrints method.