BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
BALL::MolecularGraph Class Reference

#include <BALL/DATATYPE/GRAPH/molecularGraph.h>

Inheritance diagram for BALL::MolecularGraph:
MolecularGraphBase

Public Types

enum  ExportOptions { INCLUDE_ALL = -1 }
 do something useful with this More...
 
typedef boost::graph_traits
< MolecularGraph >
::vertex_descriptor 
Vertex
 
typedef boost::graph_traits
< MolecularGraph >
::edge_descriptor 
Edge
 
typedef boost::graph_traits
< MolecularGraph >
::vertex_iterator 
VertexIterator
 
typedef boost::graph_traits
< MolecularGraph >
::edge_iterator 
EdgeIterator
 
typedef boost::property_map
< MolecularGraphBase,
boost::vertex_atom_ptr_t >
::type 
AtomPtrMap
 
typedef boost::property_map
< MolecularGraphBase,
boost::edge_bond_ptr_t >::type 
BondPtrMap
 
typedef boost::property_map
< MolecularGraphBase,
boost::vertex_atom_ptr_t >
::const_type 
ConstAtomPtrMap
 
typedef boost::property_map
< MolecularGraphBase,
boost::edge_bond_ptr_t >
::const_type 
ConstBondPtrMap
 
typedef GRAPH::GraphTraits
< MolecularGraph >
::EditableGraph 
EditableGraph
 

Public Member Functions

 MolecularGraph (AtomContainer &ac, ExportOptions opt=INCLUDE_ALL)
 
const EdgegetEdge (const Bond *bond) const
 
const VertexgetVertex (const Atom *atom) const
 
void editableCopy (EditableGraph &eg)
 

Private Attributes

std::map< const Bond *, Edgebond_to_edge_
 
std::map< const Atom *, Vertexatom_to_vertex_
 

Detailed Description

This class provides a boost graph library representation of the molecular graph. It takes an AtomContainer as an input and creates an undirected graph modelling the atom connectivity. Bonds pointing into another atom container will be omited. The vertices of the graph are labeled with pointers to the original atoms; The edges are labeled with pointers to the original bonds.

These properties can be obtained by using the following code:

AtomPtrMap atom_ptrs = get(boost::vertex_atom_ptr, graph);
const Atom* atom = boost::get(atom_ptrs, vertex_handle);

Definition at line 46 of file molecularGraph.h.

Member Typedef Documentation

Definition at line 58 of file molecularGraph.h.

Definition at line 59 of file molecularGraph.h.

Definition at line 60 of file molecularGraph.h.

Definition at line 61 of file molecularGraph.h.

typedef boost::graph_traits<MolecularGraph>::edge_descriptor BALL::MolecularGraph::Edge

Definition at line 54 of file molecularGraph.h.

typedef boost::graph_traits<MolecularGraph>::edge_iterator BALL::MolecularGraph::EdgeIterator

Definition at line 57 of file molecularGraph.h.

Definition at line 63 of file molecularGraph.h.

typedef boost::graph_traits<MolecularGraph>::vertex_descriptor BALL::MolecularGraph::Vertex

Definition at line 53 of file molecularGraph.h.

typedef boost::graph_traits<MolecularGraph>::vertex_iterator BALL::MolecularGraph::VertexIterator

Definition at line 56 of file molecularGraph.h.

Member Enumeration Documentation

do something useful with this

Enumerator
INCLUDE_ALL 

Definition at line 51 of file molecularGraph.h.

Constructor & Destructor Documentation

BALL::MolecularGraph::MolecularGraph ( AtomContainer ac,
ExportOptions  opt = INCLUDE_ALL 
)

Member Function Documentation

void BALL::MolecularGraph::editableCopy ( EditableGraph eg)
const Edge& BALL::MolecularGraph::getEdge ( const Bond bond) const
const Vertex& BALL::MolecularGraph::getVertex ( const Atom atom) const

Member Data Documentation

std::map<const Atom*, Vertex> BALL::MolecularGraph::atom_to_vertex_
private

Definition at line 74 of file molecularGraph.h.

std::map<const Bond*, Edge> BALL::MolecularGraph::bond_to_edge_
private

Definition at line 73 of file molecularGraph.h.