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() -> OECPDDatabase

Default constructor.

GetNumMolecules

GetNumMolecules() -> int

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

See also IsPrepared method.

GetSimilarMolecules

GetSimilarMolecules(hitMol: Union[OEGraphMol,OEMol,OEQMol]) -> OEStringVector

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

HasNewFingerPrints() -> bool

Returns true if new fingerprints were generated during preparation.

See also Prep method.

IsPrepared

IsPrepared() -> bool

Returns whether the external compound database has been prepared.

Prep

Prep(cpddbifs: oemolistream, tracer: OETracerBase = OENoTracer) -> int

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

Write(cpddbifs: oemolistream, cpddbofs: oemolostream) -> bool

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

See also HasNewFingerPrints method.