29 #ifndef CDPL_CHEM_CONNECTEDSUBSTRUCTURESET_HPP
30 #define CDPL_CHEM_CONNECTEDSUBSTRUCTURESET_HPP
111 class SubstructDescriptor;
118 void growSubstructDescriptors(std::size_t);
119 void createSubstructFragments();
121 SubstructDescriptorPtr allocSubstructDescriptor(
const Bond&);
123 const char* getClassName()
const
125 return "ConnectedSubstructureSet";
128 class SubstructDescriptor
139 void copy(
const SubstructDescriptor&);
141 bool operator<(
const SubstructDescriptor&)
const;
144 typedef std::vector<const Atom*> AtomList;
145 typedef std::vector<std::size_t> BondCountList;
150 BondCountList atomBondCounts;
151 std::size_t unsatAListIdx;
152 std::size_t nbrBListIdx;
153 std::size_t lastBondIdx;
155 const Atom* startAtom;
158 struct SubstructDescriptorLessCmpFunc
161 bool operator()(
const SubstructDescriptorPtr&,
const SubstructDescriptorPtr&)
const;
164 typedef std::vector<SubstructDescriptorPtr> SubstructDescriptorList;
166 SubstructDescriptorCache substructDescrCache;
167 SubstructDescriptorList foundSubstructDescriptors;
169 std::size_t currSubstructSize;
170 const MolecularGraph* molGraph;
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::Chem::FragmentList.
Definition of class CDPL::Util::ObjectPool.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Abstract base class representing a chemical bond between two Chem::Atom instances.
Definition: Bond.hpp:54
Enumerates the connected substructures of a molecular graph of a specified bond count.
Definition: ConnectedSubstructureSet.hpp:56
ConnectedSubstructureSet()
Constructs an empty ConnectedSubstructureSet instance.
ConnectedSubstructureSet & operator=(const ConnectedSubstructureSet &)=delete
ConnectedSubstructureSet(const MolecularGraph &molgraph)
Constructs and initialzes a ConnectedSubstructureSet instance for the molecular graph molgraph.
void reset(const MolecularGraph &molgraph)
Specifies the molecular graph that is searched for connected substructures.
void findSubstructures(std::size_t size)
Searches the specified molecular graph for connected substructures of the given size.
std::size_t getSubstructureSize() const
Returns the current substructure size in terms of number of bonds.
std::shared_ptr< ConnectedSubstructureSet > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated ConnectedSubstructureSet instance...
Definition: ConnectedSubstructureSet.hpp:62
ConnectedSubstructureSet(const ConnectedSubstructureSet &)=delete
Data type for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
std::shared_ptr< Fragment > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Fragment instances.
Definition: Fragment.hpp:66
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
std::shared_ptr< ObjectType > SharedObjectPointer
A smart pointer to a borrowed object that returns the object to the pool on destruction.
Definition: ObjectPool.hpp:71
bool operator<(const Array< ValueType > &array1, const Array< ValueType > &array2)
Less than comparison operator.
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.