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