Chemical Data Processing Library C++ API - Version 1.1.1
Public Types | Public Member Functions | List of all members
CDPL::Descr::AutoCorrelation2DVectorCalculator Class Reference

AutoCorrelation2DVectorCalculator. More...

#include <AutoCorrelation2DVectorCalculator.hpp>

Public Types

typedef std::function< double(const Chem::Atom &, const Chem::Atom &)> AtomPairWeightFunction
 Type of the generic functor class used to store user-defined atom pair weight functions. More...
 

Public Member Functions

 AutoCorrelation2DVectorCalculator ()
 Constructs the AutoCorrelation2DVectorCalculator instance. More...
 
 AutoCorrelation2DVectorCalculator (const Chem::MolecularGraph &molgraph, Math::DVector &corr_vec)
 Constructs the AutoCorrelation2DVectorCalculator instance and calculates the autocorrelation vector of the molecular graph molgraph. More...
 
void setMaxDistance (std::size_t max_dist)
 Allows to specify that maximum bond path length to consider. More...
 
std::size_t getMaxDistance () const
 Returns the maximum considered bond path length. More...
 
void setAtomPairWeightFunction (const AtomPairWeightFunction &func)
 Allows to specify a custom atom pair weight function. More...
 
void calculate (const Chem::MolecularGraph &molgraph, Math::DVector &corr_vec)
 Calculates the topological autocorrelation vector of the molecular graph molgraph. More...
 

Detailed Description

AutoCorrelation2DVectorCalculator.

See also
[AUCOR, HBMD]

Member Typedef Documentation

◆ AtomPairWeightFunction

Type of the generic functor class used to store user-defined atom pair weight functions.

The provided atom pair weight function (or function object) is required to take the two atoms (as a const reference to Chem::Atom) as its arguments and return the weight of the atom pair as a floating-point value of type double (see [FUNWRP]).

Constructor & Destructor Documentation

◆ AutoCorrelation2DVectorCalculator() [1/2]

CDPL::Descr::AutoCorrelation2DVectorCalculator::AutoCorrelation2DVectorCalculator ( )

Constructs the AutoCorrelation2DVectorCalculator instance.

◆ AutoCorrelation2DVectorCalculator() [2/2]

CDPL::Descr::AutoCorrelation2DVectorCalculator::AutoCorrelation2DVectorCalculator ( const 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

◆ setMaxDistance()

void CDPL::Descr::AutoCorrelation2DVectorCalculator::setMaxDistance ( std::size_t  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()

std::size_t CDPL::Descr::AutoCorrelation2DVectorCalculator::getMaxDistance ( ) const

Returns the maximum considered bond path length.

Returns
The maximum considered bond path length.

◆ setAtomPairWeightFunction()

void CDPL::Descr::AutoCorrelation2DVectorCalculator::setAtomPairWeightFunction ( const AtomPairWeightFunction 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()

void CDPL::Descr::AutoCorrelation2DVectorCalculator::calculate ( const 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.

The documentation for this class was generated from the following file: