S(hierarchy=all, molecule="Seh1"))
    add_distance_restraint(S(hierarchy=all, molecule="Nup145C",
                             residue_indexes=[(0,423)]),
                           S(hierarchy=all, molecule="Sec13"))

# now do the actual work
(m,all)= create_representation()
create_restraints(m, all)

# we can get the full dependency graph for the whole model with all the restraints
# but it is pretty complex
dg= IMP.get_dependency_graph(m)
IMP.show_graphviz(dg);

# better thing to do is to get the "pruned" graph
pdg= IMP.get_pruned_dependency_graph(m)
try:
    # these all open new windows which must be closed to continue
    # also, the graph is no where near as nice as displayed by
    # IMP.show_graphviz below

    #import matplotlib
    # the engine to be used must be selected before pyplot is imported
    #matplotlib.use("macosx")
    #import matplotlib.pyplot as plt

    # the method below requires the altgraph python package
    #xg=IMP.get_networkx_graph(pdg)

    #import networkx
    #networkx.draw_spectral(xg)