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

Abstract base class for functions evaluating the overlap between two Gaussian shape functions. More...

#include <GaussianShapeOverlapFunction.hpp>

+ Inheritance diagram for CDPL::Shape::GaussianShapeOverlapFunction:

Public Types

typedef std::shared_ptr< GaussianShapeOverlapFunctionSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated GaussianShapeOverlapFunction instances. More...
 
typedef std::function< bool(std::size_t)> ColorFilterFunction
 Type of the function used to filter color (pharmacophore) features by type. More...
 
typedef std::function< bool(std::size_t, std::size_t)> ColorMatchFunction
 Type of the function used to decide whether two color features match. More...
 

Public Member Functions

virtual ~GaussianShapeOverlapFunction ()
 Virtual destructor. More...
 
virtual void setShapeFunction (const GaussianShapeFunction &func, bool is_ref)=0
 Specifies the reference or aligned shape function used by the overlap evaluation. More...
 
virtual const GaussianShapeFunctiongetShapeFunction (bool ref) const =0
 Returns the reference or aligned shape function. More...
 
virtual void setColorMatchFunction (const ColorMatchFunction &func)=0
 Specifies the function used to decide whether two color features match. More...
 
virtual const ColorMatchFunctiongetColorMatchFunction () const =0
 Returns the currently configured color-match function. More...
 
virtual void setColorFilterFunction (const ColorFilterFunction &func)=0
 Specifies the function used to filter color features by type. More...
 
virtual const ColorFilterFunctiongetColorFilterFunction () const =0
 Returns the currently configured color-filter function. More...
 
virtual double calcSelfOverlap (bool ref) const =0
 Calculates the shape-only self-overlap of the reference or aligned shape function. More...
 
virtual double calcColorSelfOverlap (bool ref) const =0
 Calculates the color self-overlap of the reference or aligned shape function. More...
 
virtual double calcOverlap () const =0
 Calculates the shape-only overlap of the reference and aligned shape functions. More...
 
virtual double calcColorOverlap () const =0
 Calculates the color overlap of the reference and aligned shape functions. More...
 
virtual double calcOverlap (const Math::Vector3DArray &coords) const =0
 Calculates the shape-only overlap with the aligned shape element positions taken from coords. More...
 
virtual double calcColorOverlap (const Math::Vector3DArray &coords) const =0
 Calculates the color overlap with the aligned shape element positions taken from coords. More...
 
virtual double calcOverlapGradient (const Math::Vector3DArray &coords, Math::Vector3DArray &grad) const =0
 Calculates the shape overlap with the aligned shape element positions taken from coords and returns the gradient with respect to those positions. More...
 

Protected Member Functions

 GaussianShapeOverlapFunction ()
 
 GaussianShapeOverlapFunction (const GaussianShapeOverlapFunction &func)
 
GaussianShapeOverlapFunctionoperator= (const GaussianShapeOverlapFunction &func)
 

Detailed Description

Abstract base class for functions evaluating the overlap between two Gaussian shape functions.

Concrete subclasses (e.g. Shape::ExactGaussianShapeOverlapFunction, Shape::FastGaussianShapeOverlapFunction) implement the overlap evaluation using different trade-offs of accuracy vs. speed.

Member Typedef Documentation

◆ SharedPointer

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

◆ ColorFilterFunction

Type of the function used to filter color (pharmacophore) features by type.

◆ ColorMatchFunction

typedef std::function<bool(std::size_t, std::size_t)> CDPL::Shape::GaussianShapeOverlapFunction::ColorMatchFunction

Type of the function used to decide whether two color features match.

Constructor & Destructor Documentation

◆ ~GaussianShapeOverlapFunction()

virtual CDPL::Shape::GaussianShapeOverlapFunction::~GaussianShapeOverlapFunction ( )
inlinevirtual

Virtual destructor.

◆ GaussianShapeOverlapFunction() [1/2]

CDPL::Shape::GaussianShapeOverlapFunction::GaussianShapeOverlapFunction ( )
inlineprotected

◆ GaussianShapeOverlapFunction() [2/2]

CDPL::Shape::GaussianShapeOverlapFunction::GaussianShapeOverlapFunction ( const GaussianShapeOverlapFunction func)
inlineprotected

Member Function Documentation

◆ setShapeFunction()

virtual void CDPL::Shape::GaussianShapeOverlapFunction::setShapeFunction ( const GaussianShapeFunction func,
bool  is_ref 
)
pure virtual

Specifies the reference or aligned shape function used by the overlap evaluation.

Parameters
funcThe shape function.
is_refIf true, func is the reference shape function; otherwise the aligned shape function.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ getShapeFunction()

virtual const GaussianShapeFunction* CDPL::Shape::GaussianShapeOverlapFunction::getShapeFunction ( bool  ref) const
pure virtual

Returns the reference or aligned shape function.

Parameters
refIf true, the reference shape function is returned; otherwise the aligned shape function.
Returns
A pointer to the requested shape function (or nullptr if none is associated).

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ setColorMatchFunction()

virtual void CDPL::Shape::GaussianShapeOverlapFunction::setColorMatchFunction ( const ColorMatchFunction func)
pure virtual

Specifies the function used to decide whether two color features match.

Parameters
funcThe color-match function.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ getColorMatchFunction()

virtual const ColorMatchFunction& CDPL::Shape::GaussianShapeOverlapFunction::getColorMatchFunction ( ) const
pure virtual

Returns the currently configured color-match function.

Returns
A const reference to the color-match function.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ setColorFilterFunction()

virtual void CDPL::Shape::GaussianShapeOverlapFunction::setColorFilterFunction ( const ColorFilterFunction func)
pure virtual

Specifies the function used to filter color features by type.

Parameters
funcThe color-filter function.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ getColorFilterFunction()

virtual const ColorFilterFunction& CDPL::Shape::GaussianShapeOverlapFunction::getColorFilterFunction ( ) const
pure virtual

Returns the currently configured color-filter function.

Returns
A const reference to the color-filter function.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ calcSelfOverlap()

virtual double CDPL::Shape::GaussianShapeOverlapFunction::calcSelfOverlap ( bool  ref) const
pure virtual

Calculates the shape-only self-overlap of the reference or aligned shape function.

Parameters
refIf true, the reference self-overlap is returned; otherwise the aligned self-overlap.
Returns
The self-overlap value.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ calcColorSelfOverlap()

virtual double CDPL::Shape::GaussianShapeOverlapFunction::calcColorSelfOverlap ( bool  ref) const
pure virtual

Calculates the color self-overlap of the reference or aligned shape function.

Parameters
refIf true, the reference color self-overlap is returned; otherwise the aligned color self-overlap.
Returns
The color self-overlap value.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ calcOverlap() [1/2]

virtual double CDPL::Shape::GaussianShapeOverlapFunction::calcOverlap ( ) const
pure virtual

Calculates the shape-only overlap of the reference and aligned shape functions.

Returns
The shape overlap value.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ calcColorOverlap() [1/2]

virtual double CDPL::Shape::GaussianShapeOverlapFunction::calcColorOverlap ( ) const
pure virtual

Calculates the color overlap of the reference and aligned shape functions.

Returns
The color overlap value.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ calcOverlap() [2/2]

virtual double CDPL::Shape::GaussianShapeOverlapFunction::calcOverlap ( const Math::Vector3DArray coords) const
pure virtual

Calculates the shape-only overlap with the aligned shape element positions taken from coords.

Parameters
coordsThe element 3D positions of the aligned shape.
Returns
The shape overlap value.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ calcColorOverlap() [2/2]

virtual double CDPL::Shape::GaussianShapeOverlapFunction::calcColorOverlap ( const Math::Vector3DArray coords) const
pure virtual

Calculates the color overlap with the aligned shape element positions taken from coords.

Parameters
coordsThe element 3D positions of the aligned shape.
Returns
The color overlap value.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ calcOverlapGradient()

virtual double CDPL::Shape::GaussianShapeOverlapFunction::calcOverlapGradient ( const Math::Vector3DArray coords,
Math::Vector3DArray grad 
) const
pure virtual

Calculates the shape overlap with the aligned shape element positions taken from coords and returns the gradient with respect to those positions.

Parameters
coordsThe element 3D positions of the aligned shape.
gradThe output element-wise gradient of the overlap.
Returns
The shape overlap value.

Implemented in CDPL::Shape::FastGaussianShapeOverlapFunction, and CDPL::Shape::ExactGaussianShapeOverlapFunction.

◆ operator=()

GaussianShapeOverlapFunction& CDPL::Shape::GaussianShapeOverlapFunction::operator= ( const GaussianShapeOverlapFunction func)
inlineprotected

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