Chemical Data Processing Library Python API - Version 1.4.0
Public Member Functions | Properties | List of all members
CDPL.Pharm.ScreeningDBAccessor Class Reference

Abstract base class for accessors that read the data stored in pharmacophore screening databases. More...

+ Inheritance diagram for CDPL.Pharm.ScreeningDBAccessor:

Public Member Functions

None __init__ ()
 Initializes the ScreeningDBAccessor instance.
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None open (str name)
 Opens the screening database identified by name. More...
 
None close ()
 Closes the currently open database.
 
str getDatabaseName ()
 Returns the name of the currently open database. More...
 
int getNumMolecules ()
 Returns the total number of molecules stored in the database. More...
 
int getNumPharmacophores ()
 Returns the total number of pharmacophores stored in the database (one per molecule conformer). More...
 
int getNumPharmacophores (int mol_idx)
 Returns the number of pharmacophores stored for the molecule at index mol_idx. More...
 
None getMolecule (int mol_idx, Chem.Molecule mol, bool overwrite=True)
 Reads the molecule at index mol_idx into mol. More...
 
None getPharmacophore (int pharm_idx, Pharmacophore pharm, bool overwrite=True)
 Reads the pharmacophore at index pharm_idx into pharm. More...
 
None getPharmacophore (int mol_idx, int mol_conf_idx, Pharmacophore pharm, bool overwrite=True)
 Reads the pharmacophore corresponding to conformer mol_conf_idx of molecule mol_idx into pharm. More...
 
int getMoleculeIndex (int pharm_idx)
 Returns the molecule index of the pharmacophore at index pharm_idx. More...
 
int getConformationIndex (int pharm_idx)
 Returns the conformer index within the parent molecule of the pharmacophore at index pharm_idx. More...
 
FeatureTypeHistogram getFeatureCounts (int pharm_idx)
 Returns the cached per Pharm.FeatureType frequency histogram of the pharmacophore at index pharm_idx. More...
 
FeatureTypeHistogram getFeatureCounts (int mol_idx, int mol_conf_idx)
 Returns the cached per Pharm.FeatureType frequency histogram of conformer mol_conf_idx of molecule mol_idx. More...
 

Properties

 objectID = property(getObjectID)
 
 databaseName = property(getDatabaseName)
 
 numMolecules = property(getNumMolecules)
 
 numPharmacophores = property(getNumPharmacophores)
 

Detailed Description

Abstract base class for accessors that read the data stored in pharmacophore screening databases.

Member Function Documentation

◆ getObjectID()

int CDPL.Pharm.ScreeningDBAccessor.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python ScreeningDBAccessor instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two ScreeningDBAccessor instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ open()

None CDPL.Pharm.ScreeningDBAccessor.open ( str  name)

Opens the screening database identified by name.

Parameters
nameThe database name (path, URI, etc., interpreted by the concrete subclass).

◆ getDatabaseName()

str CDPL.Pharm.ScreeningDBAccessor.getDatabaseName ( )

Returns the name of the currently open database.

Returns
A reference to the database name.

◆ getNumMolecules()

int CDPL.Pharm.ScreeningDBAccessor.getNumMolecules ( )

Returns the total number of molecules stored in the database.

Returns
The molecule count.

◆ getNumPharmacophores() [1/2]

int CDPL.Pharm.ScreeningDBAccessor.getNumPharmacophores ( )

Returns the total number of pharmacophores stored in the database (one per molecule conformer).

Returns
The pharmacophore count.

◆ getNumPharmacophores() [2/2]

int CDPL.Pharm.ScreeningDBAccessor.getNumPharmacophores ( int  mol_idx)

Returns the number of pharmacophores stored for the molecule at index mol_idx.

Parameters
mol_idxThe zero-based molecule index.
Returns
The pharmacophore count for the molecule.

◆ getMolecule()

None CDPL.Pharm.ScreeningDBAccessor.getMolecule ( int  mol_idx,
Chem.Molecule  mol,
bool   overwrite = True 
)

Reads the molecule at index mol_idx into mol.

Parameters
mol_idxThe zero-based molecule index.
molThe output molecule.
overwriteIf True, mol is cleared before reading. If False, the atoms/bonds are appended.

◆ getPharmacophore() [1/2]

None CDPL.Pharm.ScreeningDBAccessor.getPharmacophore ( int  pharm_idx,
Pharmacophore  pharm,
bool   overwrite = True 
)

Reads the pharmacophore at index pharm_idx into pharm.

Parameters
pharm_idxThe zero-based pharmacophore index (across all molecules).
pharmThe output pharmacophore.
overwriteIf True, pharm is cleared before reading. If False, the features are appended.

◆ getPharmacophore() [2/2]

None CDPL.Pharm.ScreeningDBAccessor.getPharmacophore ( int  mol_idx,
int  mol_conf_idx,
Pharmacophore  pharm,
bool   overwrite = True 
)

Reads the pharmacophore corresponding to conformer mol_conf_idx of molecule mol_idx into pharm.

Parameters
mol_idxThe zero-based molecule index.
mol_conf_idxThe zero-based conformer index within the molecule.
pharmThe output pharmacophore.
overwriteIf True, pharm is cleared before reading. If False, the features are appended.

◆ getMoleculeIndex()

int CDPL.Pharm.ScreeningDBAccessor.getMoleculeIndex ( int  pharm_idx)

Returns the molecule index of the pharmacophore at index pharm_idx.

Parameters
pharm_idxThe zero-based pharmacophore index.
Returns
The zero-based molecule index.

◆ getConformationIndex()

int CDPL.Pharm.ScreeningDBAccessor.getConformationIndex ( int  pharm_idx)

Returns the conformer index within the parent molecule of the pharmacophore at index pharm_idx.

Parameters
pharm_idxThe zero-based pharmacophore index.
Returns
The zero-based conformer index.

◆ getFeatureCounts() [1/2]

FeatureTypeHistogram CDPL.Pharm.ScreeningDBAccessor.getFeatureCounts ( int  pharm_idx)

Returns the cached per Pharm.FeatureType frequency histogram of the pharmacophore at index pharm_idx.

Parameters
pharm_idxThe zero-based pharmacophore index.
Returns
A reference to the feature-type histogram.

◆ getFeatureCounts() [2/2]

FeatureTypeHistogram CDPL.Pharm.ScreeningDBAccessor.getFeatureCounts ( int  mol_idx,
int  mol_conf_idx 
)

Returns the cached per Pharm.FeatureType frequency histogram of conformer mol_conf_idx of molecule mol_idx.

Parameters
mol_idxThe zero-based molecule index.
mol_conf_idxThe zero-based conformer index within the molecule.
Returns
A reference to the feature-type histogram.