IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP::atom::BondGraph Class Reference

Represent a bond graph as a boost graph. More...

#include <IMP/atom/bond_graph.h>

Detailed Description

Represent a bond graph as a boost graph.

The BondGraph class implements the following boost graph concepts

  • bidirectional_graph
  • adjacency_graph
  • vertex_list_graph
  • edge_list_graph.

See the Boost.Graph manual for more details and a list of algorithms.

The vertices are Bondeds. The type of the edge_descriptors is internal. You can use the get_bond() method to get the corresponding Bond.

And all vertices can be assumed to have internal boost vertex indices. The Boost.PropertyMap to access these can be accessed using the get_vertex_index_map() function.

Some usage examples

boost::isomorphism(a,b,
boost::isomorphism_map(BondGraph::VertexVertexPropertyMap(pk))
.vertex_index1_map(a.get_vertex_index_map())
.vertex_index2_map(b.get_vertex_index_map()));
boost::dijkstra_shortest_paths(a, Bonded(),
boost::predecessor_map(BondGraph::VertexVertexPropertyMap(pk))
.weight_map(BondGraph::EdgeFloatPropertyMap(Bond::get_legnth_key()))
.distance_map(BondGraph::VertexFloatPropertyMap(FloatKey("graph distance")))
.vertex_index_map(a.get_vertex_index_map()));
VertexVertexPropertyMap
Provide boost access to a Particle attribute each vertex.
Definition bond_graph.h:109
EdgeFloatPropertyMap
Provide boost access to a Float attribute on the edges such as length.
Definition bond_graph.h:111
VertexFloatPropertyMap
Provide boost access to a Float attribute each vertex.
Definition bond_graph.h:104
A decorator for a particle which has bonds.
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
Definition base_types.h:32
Warning: BondGraph has not been well tested yet
Use with caution and please report any bugs found.

Definition at line 59 of file bond_graph.h.

Public Member Functions

 BondGraph (Hierarchy bd)
 The graph is on the leaves of the atom::Hierarchy.
Bond get_bond (edge_descriptor d) const

Property maps

Boost.Graph makes extensive use of property maps. We define a few maps which use the particle attributes to store their data. Each map is constructed by passing an appropriate attribute key, to specify the attribute used to store the data. Attempt to store to an attribute which the particle does not already have adds the attribute to the particle. More information about property maps can be found in the Boost.PropertyMap documentation.

 VertexFloatPropertyMap
 Provide boost access to a Float attribute each vertex.
 VertexIntPropertyMap
 Provide boost access to an Int attribute each vertex.
 VertexVertexPropertyMap
 Provide boost access to a Particle attribute each vertex.
 EdgeFloatPropertyMap
 Provide boost access to a Float attribute on the edges such as length.
 EdgeIntPropertyMap
 Provide boost access to an Int attribute on each edge.
VertexIntPropertyMap get_vertex_index_map () const

Constructor & Destructor Documentation

◆ BondGraph() [1/2]

IMP::atom::BondGraph::BondGraph ( Hierarchy bd)

The graph is on the leaves of the atom::Hierarchy.

All the leaves will be made Bonded particles if they are not already.

Note
The hierarchy must not have any bonds to particles not in the hierarchy.
Here is the call graph for this function:

◆ BondGraph() [2/2]

IMP::atom::BondGraph::BondGraph ( )

Definition at line 73 of file bond_graph.h.

Member Function Documentation

◆ get_bond()

Bond IMP::atom::BondGraph::get_bond ( edge_descriptor d) const

Definition at line 123 of file bond_graph.h.

Member Data Documentation

◆ EdgeFloatPropertyMap

IMP::atom::BondGraph::EdgeFloatPropertyMap

Provide boost access to a Float attribute on the edges such as length.

Definition at line 111 of file bond_graph.h.

◆ EdgeIntPropertyMap

IMP::atom::BondGraph::EdgeIntPropertyMap

Provide boost access to an Int attribute on each edge.

Definition at line 113 of file bond_graph.h.

◆ VertexFloatPropertyMap

IMP::atom::BondGraph::VertexFloatPropertyMap

Provide boost access to a Float attribute each vertex.

Definition at line 104 of file bond_graph.h.

◆ VertexIntPropertyMap

IMP::atom::BondGraph::VertexIntPropertyMap

Provide boost access to an Int attribute each vertex.

Definition at line 106 of file bond_graph.h.

◆ VertexVertexPropertyMap

IMP::atom::BondGraph::VertexVertexPropertyMap

Provide boost access to a Particle attribute each vertex.

The particles in question must be Bonded particles.

Definition at line 109 of file bond_graph.h.


The documentation for this class was generated from the following file: