Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Properties | List of all members
CDPL.Descr.AutoCorrelation2DVectorCalculator Class Reference

AutoCorrelation2DVectorCalculator. More...

+ Inheritance diagram for CDPL.Descr.AutoCorrelation2DVectorCalculator:

Public Member Functions

None __init__ ()
 Constructs the AutoCorrelation2DVectorCalculator instance.
 
None __init__ (AutoCorrelation2DVectorCalculator calc)
 Initializes a copy of the AutoCorrelation2DVectorCalculator instance calc. More...
 
None __init__ (Chem.MolecularGraph molgraph, Math.DVector corr_vec)
 Constructs the AutoCorrelation2DVectorCalculator instance and calculates the autocorrelation vector of the molecular graph molgraph. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
AutoCorrelation2DVectorCalculator assign (AutoCorrelation2DVectorCalculator calc)
 Replaces the current state of self with a copy of the state of the AutoCorrelation2DVectorCalculator instance calc. More...
 
None setMaxDistance (int max_dist)
 Allows to specify that maximum bond path length to consider. More...
 
int getMaxDistance ()
 Returns the maximum considered bond path length. More...
 
None setAtomPairWeightFunction (Chem.DoubleAtom2Functor func)
 Allows to specify a custom atom pair weight function. More...
 
None calculate (Chem.MolecularGraph molgraph, Math.DVector corr_vec)
 Calculates the topological autocorrelation vector of the molecular graph molgraph. More...
 

Properties

 objectID = property(getObjectID)
 
 maxDistance = property(getMaxDistance, setMaxDistance)
 

Detailed Description

AutoCorrelation2DVectorCalculator.

See also
[AUCOR, HBMD]

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Descr.AutoCorrelation2DVectorCalculator.__init__ ( AutoCorrelation2DVectorCalculator  calc)

Initializes a copy of the AutoCorrelation2DVectorCalculator instance calc.

Parameters
calcThe AutoCorrelation2DVectorCalculator instance to copy.

◆ __init__() [2/2]

None CDPL.Descr.AutoCorrelation2DVectorCalculator.__init__ ( Chem.MolecularGraph  molgraph,
Math.DVector  corr_vec 
)

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
molgraphThe molecular graph for which to calculate the autocorrelation vector.
corr_vecThe calculated autocorrelation vector.

Member Function Documentation

◆ 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()

AutoCorrelation2DVectorCalculator CDPL.Descr.AutoCorrelation2DVectorCalculator.assign ( AutoCorrelation2DVectorCalculator  calc)

Replaces the current state of self with a copy of the state of the AutoCorrelation2DVectorCalculator instance calc.

Parameters
calcThe 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_distThe 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()

None CDPL.Descr.AutoCorrelation2DVectorCalculator.setAtomPairWeightFunction ( Chem.DoubleAtom2Functor  func)

Allows to specify a custom atom pair weight function.

Parameters
funcAn 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()

None CDPL.Descr.AutoCorrelation2DVectorCalculator.calculate ( Chem.MolecularGraph  molgraph,
Math.DVector  corr_vec 
)

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
molgraphThe molecular graph for which to calculate the autocorrelation vector.
corr_vecThe calculated autocorrelation vector.