Chemical Data Processing Library Python API - Version 1.4.0
Public Member Functions | Static Public Attributes | Properties | List of all members
CDPL.Shape.PrincipalAxesAlignmentStartGenerator Class Reference

Generator that produces alignment starting transformations by aligning the principal axes of the aligned shape to those of the reference shape. More...

+ Inheritance diagram for CDPL.Shape.PrincipalAxesAlignmentStartGenerator:

Public Member Functions

None __init__ ()
 Constructs the PrincipalAxesAlignmentStartGenerator instance.
 
None __init__ (PrincipalAxesAlignmentStartGenerator gen)
 Initializes a copy of the PrincipalAxesAlignmentStartGenerator instance gen. More...
 
None setSymmetryThreshold (float thresh)
 Sets the relative threshold for treating two principal moments as equal. More...
 
float getSymmetryThreshold ()
 Returns the currently configured symmetry threshold. More...
 
None genShapeCenterStarts (bool generate)
 Enables or disables the generation of a starting transformation at the shape centroid. More...
 
bool genShapeCenterStarts ()
 Tells whether a starting transformation at the shape centroid is generated. More...
 
None genColorCenterStarts (bool generate)
 Enables or disables the generation of starting transformations at color (pharmacophore) feature centers. More...
 
bool genColorCenterStarts ()
 Tells whether starting transformations at color (pharmacophore) feature centers are generated. More...
 
None genNonColorCenterStarts (bool generate)
 Enables or disables the generation of starting transformations at non-color (shape) element centers. More...
 
bool genNonColorCenterStarts ()
 Tells whether starting transformations at non-color (shape) element centers are generated. More...
 
None genRandomStarts (bool generate)
 Enables or disables the generation of random starting transformations. More...
 
bool genRandomStarts ()
 Tells whether random starting transformations are generated. More...
 
None genForAlignedShapeCenters (bool generate)
 Specifies whether element-/color-center starts shall be generated for centers of the aligned shape. More...
 
bool genForAlignedShapeCenters ()
 Tells whether element-/color-center starts are generated for centers of the aligned shape. More...
 
None genForReferenceShapeCenters (bool generate)
 Specifies whether element-/color-center starts shall be generated for centers of the reference shape. More...
 
bool genForReferenceShapeCenters ()
 Tells whether element-/color-center starts are generated for centers of the reference shape. More...
 
None 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 ()
 Tells whether element-/color-center starts are generated for centers of the shape with more elements (instead of both shapes). More...
 
None setMaxRandomTranslation (float max_trans)
 Sets the maximum random translation magnitude applied to random starts. More...
 
float getMaxRandomTranslation ()
 Returns the currently configured maximum random translation. More...
 
None setNumRandomStarts (int num_starts)
 Sets the number of random starting transformations. More...
 
int getNumRandomStarts ()
 Returns the currently configured number of random starts. More...
 
None setRandomSeed (int seed)
 Sets the seed used by the random number generator that produces the random starts. More...
 
PrincipalAxesAlignmentStartGenerator assign (PrincipalAxesAlignmentStartGenerator gen)
 Replaces the current state of self with a copy of the state of the PrincipalAxesAlignmentStartGenerator instance gen. More...
 
- Public Member Functions inherited from CDPL.Shape.GaussianShapeAlignmentStartGenerator
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
int setupReference (GaussianShapeFunction func, Math.Matrix4D xform)
 Prepares the reference shape function for use by the start generator. More...
 
int setupAligned (GaussianShapeFunction func, Math.Matrix4D xform)
 Prepares the aligned shape function for use by the start generator. More...
 
None setReference (GaussianShapeFunction func, int sym_class)
 
bool generate (GaussianShapeFunction func, int sym_class)
 Generates the set of starting transformations for the alignment of func. More...
 
int getNumStartTransforms ()
 Returns the number of starting transformations produced by the last generate() call. More...
 
int getNumStartSubTransforms ()
 Returns the number of sub-transformations sharing the same starting transformation index space. More...
 
Math.Vector7D getStartTransform (int idx)
 Returns the starting transformation at index idx. More...
 
int __len__ ()
 
Math.Vector7D __getitem__ (int idx)
 

Static Public Attributes

float DEF_SYMMETRY_THRESHOLD = 0.15
 Default relative threshold for treating two principal moments as equal.
 
int DEF_NUM_RANDOM_STARTS = 4
 Default number of random starting transformations.
 
float DEF_MAX_RANDOM_TRANSLATION = 2.0
 Default maximum random translation magnitude applied to random starts.
 

Properties

 symmetryThreshold = property(getSymmetryThreshold, setSymmetryThreshold)
 
 maxRandomTranslation = property(getMaxRandomTranslation, setMaxRandomTranslation)
 
 numRandomStarts = property(getNumRandomStarts, setNumRandomStarts)
 
 shapeCenterStarts = property(genShapeCenterStarts, genShapeCenterStarts)
 
 colorCenterStarts = property(genColorCenterStarts, genColorCenterStarts)
 
 nonColorCenterStarts = property(genNonColorCenterStarts, genNonColorCenterStarts)
 
 randomStarts = property(getNumRandomStarts, setNumRandomStarts)
 
 genForAlignedShapeCtrs = property(genForAlignedShapeCenters, genForAlignedShapeCenters)
 
 genForReferenceShapeCrs = property(genForReferenceShapeCenters, genForReferenceShapeCenters)
 
 genForLargerShapeCtrs = property(genForLargerShapeCenters, genForLargerShapeCenters)
 
- Properties inherited from CDPL.Shape.GaussianShapeAlignmentStartGenerator
 objectID = property(getObjectID)
 
 numStartSubTransforms = property(getNumStartSubTransforms)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.__init__ ( PrincipalAxesAlignmentStartGenerator  gen)

Initializes a copy of the PrincipalAxesAlignmentStartGenerator instance gen.

Parameters
genThe PrincipalAxesAlignmentStartGenerator instance to copy.

Member Function Documentation

◆ setSymmetryThreshold()

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.setSymmetryThreshold ( float  thresh)

Sets the relative threshold for treating two principal moments as equal.

Parameters
threshThe new symmetry threshold.

◆ getSymmetryThreshold()

float CDPL.Shape.PrincipalAxesAlignmentStartGenerator.getSymmetryThreshold ( )

Returns the currently configured symmetry threshold.

Returns
The symmetry threshold.

◆ genShapeCenterStarts() [1/2]

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genShapeCenterStarts ( bool  generate)

Enables or disables the generation of a starting transformation at the shape centroid.

Parameters
generateTrue to enable the shape-centroid start, and False to disable it.

◆ genShapeCenterStarts() [2/2]

bool CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genShapeCenterStarts ( )

Tells whether a starting transformation at the shape centroid is generated.

Returns
True if a shape-centroid start is generated, and False otherwise.

◆ genColorCenterStarts() [1/2]

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genColorCenterStarts ( bool  generate)

Enables or disables the generation of starting transformations at color (pharmacophore) feature centers.

Parameters
generateTrue to enable the color-center starts, and False to disable them.

◆ genColorCenterStarts() [2/2]

bool CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genColorCenterStarts ( )

Tells whether starting transformations at color (pharmacophore) feature centers are generated.

Returns
True if color-center starts are generated, and False otherwise.

◆ genNonColorCenterStarts() [1/2]

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genNonColorCenterStarts ( bool  generate)

Enables or disables the generation of starting transformations at non-color (shape) element centers.

Parameters
generateTrue to enable the non-color-center starts, and False to disable them.

◆ genNonColorCenterStarts() [2/2]

bool CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genNonColorCenterStarts ( )

Tells whether starting transformations at non-color (shape) element centers are generated.

Returns
True if non-color-center starts are generated, and False otherwise.

◆ genRandomStarts() [1/2]

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genRandomStarts ( bool  generate)

Enables or disables the generation of random starting transformations.

Parameters
generateTrue to enable the random starts, and False to disable them.

◆ genRandomStarts() [2/2]

bool CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genRandomStarts ( )

Tells whether random starting transformations are generated.

Returns
True if random starts are generated, and False otherwise.

◆ genForAlignedShapeCenters() [1/2]

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genForAlignedShapeCenters ( bool  generate)

Specifies whether element-/color-center starts shall be generated for centers of the aligned shape.

Parameters
generateTrue to consider aligned-shape centers, and False to ignore them.

◆ genForAlignedShapeCenters() [2/2]

bool CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genForAlignedShapeCenters ( )

Tells whether element-/color-center starts are generated for centers of the aligned shape.

Returns
True if aligned-shape centers are considered, and False otherwise.

◆ genForReferenceShapeCenters() [1/2]

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genForReferenceShapeCenters ( bool  generate)

Specifies whether element-/color-center starts shall be generated for centers of the reference shape.

Parameters
generateTrue to consider reference-shape centers, and False to ignore them.

◆ genForReferenceShapeCenters() [2/2]

bool CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genForReferenceShapeCenters ( )

Tells whether element-/color-center starts are generated for centers of the reference shape.

Returns
True if reference-shape centers are considered, and False otherwise.

◆ genForLargerShapeCenters() [1/2]

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

Parameters
generateTrue to use only the centers of the larger shape, and False to use the centers of all configured shapes.

◆ genForLargerShapeCenters() [2/2]

bool CDPL.Shape.PrincipalAxesAlignmentStartGenerator.genForLargerShapeCenters ( )

Tells whether element-/color-center starts are generated for centers of the shape with more elements (instead of both shapes).

Returns
True if only the centers of the larger shape are used, and False otherwise.

◆ setMaxRandomTranslation()

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.setMaxRandomTranslation ( float  max_trans)

Sets the maximum random translation magnitude applied to random starts.

Parameters
max_transThe new maximum random translation magnitude.

◆ getMaxRandomTranslation()

float CDPL.Shape.PrincipalAxesAlignmentStartGenerator.getMaxRandomTranslation ( )

Returns the currently configured maximum random translation.

Returns
The maximum random translation magnitude.

◆ setNumRandomStarts()

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.setNumRandomStarts ( int  num_starts)

Sets the number of random starting transformations.

Parameters
num_startsThe new number of random starts.

◆ getNumRandomStarts()

int CDPL.Shape.PrincipalAxesAlignmentStartGenerator.getNumRandomStarts ( )

Returns the currently configured number of random starts.

Returns
The number of random starts.

◆ setRandomSeed()

None CDPL.Shape.PrincipalAxesAlignmentStartGenerator.setRandomSeed ( int  seed)

Sets the seed used by the random number generator that produces the random starts.

Parameters
seedThe new random seed.

◆ assign()

PrincipalAxesAlignmentStartGenerator CDPL.Shape.PrincipalAxesAlignmentStartGenerator.assign ( PrincipalAxesAlignmentStartGenerator  gen)

Replaces the current state of self with a copy of the state of the PrincipalAxesAlignmentStartGenerator instance gen.

Parameters
genThe PrincipalAxesAlignmentStartGenerator instance to copy.
Returns
self