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

Abstract base class for mutable containers of Pharm.Feature instances representing a pharmacophore model. More...

+ Inheritance diagram for CDPL.Pharm.Pharmacophore:

Public Member Functions

None __init__ ()
 Initializes the Pharmacophore instance.
 
None clear ()
 Removes all features and clears all properties of the pharmacophore.
 
Feature addFeature ()
 Creates a new pharmacophore feature and adds it to the pharmacophore. More...
 
None removeFeature (int idx)
 Removes the pharmacophore feature at the specified index. More...
 
None copy (Pharmacophore pharm)
 Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the pharmacophore pharm. More...
 
None copy (FeatureContainer cntnr)
 Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the feature container cntnr. More...
 
None append (Pharmacophore pharm)
 Extends the current set of features by a copy of the features in the pharmacophore pharm. More...
 
None append (FeatureContainer cntnr)
 Extends the current set of pharmacophore features by a copy of the features in the feature container cntnr. More...
 
None remove (FeatureContainer cntnr)
 Removes the pharmacophore features referenced by the feature container cntnr from this instance. More...
 
Pharmacophore assign (Pharmacophore pharm)
 Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the pharmacophore pharm. More...
 
Pharmacophore assign (FeatureContainer cntnr)
 Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the feature container cntnr. More...
 
Pharmacophore clone ()
 Creates a deep copy of the current pharmacophore state. More...
 
Feature getFeature (int idx)
 Returns a reference to the feature at index idx. More...
 
bool containsFeature (Feature feature)
 Tells whether the specified feature is part of the feature set. More...
 
int getFeatureIndex (Feature feature)
 Returns the index of the specified feature. More...
 
int getNumFeatures ()
 Returns the number of features. More...
 
None orderFeatures (BoolFeature2Functor func)
 Orders the features according to criteria implemented by the provided feature comparison function. More...
 
Chem.Entity3D getEntity (int idx)
 Returns a reference to the entity at index idx. More...
 
int getNumEntities ()
 Returns the number of entities. More...
 
tuple __getstate__ ()
 
Pharmacophore __iadd__ (Pharmacophore pharm)
 Extends the current set of pharmacophore features by a copy of the features in the pharmacophore pharm. More...
 
Pharmacophore __iadd__ (FeatureContainer cntnr)
 Extends the current set of pharmacophore features by a copy of the features in the feature container cntnr. More...
 
Pharmacophore __isub__ (FeatureContainer cntnr)
 Removes the pharmacophore features referenced by the feature container cntnr from this Pharmacophore instance. More...
 
None __delitem__ (int idx)
 
bool __delitem__ (Base.LookupKey key)
 
Base.Any __getitem__ (Base.LookupKey key)
 
Feature __getitem__ (int idx)
 
bool __contains__ (Base.LookupKey key)
 Returns the result of the membership test operation key in self. More...
 
bool __contains__ (Feature feature)
 Returns the result of the membership test operation feature in self. More...
 
None __setitem__ (Base.LookupKey key, Base.Any value)
 
int __len__ ()
 
- Public Member Functions inherited from CDPL.Chem.Entity3DContainer
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
- Public Member Functions inherited from CDPL.Base.PropertyContainer
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
int getNumProperties ()
 Returns the number of property entries. More...
 
Any getPropertyOrDefault (LookupKey key, Any def_value)
 
list getPropertyKeys ()
 
list getPropertyValues ()
 
list getProperties ()
 Returns a reference to itself. More...
 
None setProperty (LookupKey key, Any value)
 
bool removeProperty (LookupKey key)
 Clears the value of the property specified by key. More...
 
Any getProperty (LookupKey key, bool throw_=False)
 Returns the value of the property specified by key. More...
 
bool isPropertySet (LookupKey key)
 Tells whether or not a value has been assigned to the property specified by key. More...
 
None clearProperties ()
 Clears all property values.
 
None addProperties (PropertyContainer cntnr)
 Adds the property value entries in the PropertyContainer instance cntnr. More...
 
None copyProperties (PropertyContainer cntnr)
 Replaces the current set of properties by a copy of the entries in cntnr. More...
 
None swap (PropertyContainer cntnr)
 Exchanges the properties of this container with the properties of the container cntnr. More...
 
Any __getitem__ (LookupKey key)
 Returns the value of the property specified by key. More...
 
bool __contains__ (LookupKey key)
 Returns the result of the membership test operation key in self. More...
 
None __setitem__ (LookupKey key, Any value)
 
bool __delitem__ (LookupKey key)
 

Additional Inherited Members

- Properties inherited from CDPL.Pharm.FeatureContainer
 numFeatures = property(getNumFeatures)
 
- Properties inherited from CDPL.Chem.Entity3DContainer
 objectID = property(getObjectID)
 
 numEntities = property(getNumEntities)
 
- Properties inherited from CDPL.Base.PropertyContainer
 objectID = property(getObjectID)
 
 propertyKeys = property(getPropertyKeys)
 
 propertyValues = property(getPropertyValues)
 
 properties = property(getProperties)
 
 numProperties = property(getNumProperties)
 

Detailed Description

Abstract base class for mutable containers of Pharm.Feature instances representing a pharmacophore model.

Pharmacophore extends the read-only Pharm.FeatureContainer interface with feature creation/removal, content replacement (copy, append, remove) and a cloning facility for polymorphic deep copies.

Member Function Documentation

◆ addFeature()

Feature CDPL.Pharm.Pharmacophore.addFeature ( )

Creates a new pharmacophore feature and adds it to the pharmacophore.

Returns
A reference to the newly created features.

◆ removeFeature()

None CDPL.Pharm.Pharmacophore.removeFeature ( int  idx)

Removes the pharmacophore feature at the specified index.

Parameters
idxThe index of the feature to remove.
Exceptions
Base.IndexErrorif idx is not in the range [0, getNumFeatures()).

◆ copy() [1/2]

None CDPL.Pharm.Pharmacophore.copy ( Pharmacophore  pharm)

Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the pharmacophore pharm.

Parameters
pharmThe pharmacophore to copy.

Reimplemented in CDPL.Pharm.BasicPharmacophore.

◆ copy() [2/2]

None CDPL.Pharm.Pharmacophore.copy ( FeatureContainer  cntnr)

Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the feature container cntnr.

Parameters
cntnrThe feature container providing the features and properties to copy.

Reimplemented in CDPL.Pharm.BasicPharmacophore.

◆ append() [1/2]

None CDPL.Pharm.Pharmacophore.append ( Pharmacophore  pharm)

Extends the current set of features by a copy of the features in the pharmacophore pharm.

Parameters
pharmThe pharmacophore providing the features to append.
Note
Does not affect any properties.

Reimplemented in CDPL.Pharm.BasicPharmacophore.

◆ append() [2/2]

None CDPL.Pharm.Pharmacophore.append ( FeatureContainer  cntnr)

Extends the current set of pharmacophore features by a copy of the features in the feature container cntnr.

Parameters
cntnrThe feature container providing the features to append.
Note
Does not affect any properties.

Reimplemented in CDPL.Pharm.BasicPharmacophore.

◆ remove()

None CDPL.Pharm.Pharmacophore.remove ( FeatureContainer  cntnr)

Removes the pharmacophore features referenced by the feature container cntnr from this instance.

Parameters
cntnrThe feature container providing the features to remove.
Note
Equivalent to clear() if this == &cntr.

◆ assign() [1/2]

Pharmacophore CDPL.Pharm.Pharmacophore.assign ( Pharmacophore  pharm)

Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the pharmacophore pharm.

Internally calls copy() to perform the actual work.

Parameters
pharmThe pharmacophore to copy.
Returns
self

Reimplemented in CDPL.Pharm.BasicPharmacophore.

◆ assign() [2/2]

Pharmacophore CDPL.Pharm.Pharmacophore.assign ( FeatureContainer  cntnr)

Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the feature container cntnr.

Internally calls copy() to perform the actual work.

Parameters
cntnrThe feature container providing the features and properties to copy.
Returns
self

Reimplemented in CDPL.Pharm.BasicPharmacophore.

◆ clone()

Pharmacophore CDPL.Pharm.Pharmacophore.clone ( )

Creates a deep copy of the current pharmacophore state.

Returns
A smart reference to the copy of the pharmacophore.

◆ getFeature()

Feature CDPL.Pharm.Pharmacophore.getFeature ( int  idx)

Returns a reference to the feature at index idx.

Parameters
idxThe zero-based index of the feature to return.
Returns
A reference to the feature at the specified index.
Exceptions
Base.IndexErrorif idx is not in the range [0, getNumFeatures()).

Reimplemented from CDPL.Pharm.FeatureContainer.

◆ containsFeature()

bool CDPL.Pharm.Pharmacophore.containsFeature ( Feature  feature)

Tells whether the specified feature is part of the feature set.

Parameters
featureThe feature to look for.
Returns
True if feature is part of the set, and False otherwise.

Reimplemented from CDPL.Pharm.FeatureContainer.

◆ getFeatureIndex()

int CDPL.Pharm.Pharmacophore.getFeatureIndex ( Feature  feature)

Returns the index of the specified feature.

Parameters
featureThe feature for which to return the index.
Returns
The zero-based index of the specified feature.
Exceptions
Base.ItemNotFoundif the specified feature could not be found.

Reimplemented from CDPL.Pharm.FeatureContainer.

◆ getNumFeatures()

int CDPL.Pharm.Pharmacophore.getNumFeatures ( )

Returns the number of features.

Returns
The number of features.

Reimplemented from CDPL.Pharm.FeatureContainer.

◆ orderFeatures()

None CDPL.Pharm.Pharmacophore.orderFeatures ( BoolFeature2Functor  func)

Orders the features according to criteria implemented by the provided feature comparison function.

Parameters
funcThe feature comparison function implementing the applied ordering criteria.

Reimplemented from CDPL.Pharm.FeatureContainer.

◆ getEntity()

Chem.Entity3D CDPL.Pharm.Pharmacophore.getEntity ( int  idx)

Returns a reference to the entity at index idx.

Forwards to getFeature() and exists to satisfy the Chem.Entity3DContainer interface.

Parameters
idxThe zero-based entity index.
Returns
A reference to the entity at the specified index.
Exceptions
Base.IndexErrorif idx is not in the range [0, getNumFeatures()).

Reimplemented from CDPL.Pharm.FeatureContainer.

◆ getNumEntities()

int CDPL.Pharm.Pharmacophore.getNumEntities ( )

Returns the number of entities.

Forwards to getNumFeatures() and exists to satisfy the Chem.Entity3DContainer interface.

Returns
The number of contained features.

Reimplemented from CDPL.Pharm.FeatureContainer.

◆ __iadd__() [1/2]

Pharmacophore CDPL.Pharm.Pharmacophore.__iadd__ ( Pharmacophore  pharm)

Extends the current set of pharmacophore features by a copy of the features in the pharmacophore pharm.

Internally calls append() to perform the actual work.

Parameters
pharmThe pharmacophore providing the features to append.
Returns
self

Reimplemented in CDPL.Pharm.BasicPharmacophore.

◆ __iadd__() [2/2]

Pharmacophore CDPL.Pharm.Pharmacophore.__iadd__ ( FeatureContainer  cntnr)

Extends the current set of pharmacophore features by a copy of the features in the feature container cntnr.

Internally calls append() to perform the actual work.

Parameters
cntnrThe feature container providing the features to append.
Returns
self

Reimplemented in CDPL.Pharm.BasicPharmacophore.

◆ __isub__()

Pharmacophore CDPL.Pharm.Pharmacophore.__isub__ ( FeatureContainer  cntnr)

Removes the pharmacophore features referenced by the feature container cntnr from this Pharmacophore instance.

Internally calls remove() to perform the actual work.

Parameters
cntnrThe feature container providing the features to remove.
Returns
self

◆ __contains__() [1/2]

bool CDPL.Pharm.Pharmacophore.__contains__ ( Base.LookupKey  key)

Returns the result of the membership test operation key in self.

Parameters
keyThe value to test for membership.
Returns
The result of the membership test operation.

Reimplemented from CDPL.Pharm.FeatureContainer.

◆ __contains__() [2/2]

bool CDPL.Pharm.Pharmacophore.__contains__ ( Feature  feature)

Returns the result of the membership test operation feature in self.

Parameters
featureThe value to test for membership.
Returns
The result of the membership test operation.

Reimplemented from CDPL.Pharm.FeatureContainer.