2 #ifndef INDIGOX_GRAPH_MOLECULAR_HPP 3 #define INDIGOX_GRAPH_MOLECULAR_HPP 5 #include "../algorithm/graph/cycles.hpp" 6 #include "../utils/fwd_declares.hpp" 9 #include <EASTL/vector_map.h> 46 template <
typename Archive>
47 void serialise(Archive &archive,
const uint32_t version);
51 std::shared_ptr<MGVertexData> m_data;
81 template <
typename Archive>
82 void serialise(Archive &archive,
const uint32_t version);
86 std::shared_ptr<MGEdgeData> m_data;
111 using AtomMap = eastl::vector_map<Atom, MGVertex>;
113 using BondMap = eastl::vector_map<Bond, MGEdge>;
121 using NbrsIter = NbrsContain::mapped_type::const_iterator;
137 template <
typename Archive>
138 void serialise(Archive &archive,
const uint32_t version);
160 void RemoveEdge(
const MGEdge &e);
172 void RemoveVertex(
const MGVertex &v);
186 std::vector<MGEdge> &edges);
230 std::shared_ptr<Impl> m_data;
MolecularGraph Subgraph(std::vector< MGVertex > &vertices)
Induce a subgraph from the range of vertices.
const Atom & GetAtom() const
Get the atom associated with this vertex.
const Molecule & GetMolecule() const
#define INDIGOX_GENERIC_PIMPL_CLASS_DEFAULTS(class_name)
Definition: fwd_declares.hpp:18
bool HasVertex(const MGVertex &v) const
Is the vertex in the graph.
Definition: base_graph_impl.hpp:187
const MGVertex & GetVertex(const Atom &atm) const
Get the vertex associated with an atom.
Definition: assignment.hpp:16
eastl::vector_map< Bond, MGEdge > BondMap
Container for mapping bonds to edges.
Definition: molecular.hpp:113
Definition: condensed.hpp:131
const MolecularGraph & GetSuperGraph() const
Class for the edges of a IXMolecularGraph.
Definition: molecular.hpp:55
std::map< MGVertex, VertContain > NbrsContain
Container for neighbours of vertices.
Definition: molecular.hpp:109
EdgeContain::const_iterator EdgeIter
Type of the iterator returned by GetEdges() method.
Definition: molecular.hpp:117
const MGEdge & GetEdge(const Bond &bnd) const
Get the edge associated with a bond.
MolecularGraph()=default
Construct with a molecule.
Class containing a graph representation of a molecule.
Definition: molecular.hpp:95
NbrsContain::mapped_type::const_iterator NbrsIter
Type of the iterator returned by GetNeighbours() method.
Definition: molecular.hpp:121
Class for the vertices of a IXMolecularGraph.
Definition: molecular.hpp:20
std::vector< MGEdge > EdgeContain
Container for edges.
Definition: molecular.hpp:107
eastl::vector_map< Atom, MGVertex > AtomMap
Container for mapping atoms to vertices.
Definition: molecular.hpp:111
bool HasEdge(const MGEdge &e) const
Is the edge in the graph.
Definition: base_graph_impl.hpp:192
friend class cereal::access
Friendship allows for serialisation.
Definition: molecular.hpp:24
const MolecularGraph & GetGraph() const
Get the graph this edge is part of.
friend class cereal::access
Friendship allows serialisation.
Definition: molecular.hpp:100
const CondensedMolecularGraph & GetCondensedGraph()
VertContain::const_iterator VertIter
Type of the iterator returned by GetVertices() method.
Definition: molecular.hpp:119
Definition: molecule.hpp:15
#define INDIGOX_GENERIC_PIMPL_CLASS_OPERATORS(class_name, short_name)
Definition: fwd_declares.hpp:26
MGEdge GetEdge(const MGVertex &u, const MGVertex &v) const
Get the edge between two vertices.
Definition: base_graph_impl.hpp:267
bool HasVertex(const Atom &v) const
Check if the graph has a vertex associated with an atom.
Template base class for all graphs used in the indigoX library.
Definition: base_graph.hpp:56
std::vector< MGVertex > VertContain
Container for vertices.
Definition: molecular.hpp:105
friend class cereal::access
Friendship allows for serialisation.
Definition: molecular.hpp:59
const Bond & GetBond() const
Get the bond associated with this edge.
const MolecularGraph & GetGraph() const
Get the graph this vertex is part of.
bool HasEdge(const Bond &e) const
Check if the graph has an edge associated with a bond.