11 def optimize_subsets(subsets):
13 for subset
in subsets:
22 mdl = ps[0].get_model()
24 mdl.get_root_restraint_set(), ps)
29 def setup_scoring_function(ps):
31 pairs = [[0, 1], [0, 2], [1, 2], [2, 3], [3, 4], [4, 5], [3, 5]]
40 def initiate_configuration(domino_smp, ps):
50 domino_smp.set_particle_states(p, states)
56 mdl.set_log_level(IMP.base.SILENT)
65 setup_scoring_function(ps)
71 pst = optimize_subsets(subsets)
85 domino_smp.set_maximum_score(.2)
88 initiate_configuration(domino_smp, ps)
94 cs = domino_smp.create_sample()
98 print "Found ", cs.get_number_of_configurations(),
"solutions"
99 for i
in range(cs.get_number_of_configurations()):
100 cs.load_configuration(i)
102 print "solution number:", i,
" scored:", m.evaluate(
False)