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()]
20 r.set_maximum_score(.1)
27 pst.set_particle_states(p, space)
29 m.set_log_level(IMP.base.SILENT)
36 print "Unable to display graph using 'dot'"
40 ds.set_scoring_function([r])
42 ds.set_log_level(IMP.base.SILENT)
47 def get_assignments(vertex):
48 on = mt.get_out_neighbors(vertex)
51 ret = ds.get_vertex_assignments(vertex)
58 a0 = get_assignments(on[0])
59 a1 = get_assignments(on[1])
60 ret = ds.get_vertex_assignments(vertex, a0, a1)
61 print mt.get_vertex_name(vertex), [str(r)
for r
in ret]
65 get_assignments(mt.get_vertices()[-1])
72 def schedule_job(vertex):
75 on = mt.get_out_neighbors(vertex)
78 max_child_time = max(schedule_job(n), max_child_time)
79 my_time = max_child_time + 1
80 while len(schedule) < my_time + 1:
83 schedule[my_time].append(vertex)
86 schedule_job(mt.get_vertices()[-1])
87 print "The merging can be scheduled as", schedule
Various classes to hold sets of particles.
Sample best solutions using Domino.
static XYZ setup_particle(kernel::Model *m, ParticleIndex pi)
Store a kernel::ParticleIndexPairs.
Class to handle individual model particles.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
MergeTree get_merge_tree(const SubsetGraph &junction_tree)
Applies a PairScore to each Pair in a list.
Divide-and-conquer inferential optimization in discrete space.
Class for storing model, its restraints, constraints, and particles.