|Molecule, Atoms and Bonds|
CDL employs the Boost
Graph Library (BGL) to represent the graph data structure. Also, BGL graph algorithms
are widely used within CDL.
Now, vertices maps to atomic properties and edges maps to bond properties.
You can map an atom from a vertex, but not a vertex from an atom : the map is unidirectional (except when you have the atom iterator, then you can map back to the vertex iterator). In the same way, you can map a bond from an edge, but not an edge from a bond (except when you have the bond iterator).
The vertex iterator points to a structure called "vertex descriptor", which is of std::size_t, and represents the index of the vertex in the graph. In the same way, the edge iterators points to a structure called "edge descriptor" which is of a type of no interest to us, however is important to know that it contains a pair of vertex descriptors that makes the edge.