Supplementary Material for Graph Canonicalization

These routines should work for Python 2.0+, they have
only been checked with python 2.2. however.

The test_* python files are a good introduction to how to
use the supplied routines.  The process in a nutshell
is as follows:

1) read in a graph file
2) canonicalize the graph (i.e. generate the symmetry orders
   that specify the canonical node and edge ordering
   for the graph)
3) Output the nodes and edges in order of their symmetry
   orders.

here is a brief example:

==================================================
import GraphML, EquivClass, Canonicalize, Traverse

# read the graph
graphs = GraphML.parseGraphML("undirected.xml")
G = graphs[0]

# perform the canonicalization
EquivClass.GenerateEquivClasses(G)
Canonicalize.GenerateSymmetryClasses(G)
Traverse.generateSymmetryOrders(G)

# output the graph
stringRepresentation = str(G)
print stringRepresentation

==================================================
For a much more complicated example, see the
chemistry based canonicalization at
http://frowns.sourceforge.net/

Brian Kelley
bkelley@wi.mit.edu
Whitehead Institute for Biomedical Research