def setup_ics(graph):
ics = []<EOL>for i0, i1 in graph.edges:<EOL><INDENT>ics.append(BondLength(i0, i1))<EOL><DEDENT>for i1 in range(graph.num_vertices):<EOL><INDENT>n = list(graph.neighbors[i1])<EOL>for index, i0 in enumerate(n):<EOL><INDENT>for i2 in n[:index]:<EOL><INDENT>ics.append(BendingAngle(i0, i1, i2))<EOL><DEDENT><DEDENT><DEDENT>for i1, i2 in graph.edges:<EOL><INDENT>for i0 in graph.neighbors[i1]:<EOL><INDENT>if i0==i2:<EOL><INDENT>continue<EOL><DEDENT>for i3 in graph.neighbors[i2]:<EOL><INDENT>if i3==i1 or i3==i0:<EOL><INDENT>continue<EOL><DEDENT>ics.append(DihedralAngle(i0, i1, i2, i3))<EOL><DEDENT><DEDENT><DEDENT>return ics<EOL>
Make a list of internal coordinates based on the graph

       Argument:
        | ``graph`` -- A Graph instance.

       The list of internal coordinates will include all bond lengths, all
       bending angles, and all dihedral angles.