FeatTree.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (C) 2005-2006 Rational Discovery LLC
00003 //
00004 //   @@ All Rights Reserved  @@
00005 //
00006 
00007 #ifndef _RD_FEATTREE_H_
00008 #define _RD_FEATTREE_H_
00009 
00010 #include <boost/graph/adjacency_list.hpp>
00011 #include <boost/property_map.hpp>
00012 #include <boost/shared_ptr.hpp>
00013 #include <set>
00014 
00015 namespace RDKit {
00016   class ROMol;
00017 
00018   namespace FeatTrees {
00019     typedef std::set<unsigned int> UINT_SET;
00020 
00021     // Each node of the feature tree topology contains:
00022     //   - a record of the atom indices that are lumped into
00023     //     that node
00024     struct FeatTreeNode_t {
00025       enum { num=1027 };
00026       typedef boost::vertex_property_tag kind;
00027     };
00028     typedef boost::property<FeatTreeNode_t,UINT_SET> FeatTreeNode;
00029 
00030     // Each edge of the feature tree topology contains:
00031     //   - an indicator of the number of rings at the ends
00032     //     (0, 1, or 2)
00033     struct FeatTreeEdge_t {
00034       enum { num=1028 };
00035       typedef boost::edge_property_tag kind;
00036     };
00037     typedef boost::property<FeatTreeEdge_t,unsigned int> FeatTreeEdge;
00038 
00039     typedef boost::adjacency_list < boost::vecS, boost::vecS,
00040                                     boost::undirectedS,
00041                                     FeatTreeNode,
00042                                     FeatTreeEdge > FeatTreeGraph;
00043     typedef boost::shared_ptr<FeatTreeGraph> FeatTreeGraphSPtr;
00044     
00045     typedef boost::property_map<FeatTreeGraph,FeatTreeEdge_t>::type FeatTreeEdgePMap;
00046     typedef boost::property_map<FeatTreeGraph,FeatTreeNode_t>::type FeatTreeNodePMap;
00047 
00048 
00049     /*!
00050 
00051     */
00052     FeatTreeGraphSPtr molToBaseTree(const ROMol &mol);
00053 
00054     void baseTreeToFeatTree(FeatTreeGraph &baseTree);
00055 
00056     
00057   }
00058 
00059   
00060 }
00061 #endif

Generated on Sat May 24 08:36:32 2008 for RDCode by  doxygen 1.5.3