8 #ifndef INCLUDE_MOLASSEMBLER_OUTER_GRAPH_H
9 #define INCLUDE_MOLASSEMBLER_OUTER_GRAPH_H
20 using ElementTypeCollection = std::vector<ElementType>;
21 class BondOrderCollection;
24 namespace Molassembler {
71 template<
typename T,
bool isVertexInitialized>
75 std::is_same<T, AtomIndex>::value || std::is_same<T, BondIndex>::value,
76 "You may not instantiate this type for other Ts than AtomIndex or BondIndex"
79 using iterator_category = std::forward_iterator_tag;
80 using difference_type = std::ptrdiff_t;
117 template<
bool Dependent = isVertexInitialized, std::enable_if_t<!Dependent,
int>...>
132 template<
bool Dependent = isVertexInitialized, std::enable_if_t<Dependent,
int>...>
136 InnerBasedIterator& operator ++ ();
138 InnerBasedIterator operator ++ (
int);
140 value_type operator * ()
const;
143 bool operator == (
const InnerBasedIterator& other)
const;
145 bool operator != (
const InnerBasedIterator& other)
const;
149 std::unique_ptr<Impl> pImpl_;
184 void setElementType(
AtomIndex i, Utils::ElementType type) final;
190 void removeBond(const
BondIndex& bond) final;
204 std::vector<
AtomIndex> atomsOfElement(Utils::ElementType e) const;
214 Utils::BondOrderCollection bondOrders() const;
235 bool canRemove(const
BondIndex& edge) const final;
243 const
Cycles& cycles() const final;
248 unsigned degree(
AtomIndex a) const final;
250 std::
string dumpGraphviz() const;
255 Utils::ElementTypeCollection elementCollection() const;
260 Utils::ElementType elementType(
AtomIndex a) const final;
266 [[deprecated("Prefer V")]]
278 [[deprecated("Prefer E")]]
285 unsigned E() const final;
292 boost::optional<std::vector<
AtomIndex>> modularIsomorphism(
307 std::vector<AtomIndex>
308 > splitAlongBridge(
BondIndex bridge) const;
314 bool operator == (const
Graph& other) const;
315 inline
bool operator != (const
Graph& other)
const {
316 return !(*
this == other);
372 std::unique_ptr<PrivateGraph> innerPtr_;
Interface class for the molecular graph.
Represents the connectivity of atoms of a molecule.
Definition: Graph.h:54
Templated iterator facade based on PrivateGraph to provide iterative access to atom indices and edge ...
Definition: Graph.h:72
AtomEnvironmentComponents
For bitmasks grouping components of immediate atom environments.
Definition: Types.h:103
Definition: GraphInterface.h:21
Wrapper class to make working with RDL in C++ more pleasant.
Definition: Cycles.h:44
Homogeneous pair of iterators with begin and end member fns.
Definition: IteratorRange.h:26
std::size_t AtomIndex
Unsigned integer atom index type. Used to refer to particular atoms.
Definition: Types.h:51
Library internal graph class wrapping BGL types.
Definition: PrivateGraph.h:26
BondType
Discrete bond type numeration.
Definition: Types.h:26
Type used to refer to particular bonds. Orders first < second.
Definition: Types.h:54