AutoCorrelation2DVectorCalculator.
More...
◆ __init__() [1/2]
Initializes a copy of the AutoCorrelation2DVectorCalculator instance calc.
- Parameters
-
calc | The AutoCorrelation2DVectorCalculator instance to copy. |
◆ __init__() [2/2]
Constructs the AutoCorrelation2DVectorCalculator
instance and calculates the autocorrelation vector of the molecular graph molgraph.
The calculated autocorrelation vector can be retrieved by a call to getResult().
- Parameters
-
molgraph | The molecular graph for which to calculate the autocorrelation vector. |
corr_vec | The calculated autocorrelation vector. |
◆ getObjectID()
int CDPL.Descr.AutoCorrelation2DVectorCalculator.getObjectID |
( |
| ) |
|
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python AutoCorrelation2DVectorCalculator instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b
thus cannot tell reliably whether the two AutoCorrelation2DVectorCalculator instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID()
.
- Returns
- The numeric ID of the internally referenced C++ class instance.
◆ assign()
Replaces the current state of self with a copy of the state of the AutoCorrelation2DVectorCalculator instance calc.
- Parameters
-
calc | The AutoCorrelation2DVectorCalculator instance to copy. |
- Returns
- self
◆ setMaxDistance()
None CDPL.Descr.AutoCorrelation2DVectorCalculator.setMaxDistance |
( |
int |
max_dist | ) |
|
Allows to specify that maximum bond path length to consider.
- Parameters
-
max_dist | The maximum considered bond path length. |
- Note
- The default value is 0 which signals no path length limit.
◆ getMaxDistance()
int CDPL.Descr.AutoCorrelation2DVectorCalculator.getMaxDistance |
( |
| ) |
|
Returns the maximum considered bond path length.
- Returns
- The maximum considered bond path length.
◆ setAtomPairWeightFunction()
Allows to specify a custom atom pair weight function.
- Parameters
-
func | An AutoCorrelation2DVectorCalculator.AtomPairWeightFunction instance that wraps the target function. |
- Note
- The default atom pair weight function returns the product of the atom types (see namespace Chem.AtomType).
◆ calculate()
Calculates the topological autocorrelation vector of the molecular graph molgraph.
The elements of the calculated vector provide the sum of the weights of all atom pairs with a topological distance equal to the element index. The size of the vector is limited by the topological diameter of the molecular graph or the specified maximum considered bond path length (
- See also
- setMaxDistance()).
- Parameters
-
molgraph | The molecular graph for which to calculate the autocorrelation vector. |
corr_vec | The calculated autocorrelation vector. |