![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Generator that produces alignment starting transformations by aligning the principal axes of the aligned shape to those of the reference shape. More...
#include <PrincipalAxesAlignmentStartGenerator.hpp>
Inheritance diagram for CDPL::Shape::PrincipalAxesAlignmentStartGenerator:Public Member Functions | |
| PrincipalAxesAlignmentStartGenerator () | |
Constructs the PrincipalAxesAlignmentStartGenerator instance. More... | |
| unsigned int | setupReference (GaussianShapeFunction &func, Math::Matrix4D &xform) const |
| Prepares the reference shape function for use by the start generator. More... | |
| unsigned int | setupAligned (GaussianShapeFunction &func, Math::Matrix4D &xform) const |
| Prepares the aligned shape function for use by the start generator. More... | |
| void | genShapeCenterStarts (bool generate) |
| Enables or disables the generation of a starting transformation at the shape centroid. More... | |
| bool | genShapeCenterStarts () const |
| Tells whether a starting transformation at the shape centroid is generated. More... | |
| void | genColorCenterStarts (bool generate) |
| Enables or disables the generation of starting transformations at color (pharmacophore) feature centers. More... | |
| bool | genColorCenterStarts () const |
| Tells whether starting transformations at color (pharmacophore) feature centers are generated. More... | |
| void | genNonColorCenterStarts (bool generate) |
| Enables or disables the generation of starting transformations at non-color (shape) element centers. More... | |
| bool | genNonColorCenterStarts () const |
| Tells whether starting transformations at non-color (shape) element centers are generated. More... | |
| void | genRandomStarts (bool generate) |
| Enables or disables the generation of random starting transformations. More... | |
| bool | genRandomStarts () const |
| Tells whether random starting transformations are generated. More... | |
| void | genForAlignedShapeCenters (bool generate) |
| Specifies whether element-/color-center starts shall be generated for centers of the aligned shape. More... | |
| bool | genForAlignedShapeCenters () const |
| Tells whether element-/color-center starts are generated for centers of the aligned shape. More... | |
| void | genForReferenceShapeCenters (bool generate) |
| Specifies whether element-/color-center starts shall be generated for centers of the reference shape. More... | |
| bool | genForReferenceShapeCenters () const |
| Tells whether element-/color-center starts are generated for centers of the reference shape. More... | |
| void | genForLargerShapeCenters (bool generate) |
| Specifies whether element-/color-center starts shall be generated for centers of the shape with more elements (instead of both shapes). More... | |
| bool | genForLargerShapeCenters () const |
| Tells whether element-/color-center starts are generated for centers of the shape with more elements (instead of both shapes). More... | |
| void | setSymmetryThreshold (double thresh) |
| Sets the relative threshold for treating two principal moments as equal. More... | |
| double | getSymmetryThreshold () |
| Returns the currently configured symmetry threshold. More... | |
| void | setMaxRandomTranslation (double max_trans) |
| Sets the maximum random translation magnitude applied to random starts. More... | |
| double | getMaxRandomTranslation () const |
| Returns the currently configured maximum random translation. More... | |
| void | setNumRandomStarts (std::size_t num_starts) |
| Sets the number of random starting transformations. More... | |
| std::size_t | getNumRandomStarts () const |
| Returns the currently configured number of random starts. More... | |
| void | setRandomSeed (unsigned int seed) |
| Sets the seed used by the random number generator that produces the random starts. More... | |
| void | setReference (const GaussianShapeFunction &func, unsigned int sym_class) |
| Specifies the reference shape function and its symmetry class. More... | |
| bool | generate (const GaussianShapeFunction &func, unsigned int sym_class) |
| Generates the starting transformations for the alignment of func against the previously configured reference shape. More... | |
| std::size_t | getNumStartTransforms () const |
| Returns the total number of starting transformations produced by the last generate() call. More... | |
| std::size_t | getNumStartSubTransforms () const |
| Returns the number of sub-transformations applied per generated starting transformation (e.g. axes-swap variants). More... | |
| const QuaternionTransformation & | getStartTransform (std::size_t idx) const |
| Returns the starting transformation at index idx. More... | |
Public Member Functions inherited from CDPL::Shape::GaussianShapeAlignmentStartGenerator | |
| virtual | ~GaussianShapeAlignmentStartGenerator () |
| Virtual destructor. More... | |
Static Public Attributes | |
| static constexpr double | DEF_SYMMETRY_THRESHOLD = 0.15 |
| Default relative threshold for treating two principal moments as equal. More... | |
| static constexpr std::size_t | DEF_NUM_RANDOM_STARTS = 4 |
| Default number of random starting transformations. More... | |
| static constexpr double | DEF_MAX_RANDOM_TRANSLATION = 2.0 |
| Default maximum random translation magnitude applied to random starts. More... | |
Generator that produces alignment starting transformations by aligning the principal axes of the aligned shape to those of the reference shape.
Starting transformations can be derived from any combination of (a) the shape centroid, (b) shape element (atom) centers, (c) color (pharmacophore) feature centers, and (d) random rotations applied to translated centers. The exact combination of starts is configured via the various gen* setter methods.
| CDPL::Shape::PrincipalAxesAlignmentStartGenerator::PrincipalAxesAlignmentStartGenerator | ( | ) |
Constructs the PrincipalAxesAlignmentStartGenerator instance.
|
virtual |
Prepares the reference shape function for use by the start generator.
| func | The reference shape function (may be modified, e.g. centered). |
| xform | The output transformation that maps the reference shape from its prepared frame back to its original frame. |
Reimplemented from CDPL::Shape::GaussianShapeAlignmentStartGenerator.
|
virtual |
Prepares the aligned shape function for use by the start generator.
| func | The aligned shape function (may be modified, e.g. centered). |
| xform | The output transformation that maps the aligned shape from its prepared frame back to its original frame. |
Reimplemented from CDPL::Shape::GaussianShapeAlignmentStartGenerator.
| void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genShapeCenterStarts | ( | bool | generate | ) |
Enables or disables the generation of a starting transformation at the shape centroid.
| generate | true to enable the shape-centroid start, and false to disable it. |
| bool CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genShapeCenterStarts | ( | ) | const |
Tells whether a starting transformation at the shape centroid is generated.
true if a shape-centroid start is generated, and false otherwise. | void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genColorCenterStarts | ( | bool | generate | ) |
Enables or disables the generation of starting transformations at color (pharmacophore) feature centers.
| generate | true to enable the color-center starts, and false to disable them. |
| bool CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genColorCenterStarts | ( | ) | const |
Tells whether starting transformations at color (pharmacophore) feature centers are generated.
true if color-center starts are generated, and false otherwise. | void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genNonColorCenterStarts | ( | bool | generate | ) |
Enables or disables the generation of starting transformations at non-color (shape) element centers.
| generate | true to enable the non-color-center starts, and false to disable them. |
| bool CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genNonColorCenterStarts | ( | ) | const |
Tells whether starting transformations at non-color (shape) element centers are generated.
true if non-color-center starts are generated, and false otherwise. | void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genRandomStarts | ( | bool | generate | ) |
Enables or disables the generation of random starting transformations.
| generate | true to enable the random starts, and false to disable them. |
| bool CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genRandomStarts | ( | ) | const |
Tells whether random starting transformations are generated.
true if random starts are generated, and false otherwise. | void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genForAlignedShapeCenters | ( | bool | generate | ) |
Specifies whether element-/color-center starts shall be generated for centers of the aligned shape.
| generate | true to consider aligned-shape centers, and false to ignore them. |
| bool CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genForAlignedShapeCenters | ( | ) | const |
Tells whether element-/color-center starts are generated for centers of the aligned shape.
true if aligned-shape centers are considered, and false otherwise. | void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genForReferenceShapeCenters | ( | bool | generate | ) |
Specifies whether element-/color-center starts shall be generated for centers of the reference shape.
| generate | true to consider reference-shape centers, and false to ignore them. |
| bool CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genForReferenceShapeCenters | ( | ) | const |
Tells whether element-/color-center starts are generated for centers of the reference shape.
true if reference-shape centers are considered, and false otherwise. | void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genForLargerShapeCenters | ( | bool | generate | ) |
Specifies whether element-/color-center starts shall be generated for centers of the shape with more elements (instead of both shapes).
| generate | true to use only the centers of the larger shape, and false to use the centers of all configured shapes. |
| bool CDPL::Shape::PrincipalAxesAlignmentStartGenerator::genForLargerShapeCenters | ( | ) | const |
Tells whether element-/color-center starts are generated for centers of the shape with more elements (instead of both shapes).
true if only the centers of the larger shape are used, and false otherwise. | void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::setSymmetryThreshold | ( | double | thresh | ) |
Sets the relative threshold for treating two principal moments as equal.
| thresh | The new symmetry threshold. |
| double CDPL::Shape::PrincipalAxesAlignmentStartGenerator::getSymmetryThreshold | ( | ) |
Returns the currently configured symmetry threshold.
| void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::setMaxRandomTranslation | ( | double | max_trans | ) |
Sets the maximum random translation magnitude applied to random starts.
| max_trans | The new maximum random translation magnitude. |
| double CDPL::Shape::PrincipalAxesAlignmentStartGenerator::getMaxRandomTranslation | ( | ) | const |
Returns the currently configured maximum random translation.
| void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::setNumRandomStarts | ( | std::size_t | num_starts | ) |
Sets the number of random starting transformations.
| num_starts | The new number of random starts. |
| std::size_t CDPL::Shape::PrincipalAxesAlignmentStartGenerator::getNumRandomStarts | ( | ) | const |
Returns the currently configured number of random starts.
| void CDPL::Shape::PrincipalAxesAlignmentStartGenerator::setRandomSeed | ( | unsigned int | seed | ) |
Sets the seed used by the random number generator that produces the random starts.
| seed | The new random seed. |
|
virtual |
Specifies the reference shape function and its symmetry class.
| func | The reference shape function. |
| sym_class | The symmetry class of the reference shape (see namespace Shape::SymmetryClass). |
Implements CDPL::Shape::GaussianShapeAlignmentStartGenerator.
|
virtual |
Generates the starting transformations for the alignment of func against the previously configured reference shape.
| func | The aligned shape function. |
| sym_class | The symmetry class of the aligned shape (see namespace Shape::SymmetryClass). |
true if at least one starting transformation has been generated, and false otherwise. Implements CDPL::Shape::GaussianShapeAlignmentStartGenerator.
|
virtual |
Returns the total number of starting transformations produced by the last generate() call.
Implements CDPL::Shape::GaussianShapeAlignmentStartGenerator.
|
virtual |
Returns the number of sub-transformations applied per generated starting transformation (e.g. axes-swap variants).
Implements CDPL::Shape::GaussianShapeAlignmentStartGenerator.
|
virtual |
Returns the starting transformation at index idx.
| idx | The zero-based index of the starting transformation. |
const reference to the starting transformation. | Base::IndexError | if the number of starting transformations is zero or idx is not in the range [0, getNumStartTransforms() - 1]. |
Implements CDPL::Shape::GaussianShapeAlignmentStartGenerator.
|
staticconstexpr |
Default relative threshold for treating two principal moments as equal.
|
staticconstexpr |
Default number of random starting transformations.
|
staticconstexpr |
Default maximum random translation magnitude applied to random starts.