29 #ifndef CDPL_CHEM_MORGANNUMBERINGCALCULATOR_HPP
30 #define CDPL_CHEM_MORGANNUMBERINGCALCULATOR_HPP
91 typedef std::pair<std::size_t, std::size_t>
STPair;
94 typedef std::vector<std::size_t>
STArray;
95 typedef std::vector<long>
LArray;
96 typedef std::vector<std::string>
SArray;
102 NumberingState(STPairArray* sym_class_ids, SArray* symbols,
104 symClassIDs(sym_class_ids),
105 atomSymbols(symbols),
106 atomCharges(charges), atomIsotopes(isotopes), bondMatrix(bond_mtx) {}
113 void init(
const MolecularGraph&);
115 void perceiveSymClasses();
118 void distributeNumbers(std::size_t);
120 void getNextAtomIndices(
STArray&);
122 void addListEntriesForAtom(std::size_t, std::size_t);
124 void copy(NumberingState&);
126 typedef STPairArray::const_iterator STPairArrayIterator;
133 const MolecularGraph* molGraph;
138 std::string nodeValues;
141 STPairArrayIterator lastSymClass;
142 std::size_t centerAtomNumber;
143 std::size_t nextAtomNumber;
152 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 data structures that represent chemical structures as molecular graphs.
Definition: MolecularGraph.hpp:60
Computes canonical atom numberings for molecular graphs using Morgan's algorithm.
Definition: MorganNumberingCalculator.hpp:55
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:3559
Array< std::size_t > STArray
Array storing unsigned integers of type std::size_t.
Definition: Array.hpp:578
Array< long > LArray
Array storing integers of type long.
Definition: Array.hpp:583
Array< STPair > STPairArray
Array storing pairs of unsigned integers of type std::size_t.
Definition: Array.hpp:593
Array< std::string > SArray
Array storing std::string objects.
Definition: Array.hpp:603
std::pair< std::size_t, std::size_t > STPair
Pair of unsigned integers of type std::size_t.
Definition: Array.hpp:588
The namespace of the Chemical Data Processing Library.