29 #ifndef CDPL_CHEM_BONDSTEREOFLAGCALCULATOR_HPP
30 #define CDPL_CHEM_BONDSTEREOFLAGCALCULATOR_HPP
116 class StereoAtomInfo;
123 void assignFlagsForIsolatedCenter(
const StereoAtomInfo*,
Util::UIArray&);
124 bool assignFlagsForNonIsolatedCenters(std::size_t, std::size_t,
Util::UIArray&);
126 void switchStereoFlag(std::size_t);
132 typedef std::shared_ptr<StereoAtomInfo> SharedPointer;
135 const Atom*,
unsigned int, std::size_t,
const Atom**,
const Bond**);
137 unsigned int getConfiguration()
const;
141 bool hasStereoAtomNbrs()
const;
145 std::size_t getNumBonds()
const;
147 std::size_t getBondIndex(std::size_t)
const;
148 std::size_t getNbrAtomIndex(std::size_t)
const;
150 std::size_t getAtomIndex()
const;
153 typedef std::pair<const Atom*, std::size_t> Ligand;
157 unsigned int configuration;
158 std::size_t numBonds;
160 double configCalcTerms[4];
161 bool bondEndFlags[4];
163 Ligand orderedLigands[4];
166 typedef std::vector<StereoAtomInfo*> StereoAtomInfoList;
167 typedef std::vector<StereoAtomInfo::SharedPointer> StereoAtomInfoPtrTable;
168 typedef std::vector<const Bond*> BondList;
171 Atom2DCoordinatesFunction coordsFunc;
173 StereoAtomInfoPtrTable stereoAtomTable;
174 StereoAtomInfoList stereoAtomList;
175 BondList eitherBondList;
181 std::size_t numMismatchingCtrs;
182 std::size_t minNumMismatchingCtrs;
Definition of class CDPL::Util::Array.
Declaration of 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 class CDPL::Math::VectorArray.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Calculator that derives 2D wedge/hash bond stereo flags from atom 2D coordinates and stereochemical d...
Definition: BondStereoFlagCalculator.hpp:63
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
Type of the generic functor class used to store a user-defined atom 2D-coordinates function.
Definition: BondStereoFlagCalculator.hpp:69
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.
Abstract base class representing a chemical bond between two Chem::Atom instances.
Definition: Bond.hpp:54
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
CVector< double, 2 > Vector2D
Bounded 2 element vector holding floating point values of type double.
Definition: Vector.hpp:2932
Array< unsigned int > UIArray
Array storing unsigned integers of type unsigned int.
Definition: Array.hpp:570
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.