OESubSearchScreen

Attention

This API is currently available in C++ and Python.

class OESubSearchScreen : public OESystem::OEBitVector

OESubSearchScreen class represents substructure search screens that encode local and global features of query and target molecules. These screens can be used to accelerate the substructure search since target molecules that clearly can not be matched to the query can be rapidly eliminated. Only molecules that pass the screening phase are subjected to the more expensive atom-by-atom validation when using the search methods of the OESubSearchDatabase class. An OESubSearchScreen objects are typed bit-vectors (OEBitVector). The type determines what kind of queries in mind the screen was designed for (SMARTS, MDL query, or molecule query).

../../_images/Screen.png

Example of using substructure search screens to eliminate target molecules

Constructors

OESubSearchScreen()

The default constructor creates an uninitialized OESubSearchScreen object. The object can be initialized by calling either the OEMakeSubSearchQueryScreen function for query molecules or the OEMakeSubSearchTargetScreen function for target molecules.

Examples:

The following code snippet shows how to generate substructure screens:

mol = oechem.OEGraphMol()
oechem.OESmilesToMol(mol, "c1ccccc1")

screenA = oechem.OESubSearchScreen()
oechem.OEMakeSubSearchTargetScreen(screenA, mol, oechem.OESubSearchScreenType_Molecule)

screenB = oechem.OESubSearchScreen()
oechem.OEMakeSubSearchTargetScreen(screenB, mol, screenA.GetScreenType())

The following code snippet shows how to store and retrieve screens as generic data:

from openeye import oechem

tag = "SCREEN_DATA"
mol = oechem.OEGraphMol()
oechem.OESmilesToMol(mol, "c1ccccc1")

screen = oechem.OESubSearchScreen()
oechem.OEMakeSubSearchTargetScreen(screen, mol, oechem.OESubSearchScreenType_Molecule)

mol.SetData(tag, screen)
s = mol.GetData(tag)
stype = s.GetScreenType()
print("molecule has `{}` with `{}` identifier".format(stype.GetName(), tag))

OESubSearchScreen(const OESubSearchScreen &)=default

Copy constructor.

operator=

OESubSearchScreen &operator=(const OESubSearchScreen &)=default

Assignment operator.

GetScreenType

const OESubSearchScreenTypeBase *GetScreenType() const

Returns the type of the screen (OESubSearchScreenTypeBase).

IsValid

bool IsValid() const

Returns whether the OESubSearchScreen object has a valid screen type.