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))
InteractionGraph get_interaction_graph(ScoringFunctionAdaptor rs, const kernel::ParticlesTemp &pst)
SubsetGraph get_junction_tree(const InteractionGraph &ig)
Sample best solutions using Domino.
static XYZ setup_particle(kernel::Model *m, ParticleIndex pi)
Subsets get_subsets(const SubsetGraph &g)
Gets all of the Subsets of a SubsetGraph.
Distance restraint between two particles.
Class to handle individual model particles.
Basic functionality that is expected to be used by a wide variety of IMP users.
Divide-and-conquer inferential optimization in discrete space.
Class for storing model, its restraints, constraints, and particles.
Harmonic function (symmetric about the mean)