|
Chemical Data Processing Library C++ API - Version 1.0.0
|
Go to the documentation of this file.
32 #ifndef CDPL_CHEM_SMALLESTSETOFSMALLESTRINGS_HPP
33 #define CDPL_CHEM_SMALLESTSETOFSMALLESTRINGS_HPP
89 typedef std::vector<MessagePtr> MessageList;
95 void visitComponentAtom(
const Atom& atom);
99 void createRingFragments();
103 bool sssrComplete()
const;
105 MessagePtr allocMessage();
106 MessagePtr allocMessage(std::size_t, std::size_t, std::size_t, std::size_t);
108 bool processCollision(
const MessagePtr&,
const MessagePtr&, std::size_t,
bool);
109 void processRing(
const MessagePtr&);
110 void processEvenRings();
116 TNode(std::size_t idx):
119 bool send(Controller*);
120 bool receive(Controller*);
122 std::size_t getIndex()
const;
123 std::size_t getNumNeighbors()
const;
125 void initMessages(Controller* ctrl, std::size_t max_num_atoms, std::size_t max_num_bonds);
127 static void connect(TNode*, TNode*, std::size_t);
130 typedef std::vector<TNode*> NodeList;
131 typedef std::vector<std::size_t> BondIndexList;
134 BondIndexList bondIndices;
135 MessageList receiveBuffer;
136 MessageList sendBuffer;
150 void init(std::size_t, std::size_t, std::size_t, std::size_t);
152 void copy(
const MessagePtr&);
153 bool join(
const MessagePtr&,
const MessagePtr&);
155 void addAtom(std::size_t);
156 void addBond(std::size_t);
158 bool containsAtom(std::size_t
const);
159 bool containsBond(std::size_t
const);
161 std::size_t getFirstAtomIndex()
const;
162 std::size_t getFirstBondIndex()
const;
164 std::size_t getMaxBondIndex()
const;
171 void setRemoveFlag();
172 void setEdgeCollisionFlag();
174 bool getRemoveFlag()
const;
175 bool getEdgeCollisionFlag()
const;
177 PathMessage& operator^=(
const PathMessage&);
182 std::size_t firstAtomIdx;
183 std::size_t firstBondIdx;
184 std::size_t maxBondIdx;
189 struct TestMatrixRowCmpFunc
192 bool operator()(
const MessagePtr&,
const MessagePtr&)
const;
195 typedef std::vector<TNode> NodeArray;
196 typedef std::set<MessagePtr, PathMessage::LessCmpFunc> ProcRingSet;
198 MessageCache msgCache;
203 ProcRingSet procRings;
204 MessageList evenRings;
206 MessagePtr linDepTestRing;
207 MessageList linDepTestMtx;
209 std::size_t sssrSize;
214 #endif // CDPL_CHEM_SMALLESTSETOFSMALLESTRINGS_HPP
Definition of the class CDPL::Util::ObjectPool.
Definition of the preprocessor macro CDPL_CHEM_API.
SmallestSetOfSmallestRings()
Constructs an empty SmallestSetOfSmallestRings instance.
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
bool operator()(const MessagePtr &, const MessagePtr &) const
Atom.
Definition: Atom.hpp:52
Fragment.
Definition: Fragment.hpp:52
void perceive(const MolecularGraph &molgraph)
Replaces the current set of rings by the SSSR of the molecular graph molgraph.
Implements the perception of ring atoms and bonds in a molecular graph.
Definition: CyclicSubstructure.hpp:50
MolecularGraph.
Definition: MolecularGraph.hpp:52
Definition of the type CDPL::Util::BitSet.
std::shared_ptr< ObjectType > SharedObjectPointer
Definition: ObjectPool.hpp:64
Definition of the class CDPL::Chem::CyclicSubstructure.
std::shared_ptr< Fragment > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Fragment instances.
Definition: Fragment.hpp:61
A data type for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
std::shared_ptr< SmallestSetOfSmallestRings > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated SmallestSetOfSmallestRings instan...
Definition: SmallestSetOfSmallestRings.hpp:64
Implements the perception of the Smallest Set of Smallest Rings (SSSR) of a molecular graphs.
Definition: SmallestSetOfSmallestRings.hpp:58
The namespace of the Chemical Data Processing Library.
Definition: SmallestSetOfSmallestRings.hpp:145
SmallestSetOfSmallestRings(const MolecularGraph &molgraph)
Constructs a SmallestSetOfSmallestRings instance containing the SSSR of the molecular graph molgraph.
Definition of the class CDPL::Chem::FragmentList.