Chemical Data Processing Library C++ API - Version 1.1.1
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
CDPL::Chem::CanonicalNumberingCalculator Class Reference

CanonicalNumberingCalculator. More...

#include <CanonicalNumberingCalculator.hpp>

Public Types

typedef std::function< std::size_t(const Atom &, const MolecularGraph &)> HydrogenCountFunction
 

Public Member Functions

 CanonicalNumberingCalculator ()
 Constructs the CanonicalNumberingCalculator instance. More...
 
 CanonicalNumberingCalculator (const MolecularGraph &molgraph, Util::STArray &numbering)
 Constructs the CanonicalNumberingCalculator instance and performs a canonical numbering of the atoms in the molecular graph molgraph. More...
 
void setAtomPropertyFlags (unsigned int flags)
 Allows to specify the set of atomic properties that has to be considered by the canonical numering algorithm. More...
 
unsigned int getAtomPropertyFlags () const
 Returns the set of atomic properties that gets considered by the canonical numbering algorithm. More...
 
void setBondPropertyFlags (unsigned int flags)
 Allows to specify the set of bond properties that has to be considered by the canonical numering algorithm. More...
 
unsigned int getBondPropertyFlags () const
 Returns the set of bond properties that gets considered by the canonical numbering algorithm. More...
 
void setHydrogenCountFunction (const HydrogenCountFunction &func)
 
const HydrogenCountFunctiongetHydrogenCountFunction ()
 
void calculate (const MolecularGraph &molgraph, Util::STArray &numbering)
 Performs a canonical numbering of the atoms in the molecular graph molgraph. More...
 

Static Public Attributes

static constexpr unsigned int DEF_ATOM_PROPERTY_FLAGS
 Specifies the default set of atomic properties considered by the canonical numbering algorithm. More...
 
static constexpr unsigned int DEF_BOND_PROPERTY_FLAGS
 Specifies the default set of bond properties considered by the canonical numbering algorithm. More...
 

Detailed Description

CanonicalNumberingCalculator.

See also
[MCKAY]

Member Typedef Documentation

◆ HydrogenCountFunction

typedef std::function<std::size_t(const Atom&, const MolecularGraph&)> CDPL::Chem::CanonicalNumberingCalculator::HydrogenCountFunction

Constructor & Destructor Documentation

◆ CanonicalNumberingCalculator() [1/2]

CDPL::Chem::CanonicalNumberingCalculator::CanonicalNumberingCalculator ( )

Constructs the CanonicalNumberingCalculator instance.

◆ CanonicalNumberingCalculator() [2/2]

CDPL::Chem::CanonicalNumberingCalculator::CanonicalNumberingCalculator ( const MolecularGraph molgraph,
Util::STArray numbering 
)

Constructs the CanonicalNumberingCalculator instance and performs a canonical numbering of the atoms in the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to perform the canonical numbering.
numberingAn array that contains the calculated canonical atom labels. The labels are stored in the same order as the atoms appear in the atom list of the molecular graph (i.e. the canonical number of an atom is accessible via its index).

Member Function Documentation

◆ setAtomPropertyFlags()

void CDPL::Chem::CanonicalNumberingCalculator::setAtomPropertyFlags ( unsigned int  flags)

Allows to specify the set of atomic properties that has to be considered by the canonical numering algorithm.

The flags argument is an OR combination of the constants defined in namespace Chem::AtomPropertyFlag. Supported property flags are:

Parameters
flagsThe set of atomic properties to consider.
Note
The default set of atomic properties is specified by CanonicalNumberingCalculator::DEF_ATOM_PROPERTY_FLAGS.

◆ getAtomPropertyFlags()

unsigned int CDPL::Chem::CanonicalNumberingCalculator::getAtomPropertyFlags ( ) const

Returns the set of atomic properties that gets considered by the canonical numbering algorithm.

Returns
The set of considered atomic properties.
See also
setAtomPropertyFlags()

◆ setBondPropertyFlags()

void CDPL::Chem::CanonicalNumberingCalculator::setBondPropertyFlags ( unsigned int  flags)

Allows to specify the set of bond properties that has to be considered by the canonical numering algorithm.

The flags argument is an OR combination of the constants defined in namespace Chem::BondPropertyFlag. Supported property flags are:

Parameters
flagsThe set of bond properties to consider.
Note
The default set of bond properties is specified by CanonicalNumberingCalculator::DEF_BOND_PROPERTY_FLAGS.

◆ getBondPropertyFlags()

unsigned int CDPL::Chem::CanonicalNumberingCalculator::getBondPropertyFlags ( ) const

Returns the set of bond properties that gets considered by the canonical numbering algorithm.

Returns
The set of considered bond properties.
See also
setBondPropertyFlags()

◆ setHydrogenCountFunction()

void CDPL::Chem::CanonicalNumberingCalculator::setHydrogenCountFunction ( const HydrogenCountFunction func)

◆ getHydrogenCountFunction()

const HydrogenCountFunction& CDPL::Chem::CanonicalNumberingCalculator::getHydrogenCountFunction ( )

◆ calculate()

void CDPL::Chem::CanonicalNumberingCalculator::calculate ( const MolecularGraph molgraph,
Util::STArray numbering 
)

Performs a canonical numbering of the atoms in the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to perform the canonical numbering.
numberingAn array that contains the calculated canonical atom labels. The labels are stored in the same order as the atoms appear in the atom list of the molecular graph (i.e. the canonical number of an atom is accessible via its index).

Member Data Documentation

◆ DEF_ATOM_PROPERTY_FLAGS

constexpr unsigned int CDPL::Chem::CanonicalNumberingCalculator::DEF_ATOM_PROPERTY_FLAGS
staticconstexpr
Initial value:

Specifies the default set of atomic properties considered by the canonical numbering algorithm.

◆ DEF_BOND_PROPERTY_FLAGS

constexpr unsigned int CDPL::Chem::CanonicalNumberingCalculator::DEF_BOND_PROPERTY_FLAGS
staticconstexpr
Initial value:

Specifies the default set of bond properties considered by the canonical numbering algorithm.


The documentation for this class was generated from the following file:
CDPL::Chem::AtomPropertyFlag::FORMAL_CHARGE
const unsigned int FORMAL_CHARGE
Specifies the formal charge of an atom.
Definition: Chem/AtomPropertyFlag.hpp:73
CDPL::Chem::BondPropertyFlag::AROMATICITY
const unsigned int AROMATICITY
Specifies the membership of a bond in aromatic rings.
Definition: BondPropertyFlag.hpp:73
CDPL::Chem::BondPropertyFlag::CONFIGURATION
const unsigned int CONFIGURATION
Specifies the steric configuration of a double bond.
Definition: BondPropertyFlag.hpp:78
CDPL::Chem::AtomPropertyFlag::CONFIGURATION
const unsigned int CONFIGURATION
Specifies the configuration of a stereogenic atom.
Definition: Chem/AtomPropertyFlag.hpp:98
CDPL::Chem::BondPropertyFlag::ORDER
const unsigned int ORDER
Specifies the order of a bond.
Definition: BondPropertyFlag.hpp:63
CDPL::Chem::AtomPropertyFlag::TYPE
const unsigned int TYPE
Specifies the generic type or element of an atom.
Definition: Chem/AtomPropertyFlag.hpp:63
CDPL::Chem::AtomPropertyFlag::ISOTOPE
const unsigned int ISOTOPE
Specifies the isotopic mass of an atom.
Definition: Chem/AtomPropertyFlag.hpp:68
CDPL::Chem::AtomPropertyFlag::AROMATICITY
const unsigned int AROMATICITY
Specifies the membership of an atom in aromatic rings.
Definition: Chem/AtomPropertyFlag.hpp:93
CDPL::Chem::AtomPropertyFlag::H_COUNT
const unsigned int H_COUNT
Specifies the hydrogen count of an atom.
Definition: Chem/AtomPropertyFlag.hpp:78