17 [(ps[i[0]], ps[i[1]])
for i
in [(0, 1), (1, 2)]])
18 print [(p[0].get_name(), p[1].get_name())
for p
in lpc.get_particle_pairs()]
21 r.set_maximum_score(.1)
28 pst.set_particle_states(p, space)
30 m.set_log_level(IMP.base.SILENT)
37 print "Unable to display graph using 'dot'"
41 ds.set_scoring_function([r])
43 ds.set_log_level(IMP.base.SILENT)
48 def get_assignments(vertex):
49 on = mt.get_out_neighbors(vertex)
52 ret = ds.get_vertex_assignments(vertex)
59 a0 = get_assignments(on[0])
60 a1 = get_assignments(on[1])
61 ret = ds.get_vertex_assignments(vertex, a0, a1)
62 print mt.get_vertex_name(vertex), [str(r)
for r
in ret]
66 get_assignments(mt.get_vertices()[-1])
73 def schedule_job(vertex):
76 on = mt.get_out_neighbors(vertex)
79 max_child_time = max(schedule_job(n), max_child_time)
80 my_time = max_child_time + 1
81 while len(schedule) < my_time + 1:
84 schedule[my_time].append(vertex)
87 schedule_job(mt.get_vertices()[-1])
88 print "The merging can be scheduled as", schedule
See IMP.container for more information.
Sample best solutions using Domino.
static XYZ setup_particle(kernel::Model *m, ParticleIndex pi)
Store a ParticleIndexPairs.
Class to handle individual model particles.
See IMP.algebra for more information.
MergeTree get_merge_tree(const SubsetGraph &junction_tree)
Applies a PairScore to each Pair in a list.
See IMP.domino for more information.
Class for storing model, its restraints, constraints, and particles.