![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Shape::GaussianShapeOverlapFunction implementation that uses two approximation techniques to trade some accuracy for a substantial speedup compared to Shape::ExactGaussianShapeOverlapFunction. More...
#include <FastGaussianShapeOverlapFunction.hpp>
Inheritance diagram for CDPL::Shape::FastGaussianShapeOverlapFunction:Public Types | |
| typedef std::shared_ptr< FastGaussianShapeOverlapFunction > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated FastGaussianShapeOverlapFunction instances. More... | |
Public Types inherited from CDPL::Shape::GaussianShapeOverlapFunction | |
| typedef std::shared_ptr< GaussianShapeOverlapFunction > | SharedPointer |
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 | |
| FastGaussianShapeOverlapFunction () | |
Constructs the FastGaussianShapeOverlapFunction instance without associated shape functions. More... | |
| FastGaussianShapeOverlapFunction (const FastGaussianShapeOverlapFunction &func) | |
Constructs a copy of the FastGaussianShapeOverlapFunction instance func. More... | |
| FastGaussianShapeOverlapFunction (const GaussianShapeFunction &ref_shape_func, const GaussianShapeFunction &ovl_shape_func) | |
Constructs the FastGaussianShapeOverlapFunction instance with the given reference and aligned shape functions. More... | |
| ~FastGaussianShapeOverlapFunction () | |
| Destructor. More... | |
| void | proximityOptimization (bool enable) |
| Enables or disables the proximity-check pruning of Gaussian-product pair contributions. More... | |
| bool | proximityOptimization () const |
| Tells whether the proximity-check pruning is enabled. More... | |
| void | setRadiusScalingFactor (double factor) |
| Sets the scaling factor applied to Van der Waals radii during the proximity check. More... | |
| double | getRadiusScalingFactor () const |
| Returns the currently configured radius scaling factor. More... | |
| void | fastExpFunction (bool enable) |
| Enables or disables the use of a fast approximation for the exponential function. More... | |
| bool | fastExpFunction () const |
| Tells whether the fast-exponential approximation is enabled. More... | |
| void | setShapeFunction (const GaussianShapeFunction &func, bool is_ref) |
| Specifies the reference or aligned shape function used by the overlap evaluation. More... | |
| const GaussianShapeFunction * | getShapeFunction (bool ref) const |
| Returns the reference or aligned shape function. More... | |
| void | setColorMatchFunction (const ColorMatchFunction &func) |
| Specifies the function used to decide whether two color features match. More... | |
| const ColorMatchFunction & | getColorMatchFunction () const |
| Returns the currently configured color-match function. More... | |
| void | setColorFilterFunction (const ColorFilterFunction &func) |
| Specifies the function used to filter color features by type. More... | |
| const ColorFilterFunction & | getColorFilterFunction () const |
| Returns the currently configured color-filter function. More... | |
| double | calcSelfOverlap (bool ref) const |
| Calculates the shape-only self-overlap of the reference or aligned shape function. More... | |
| double | calcColorSelfOverlap (bool ref) const |
| Calculates the color self-overlap of the reference or aligned shape function. More... | |
| double | calcOverlap () const |
| Calculates the shape-only overlap of the reference and aligned shape functions. More... | |
| double | calcColorOverlap () const |
| Calculates the color overlap of the reference and aligned shape functions. More... | |
| double | calcOverlap (const Math::Vector3DArray &coords) const |
| Calculates the shape-only overlap with the aligned shape element positions taken from coords. More... | |
| double | calcColorOverlap (const Math::Vector3DArray &coords) const |
| Calculates the color overlap with the aligned shape element positions taken from coords. More... | |
| double | calcOverlapGradient (const Math::Vector3DArray &coords, Math::Vector3DArray &grad) const |
| Calculates the shape overlap with the aligned shape element positions taken from coords and returns the gradient with respect to those positions. More... | |
| FastGaussianShapeOverlapFunction & | operator= (const FastGaussianShapeOverlapFunction &func) |
| Copy assignment operator. More... | |
Public Member Functions inherited from CDPL::Shape::GaussianShapeOverlapFunction | |
| virtual | ~GaussianShapeOverlapFunction () |
| Virtual destructor. More... | |
Static Public Attributes | |
| static constexpr double | DEF_RADIUS_SCALING_FACTOR = 1.4 |
| Default scaling factor applied to Van der Waals radii for the proximity-check pruning. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Shape::GaussianShapeOverlapFunction | |
| GaussianShapeOverlapFunction () | |
| GaussianShapeOverlapFunction (const GaussianShapeOverlapFunction &func) | |
| GaussianShapeOverlapFunction & | operator= (const GaussianShapeOverlapFunction &func) |
Shape::GaussianShapeOverlapFunction implementation that uses two approximation techniques to trade some accuracy for a substantial speedup compared to Shape::ExactGaussianShapeOverlapFunction.
Two independent acceleration features can be enabled:
std::exp call with a fast approximation that is accurate enough for screening-style overlap evaluation. | typedef std::shared_ptr<FastGaussianShapeOverlapFunction> CDPL::Shape::FastGaussianShapeOverlapFunction::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated FastGaussianShapeOverlapFunction instances.
| CDPL::Shape::FastGaussianShapeOverlapFunction::FastGaussianShapeOverlapFunction | ( | ) |
Constructs the FastGaussianShapeOverlapFunction instance without associated shape functions.
| CDPL::Shape::FastGaussianShapeOverlapFunction::FastGaussianShapeOverlapFunction | ( | const FastGaussianShapeOverlapFunction & | func | ) |
Constructs a copy of the FastGaussianShapeOverlapFunction instance func.
| func | The FastGaussianShapeOverlapFunction to copy. |
| CDPL::Shape::FastGaussianShapeOverlapFunction::FastGaussianShapeOverlapFunction | ( | const GaussianShapeFunction & | ref_shape_func, |
| const GaussianShapeFunction & | ovl_shape_func | ||
| ) |
Constructs the FastGaussianShapeOverlapFunction instance with the given reference and aligned shape functions.
| ref_shape_func | The reference shape function. |
| ovl_shape_func | The aligned shape function. |
| CDPL::Shape::FastGaussianShapeOverlapFunction::~FastGaussianShapeOverlapFunction | ( | ) |
Destructor.
| void CDPL::Shape::FastGaussianShapeOverlapFunction::proximityOptimization | ( | bool | enable | ) |
Enables or disables the proximity-check pruning of Gaussian-product pair contributions.
| enable | true to enable the proximity check, and false to disable it. |
| bool CDPL::Shape::FastGaussianShapeOverlapFunction::proximityOptimization | ( | ) | const |
Tells whether the proximity-check pruning is enabled.
true if the proximity check is enabled, and false otherwise. | void CDPL::Shape::FastGaussianShapeOverlapFunction::setRadiusScalingFactor | ( | double | factor | ) |
Sets the scaling factor applied to Van der Waals radii during the proximity check.
| factor | The new radius scaling factor. |
| double CDPL::Shape::FastGaussianShapeOverlapFunction::getRadiusScalingFactor | ( | ) | const |
Returns the currently configured radius scaling factor.
| void CDPL::Shape::FastGaussianShapeOverlapFunction::fastExpFunction | ( | bool | enable | ) |
Enables or disables the use of a fast approximation for the exponential function.
| enable | true to enable the fast-exponential approximation, and false to use the standard exponential. |
| bool CDPL::Shape::FastGaussianShapeOverlapFunction::fastExpFunction | ( | ) | const |
Tells whether the fast-exponential approximation is enabled.
true if the fast-exponential approximation is enabled, and false otherwise.
|
virtual |
Specifies the reference or aligned shape function used by the overlap evaluation.
| func | The shape function. |
| is_ref | If true, func is the reference shape function; otherwise the aligned shape function. |
Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Returns the reference or aligned shape function.
| ref | If true, the reference shape function is returned; otherwise the aligned shape function. |
nullptr if none is associated). Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Specifies the function used to decide whether two color features match.
| func | The color-match function. |
Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Returns the currently configured color-match function.
const reference to the color-match function. Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Specifies the function used to filter color features by type.
| func | The color-filter function. |
Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Returns the currently configured color-filter function.
const reference to the color-filter function. Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Calculates the shape-only self-overlap of the reference or aligned shape function.
| ref | If true, the reference self-overlap is returned; otherwise the aligned self-overlap. |
Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Calculates the color self-overlap of the reference or aligned shape function.
| ref | If true, the reference color self-overlap is returned; otherwise the aligned color self-overlap. |
Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Calculates the shape-only overlap of the reference and aligned shape functions.
Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Calculates the color overlap of the reference and aligned shape functions.
Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Calculates the shape-only overlap with the aligned shape element positions taken from coords.
| coords | The element 3D positions of the aligned shape. |
Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Calculates the color overlap with the aligned shape element positions taken from coords.
| coords | The element 3D positions of the aligned shape. |
Implements CDPL::Shape::GaussianShapeOverlapFunction.
|
virtual |
Calculates the shape overlap with the aligned shape element positions taken from coords and returns the gradient with respect to those positions.
| coords | The element 3D positions of the aligned shape. |
| grad | The output element-wise gradient of the overlap. |
Implements CDPL::Shape::GaussianShapeOverlapFunction.
| FastGaussianShapeOverlapFunction& CDPL::Shape::FastGaussianShapeOverlapFunction::operator= | ( | const FastGaussianShapeOverlapFunction & | func | ) |
Copy assignment operator.
| func | The other FastGaussianShapeOverlapFunction instance. |
|
staticconstexpr |
Default scaling factor applied to Van der Waals radii for the proximity-check pruning.