10 def optimize_subsets(subsets):
12 for subset
in subsets:
26 def setup_scoring_function(ps):
28 pairs=[[0,1],[0,2],[1,2],[2,3],[3,4],[4,5],[3,5]]
35 def initiate_configuration(domino_smp,ps):
45 domino_smp.set_particle_states(p,states)
51 mdl.set_log_level(IMP.base.SILENT)
60 setup_scoring_function(ps)
66 pst = optimize_subsets(subsets)
80 domino_smp.set_maximum_score(.2)
83 initiate_configuration(domino_smp,ps)
89 cs=domino_smp.get_sample()
93 print "Found ", cs.get_number_of_configurations(),
"solutions"
94 for i
in range(cs.get_number_of_configurations()):
95 cs.load_configuration(i)
97 print "solution number:",i,
" scored:", m.evaluate(
False)