12 def optimize_subsets(subsets):
14 for subset
in subsets:
23 mdl = ps[0].get_model()
25 mdl.get_root_restraint_set(), ps)
30 def setup_scoring_function(ps):
32 pairs = [[0, 1], [0, 2], [1, 2], [2, 3], [3, 4], [4, 5], [3, 5]]
43 def initiate_configuration(domino_smp, ps):
53 domino_smp.set_particle_states(p, states)
59 mdl.set_log_level(IMP.SILENT)
68 rs = setup_scoring_function(ps)
74 pst = optimize_subsets(subsets)
88 domino_smp.set_restraints([rs])
89 domino_smp.set_maximum_score(.2)
92 initiate_configuration(domino_smp, ps)
98 cs = domino_smp.create_sample()
102 print(
"Found ", cs.get_number_of_configurations(),
"solutions")
103 for i
in range(cs.get_number_of_configurations()):
104 cs.load_configuration(i)
106 print(
"solution number:", i,
" scored:", rs.evaluate(
False))