32 #ifndef CDPL_CHEM_MORGANNUMBERINGCALCULATOR_HPP
33 #define CDPL_CHEM_MORGANNUMBERINGCALCULATOR_HPP
95 typedef std::pair<std::size_t, std::size_t>
STPair;
98 typedef std::vector<std::size_t>
STArray;
99 typedef std::vector<long>
LArray;
100 typedef std::vector<std::string>
SArray;
106 NumberingState(STPairArray* sym_class_ids, SArray* symbols,
108 symClassIDs(sym_class_ids),
109 atomSymbols(symbols),
110 atomCharges(charges), atomIsotopes(isotopes), bondMatrix(bond_mtx) {}
117 void init(
const MolecularGraph&);
119 void perceiveSymClasses();
122 void distributeNumbers(std::size_t);
124 void getNextAtomIndices(
STArray&);
126 void addListEntriesForAtom(std::size_t, std::size_t);
128 void copy(NumberingState&);
130 typedef STPairArray::const_iterator STPairArrayIterator;
137 const MolecularGraph* molGraph;
142 std::string nodeValues;
145 STPairArrayIterator lastSymClass;
146 std::size_t centerAtomNumber;
147 std::size_t nextAtomNumber;
156 NumberingState numbering;
Definition of class CDPL::Util::Array.
Definition of the preprocessor macro CDPL_CHEM_API.
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of matrix data types.
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
Computes a canonical atom numbering of a molecular graph using a modified Morgan algorithm.
Definition: MorganNumberingCalculator.hpp:63
MorganNumberingCalculator()
Constructs the MorganNumberingCalculator instance.
MorganNumberingCalculator(const MolecularGraph &molgraph, Util::STArray &numbering)
Constructs the MorganNumberingCalculator instance and performs a canonical numbering of the atoms in ...
MorganNumberingCalculator(const MorganNumberingCalculator &)=delete
void calculate(const MolecularGraph &molgraph, Util::STArray &numbering)
Performs a canonical numbering of the atoms in the molecular graph molgraph.
MorganNumberingCalculator & operator=(const MorganNumberingCalculator &)=delete
SparseMatrix< unsigned long > SparseULMatrix
Unbounded sparse matrix holding unsigned integers of type unsigned long.
Definition: Matrix.hpp:3235
Array< std::size_t > STArray
Array storing unsigned integers of type std::size_t.
Definition: Array.hpp:575
Array< long > LArray
Array storing integers of type long.
Definition: Array.hpp:580
Array< STPair > STPairArray
Array storing pairs of unsigned integers of type std::size_t.
Definition: Array.hpp:590
Array< std::string > SArray
Array storing std::string objects.
Definition: Array.hpp:600
std::pair< std::size_t, std::size_t > STPair
Pair of unsigned integers of type std::size_t.
Definition: Array.hpp:585
The namespace of the Chemical Data Processing Library.