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))
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 particles of a Model object.
Divide-and-conquer inferential optimization in discrete space.
Harmonic function (symmetric about the mean)