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 from the external compound database that is ready to be compared with the hit list.

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 the information (SMILES and labels) of similar molecules to the hit molecule from the external compound database if it exists (returned boolean will be true). Method should be used after the compound database has been prepared using the Prep method.

HasNewFingerPrints

bool HasNewFingerPrints()

Returns true if new fingerprints have been generated during the preparation process.

See also Prep method.

IsPrepared

bool IsPrepared()

Returns the preparation status of the external compound database.

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 the newly generated fingerprints for the cpddbifs in an output stream to be used for improved efficiency in future runs over current usage.

See also HasNewFingerPrints method.