13 def optimize_subsets(subsets):
15 for subset
in subsets:
24 mdl = ps[0].get_model()
26 mdl.get_root_restraint_set(), ps)
31 def setup_scoring_function(ps):
33 pairs = [[0, 1], [0, 2], [1, 2], [2, 3], [3, 4], [4, 5], [3, 5]]
44 def initiate_configuration(domino_smp, ps):
54 domino_smp.set_particle_states(p, states)
61 mdl.set_log_level(IMP.SILENT)
70 rs = setup_scoring_function(ps)
76 pst = optimize_subsets(subsets)
90 domino_smp.set_restraints([rs])
91 domino_smp.set_maximum_score(.2)
94 initiate_configuration(domino_smp, ps)
100 cs = domino_smp.create_sample()
104 print(
"Found ", cs.get_number_of_configurations(),
"solutions")
105 for i
in range(cs.get_number_of_configurations()):
106 cs.load_configuration(i)
108 print(
"solution number:", i,
" scored:", rs.evaluate(
False))