Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Pharm::Pharmacophore Class Referenceabstract

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

#include <Pharmacophore.hpp>

+ Inheritance diagram for CDPL::Pharm::Pharmacophore:

Public Types

typedef std::shared_ptr< Pharmacophore > SharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated Pharmacophore instances. More...
 
typedef FeatureContainer::ConstFeatureIterator ConstFeatureIterator
 A constant random access iterator used to iterate over the stored const Pharm::Feature instances. More...
 
typedef FeatureContainer::FeatureIterator FeatureIterator
 A mutable random access iterator used to iterate over the stored Pharm::Feature instances. More...
 
- Public Types inherited from CDPL::Pharm::FeatureContainer
typedef std::shared_ptr< FeatureContainer > SharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated FeatureContainer instances. More...
 
typedef Util::IndexedElementIterator< const Feature, ConstFeatureAccessor > ConstFeatureIterator
 A constant random access iterator used to iterate over the stored const Pharm::Feature instances. More...
 
typedef Util::IndexedElementIterator< Feature, FeatureAccessor > FeatureIterator
 A mutable random access iterator used to iterate over the stored Pharm::Feature instances. More...
 
- Public Types inherited from CDPL::Chem::Entity3DContainer
typedef Util::IndexedElementIterator< const Entity3D, ConstEntityAccessor > ConstEntityIterator
 A constant random access iterator used to iterate over the stored const Chem::Entity3D instances. More...
 
typedef Util::IndexedElementIterator< Entity3D, EntityAccessor > EntityIterator
 A mutable random access iterator used to iterate over the stored Chem::Entity3D instances. More...
 
- Public Types inherited from CDPL::Base::PropertyContainer
typedef PropertyMap::value_type PropertyEntry
 A Base::LookupKey / Base::Any pair that stores the property value for a given property key. More...
 
typedef PropertyMap::const_iterator ConstPropertyIterator
 A constant iterator used to iterate over the property entries. More...
 

Public Member Functions

virtual ~Pharmacophore ()
 Virtual destructor. More...
 
virtual void clear ()=0
 Removes all features and clears all properties of the pharmacophore. More...
 
virtual Feature & addFeature ()=0
 Creates a new pharmacophore feature and adds it to the pharmacophore. More...
 
virtual void removeFeature (std::size_t idx)=0
 Removes the pharmacophore feature at the specified index. More...
 
FeatureIterator removeFeature (const FeatureIterator &it)
 Removes the pharmacophore feature specified by the iterator it. More...
 
virtual void copy (const Pharmacophore &pharm)=0
 Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the pharmacophore pharm. More...
 
virtual void copy (const FeatureContainer &cntnr)=0
 Replaces the current set of pharmacophore features and properties by a copy of the features and properties of the feature container cntnr. More...
 
virtual void append (const Pharmacophore &pharm)=0
 Extends the current set of features by a copy of the features in the pharmacophore pharm. More...
 
virtual void append (const FeatureContainer &cntnr)=0
 Extends the current set of pharmacophore features by a copy of the features in the feature container cntnr. More...
 
virtual void remove (const FeatureContainer &cntnr)=0
 Removes the pharmacophore features referenced by the feature container cntnr from this instance. More...
 
virtual SharedPointer clone () const =0
 Creates a deep copy of the current pharmacophore state. More...
 
Pharmacophore & operator= (const 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 & operator= (const 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 & operator+= (const Pharmacophore &pharm)
 Extends the current set of pharmacophore features by a copy of the features in the pharmacophore pharm. More...
 
Pharmacophore & operator+= (const FeatureContainer &cntnr)
 Extends the current set of pharmacophore features by a copy of the features in the feature container cntnr. More...
 
Pharmacophore & operator-= (const FeatureContainer &cntnr)
 Removes the pharmacophore features referenced by the feature container cntnr from this Pharmacophore instance. More...
 
ConstFeatureIterator getFeaturesBegin () const
 Returns a constant iterator pointing to the beginning of the stored const Pharm::Feature instances. More...
 
FeatureIterator getFeaturesBegin ()
 Returns a mutable iterator pointing to the beginning of the stored Pharm::Feature instances. More...
 
ConstFeatureIterator getFeaturesEnd () const
 Returns a constant iterator pointing to the end of the stored const Pharm::Feature instances. More...
 
FeatureIterator getFeaturesEnd ()
 Returns a mutable iterator pointing to the end of the stored Pharm::Feature instances. More...
 
- Public Member Functions inherited from CDPL::Pharm::FeatureContainer
virtual ~FeatureContainer ()
 Virtual destructor. More...
 
virtual std::size_t getNumFeatures () const =0
 Returns the number of features. More...
 
virtual const Feature & getFeature (std::size_t idx) const =0
 Returns a const reference to the feature at index idx. More...
 
virtual Feature & getFeature (std::size_t idx)=0
 Returns a non-const reference to the feature at index idx. More...
 
virtual std::size_t getFeatureIndex (const Feature &feature) const =0
 Returns the index of the specified feature. More...
 
virtual bool containsFeature (const Feature &feature) const =0
 Tells whether the specified feature is part of the feature set. More...
 
ConstFeatureIterator getFeaturesBegin () const
 Returns a constant iterator pointing to the beginning of the stored const Pharm::Feature instances. More...
 
ConstFeatureIterator getFeaturesEnd () const
 Returns a constant iterator pointing to the end of the stored const Pharm::Feature instances. More...
 
FeatureIterator getFeaturesBegin ()
 Returns a mutable iterator pointing to the beginning of the stored Pharm::Feature instances. More...
 
FeatureIterator getFeaturesEnd ()
 Returns a mutable iterator pointing to the end of the stored Pharm::Feature instances. More...
 
ConstFeatureIterator begin () const
 Returns a constant iterator pointing to the beginning of the stored const Pharm::Feature instances. More...
 
ConstFeatureIterator end () const
 Returns a constant iterator pointing to the end of the stored const Pharm::Feature instances. More...
 
FeatureIterator begin ()
 Returns a mutable iterator pointing to the beginning of the stored Pharm::Feature instances. More...
 
FeatureIterator end ()
 Returns a mutable iterator pointing to the end of the stored Pharm::Feature instances. More...
 
virtual void orderFeatures (const FeatureCompareFunction &func)=0
 Orders the features according to criteria implemented by the provided feature comparison function. More...
 
virtual std::size_t getNumEntities () const
 Returns the number of entities. More...
 
virtual const Chem::Entity3D & getEntity (std::size_t idx) const
 Returns a const reference to the entity at index idx. More...
 
virtual Chem::Entity3D & getEntity (std::size_t idx)
 Returns a non-const reference to the entity at index idx. More...
 
- Public Member Functions inherited from CDPL::Chem::Entity3DContainer
ConstEntityIterator getEntitiesBegin () const
 Returns a constant iterator pointing to the beginning of the stored const Chem::Entity3D instances. More...
 
ConstEntityIterator getEntitiesEnd () const
 Returns a constant iterator pointing to the end of the stored const Chem::Entity3D instances. More...
 
EntityIterator getEntitiesBegin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D instances. More...
 
EntityIterator getEntitiesEnd ()
 Returns a mutable iterator pointing to the end of the stored Chem::Entity3D instances. More...
 
ConstEntityIterator begin () const
 Returns a constant iterator pointing to the beginning of the stored const Chem::Entity3D instances. More...
 
ConstEntityIterator end () const
 Returns a constant iterator pointing to the end of the stored const Chem::Entity3D instances. More...
 
EntityIterator begin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D instances. More...
 
EntityIterator end ()
 Returns a mutable iterator pointing to the end of the stored Chem::Entity3D instances. More...
 
const Entity3DContainer & getEntities () const
 Returns a const reference to itself. More...
 
Entity3DContainer & getEntities ()
 Returns a reference to itself. More...
 
- Public Member Functions inherited from CDPL::Base::PropertyContainer
std::size_t getNumProperties () const
 Returns the number of property entries. More...
 
template<typename T >
void setProperty (const LookupKey &key, T &&val)
 Sets the value of the property specified by key to val. More...
 
template<typename T >
const T & getProperty (const LookupKey &key) const
 Returns the value of the property specified by key as a const reference to an object of type T. More...
 
template<typename T >
const T & getPropertyOrDefault (const LookupKey &key, const T &def_val) const
 Returns the value of the property specified by key as a const reference to an object of type T, or the default value def_val if an entry does not exist. More...
 
const Any & getProperty (const LookupKey &key, bool throw_=false) const
 Returns the value of the property specified by key. More...
 
bool isPropertySet (const LookupKey &key) const
 Tells whether or not a value has been assigned to the property specified by key. More...
 
ConstPropertyIterator getPropertiesBegin () const
 Returns a constant iterator pointing to the beginning of the property entries. More...
 
ConstPropertyIterator getPropertiesEnd () const
 Returns a constant iterator pointing to the end of the property entries. More...
 
ConstPropertyIterator begin () const
 Returns a constant iterator pointing to the beginning of the property entries. More...
 
ConstPropertyIterator end () const
 Returns a constant iterator pointing to the end of the property entries. More...
 
bool removeProperty (const LookupKey &key)
 Removes the entry for the property specified by key. More...
 
void clearProperties ()
 Erases all container entries. More...
 
void addProperties (const PropertyContainer &cntnr)
 Adds the property entries of the PropertyContainer instance cntnr. More...
 
void copyProperties (const PropertyContainer &cntnr)
 Replaces the current property entries by a copy of the entries in cntnr. More...
 
void swap (PropertyContainer &cntnr)
 Exchanges the property entries of this container with the ones of cntnr. More...
 
const PropertyContainer & getProperties () const
 Returns a const reference to itself. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CDPL::Pharm::FeatureContainer
FeatureContainer & operator= (const FeatureContainer &cntnr)
 Replaces the current set of properties by a copy of the properties of the container cntnr. More...
 
- Protected Member Functions inherited from CDPL::Chem::Entity3DContainer
virtual ~Entity3DContainer ()
 Virtual destructor. More...
 
Entity3DContainer & operator= (const Entity3DContainer &cntnr)
 Assignment operator. More...
 
- Protected Member Functions inherited from CDPL::Base::PropertyContainer
 PropertyContainer ()
 Constructs an empty PropertyContainer instance. More...
 
 PropertyContainer (const PropertyContainer &cntnr)
 Constructs a copy of the PropertyContainer instance cntnr. More...
 
virtual ~PropertyContainer ()
 Virtual destructor. More...
 
PropertyContainer & operator= (const PropertyContainer &cntnr)
 Assignment operator. More...
 

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 Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated Pharmacophore instances.

◆ ConstFeatureIterator

A constant random access iterator used to iterate over the stored const Pharm::Feature instances.

◆ FeatureIterator

A mutable random access iterator used to iterate over the stored Pharm::Feature instances.

Constructor & Destructor Documentation

◆ ~Pharmacophore()

virtual CDPL::Pharm::Pharmacophore::~Pharmacophore ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ clear()

virtual void CDPL::Pharm::Pharmacophore::clear ( )
pure virtual

Removes all features and clears all properties of the pharmacophore.

Implemented in CDPL::Pharm::BasicPharmacophore.

◆ addFeature()

virtual Feature& CDPL::Pharm::Pharmacophore::addFeature ( )
pure virtual

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

Returns
A reference to the newly created features.

Implemented in CDPL::Pharm::BasicPharmacophore.

◆ removeFeature() [1/2]

virtual void CDPL::Pharm::Pharmacophore::removeFeature ( std::size_t  idx)
pure virtual

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

Implemented in CDPL::Pharm::BasicPharmacophore.

◆ removeFeature() [2/2]

FeatureIterator CDPL::Pharm::Pharmacophore::removeFeature ( const FeatureIterator &  it)

Removes the pharmacophore feature specified by the iterator it.

Parameters
itAn iterator that specifies the feature to remove.
Returns
A mutable iterator pointing to the next feature in the list.
Exceptions
Base::RangeErrorif it is not in the range [getFeaturesBegin(), getFeaturesEnd()).

◆ copy() [1/2]

virtual void CDPL::Pharm::Pharmacophore::copy ( const Pharmacophore &  pharm)
pure virtual

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.

Implemented in CDPL::Pharm::BasicPharmacophore.

◆ copy() [2/2]

virtual void CDPL::Pharm::Pharmacophore::copy ( const FeatureContainer &  cntnr)
pure virtual

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.

Implemented in CDPL::Pharm::BasicPharmacophore.

◆ append() [1/2]

virtual void CDPL::Pharm::Pharmacophore::append ( const Pharmacophore &  pharm)
pure virtual

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.

Implemented in CDPL::Pharm::BasicPharmacophore.

◆ append() [2/2]

virtual void CDPL::Pharm::Pharmacophore::append ( const FeatureContainer &  cntnr)
pure virtual

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.

Implemented in CDPL::Pharm::BasicPharmacophore.

◆ remove()

virtual void CDPL::Pharm::Pharmacophore::remove ( const FeatureContainer &  cntnr)
pure virtual

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.

Implemented in CDPL::Pharm::BasicPharmacophore.

◆ clone()

virtual SharedPointer CDPL::Pharm::Pharmacophore::clone ( ) const
pure virtual

Creates a deep copy of the current pharmacophore state.

Returns
A smart pointer to the copy of the pharmacophore.

Implemented in CDPL::Pharm::BasicPharmacophore.

◆ operator=() [1/2]

Pharmacophore& CDPL::Pharm::Pharmacophore::operator= ( const 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
A reference to itself.

◆ operator=() [2/2]

Pharmacophore& CDPL::Pharm::Pharmacophore::operator= ( const 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
A reference to itself.

◆ operator+=() [1/2]

Pharmacophore& CDPL::Pharm::Pharmacophore::operator+= ( const 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
A reference to itself.

◆ operator+=() [2/2]

Pharmacophore& CDPL::Pharm::Pharmacophore::operator+= ( const 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
A reference to itself.

◆ operator-=()

Pharmacophore& CDPL::Pharm::Pharmacophore::operator-= ( const 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
A reference to itself.

◆ getFeaturesBegin() [1/2]

ConstFeatureIterator CDPL::Pharm::FeatureContainer::getFeaturesBegin

Returns a constant iterator pointing to the beginning of the stored const Pharm::Feature instances.

Returns
A constant iterator pointing to the beginning of the stored const Pharm::Feature instances.

◆ getFeaturesBegin() [2/2]

FeatureIterator CDPL::Pharm::FeatureContainer::getFeaturesBegin

Returns a mutable iterator pointing to the beginning of the stored Pharm::Feature instances.

Returns
A mutable iterator pointing to the beginning of the stored Pharm::Feature instances.

◆ getFeaturesEnd() [1/2]

ConstFeatureIterator CDPL::Pharm::FeatureContainer::getFeaturesEnd

Returns a constant iterator pointing to the end of the stored const Pharm::Feature instances.

Returns
A constant iterator pointing to the end of the stored const Pharm::Feature instances.

◆ getFeaturesEnd() [2/2]

FeatureIterator CDPL::Pharm::FeatureContainer::getFeaturesEnd

Returns a mutable iterator pointing to the end of the stored Pharm::Feature instances.

Returns
A mutable iterator pointing to the end of the stored Pharm::Feature instances.

The documentation for this class was generated from the following file: