29 #ifndef CDPL_CHEM_BONDSTEREOFLAGCALCULATOR_HPP
30 #define CDPL_CHEM_BONDSTEREOFLAGCALCULATOR_HPP
108 class StereoAtomInfo;
115 void assignFlagsForIsolatedCenter(
const StereoAtomInfo*,
Util::UIArray&);
116 bool assignFlagsForNonIsolatedCenters(std::size_t, std::size_t,
Util::UIArray&);
118 void switchStereoFlag(std::size_t);
124 typedef std::shared_ptr<StereoAtomInfo> SharedPointer;
127 const Atom*,
unsigned int, std::size_t,
const Atom**,
const Bond**);
129 unsigned int getConfiguration()
const;
133 bool hasStereoAtomNbrs()
const;
137 std::size_t getNumBonds()
const;
139 std::size_t getBondIndex(std::size_t)
const;
140 std::size_t getNbrAtomIndex(std::size_t)
const;
142 std::size_t getAtomIndex()
const;
145 typedef std::pair<const Atom*, std::size_t> Ligand;
149 unsigned int configuration;
150 std::size_t numBonds;
152 double configCalcTerms[4];
153 bool bondEndFlags[4];
155 Ligand orderedLigands[4];
158 typedef std::vector<StereoAtomInfo*> StereoAtomInfoList;
159 typedef std::vector<StereoAtomInfo::SharedPointer> StereoAtomInfoPtrTable;
160 typedef std::vector<const Bond*> BondList;
163 Atom2DCoordinatesFunction coordsFunc;
165 StereoAtomInfoPtrTable stereoAtomTable;
166 StereoAtomInfoList stereoAtomList;
167 BondList eitherBondList;
173 std::size_t numMismatchingCtrs;
174 std::size_t minNumMismatchingCtrs;
Definition of the class CDPL::Util::Array.
Definition of the type CDPL::Util::BitSet.
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 the class CDPL::Math::VectorArray.
Atom.
Definition: Atom.hpp:52
BondStereoFlagCalculator.
Definition: BondStereoFlagCalculator.hpp:58
BondStereoFlagCalculator(const MolecularGraph &molgraph, Util::UIArray &flags)
Constructs the BondStereoFlagCalculator instance and calculates the 2D stereo flags of the bonds in t...
BondStereoFlagCalculator(const BondStereoFlagCalculator &)=delete
const Atom2DCoordinatesFunction & getAtom2DCoordinatesFunction() const
Returns the function that was registered for the retrieval of atom 2D-coordinates.
BondStereoFlagCalculator & operator=(const BondStereoFlagCalculator &)=delete
BondStereoFlagCalculator()
Constructs the BondStereoFlagCalculator instance.
std::function< const Math::Vector2D &(const Atom &)> Atom2DCoordinatesFunction
Definition: BondStereoFlagCalculator.hpp:61
void setAtom2DCoordinatesFunction(const Atom2DCoordinatesFunction &func)
Specifies a function for the retrieval of atom 2D-coordinates.
void calculate(const MolecularGraph &molgraph, Util::UIArray &flags)
Calculates the 2D stereo flags of the bonds in the molecular graph molgraph.
Bond.
Definition: Bond.hpp:50
MolecularGraph.
Definition: MolecularGraph.hpp:52
CVector< double, 2 > Vector2D
A bounded 2 element vector holding floating point values of type double.
Definition: Vector.hpp:1632
Array< unsigned int > UIArray
An array of unsigned integers.
Definition: Array.hpp:562
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.