15 def create_scoring(m, ps):
16 pairs = [[0, 1], [0, 2], [1, 3], [2, 3], [3, 4], [4, 5], [1, 5]]
24 pr.set_maximum_score(.01)
31 dr.set_maximum_score(.01)
32 print(m.get_root_restraint_set())
36 def create_representation(m):
46 def create_discrete_states(ps):
53 vs = vs + [-v
for v
in vs]
54 print(len(vs),
"states for each particle")
59 pst.set_particle_states(p, states)
63 def create_sampler(m, r, pst):
80 states.set_log_level(IMP.base.SILENT)
81 s.set_assignments_table(states)
82 s.set_subset_filter_tables(filters)
89 m.set_log_level(IMP.base.SILENT)
91 print(
"creating representation")
92 ps = create_representation(m)
93 print(
"creating discrete states")
94 pst = create_discrete_states(ps)
95 print(
"creating score function")
96 rs = create_scoring(m, ps)
97 print(
"creating sampler")
98 s = create_sampler(m, rs, pst)
105 cs = s.create_sample()
107 print(
"found ", cs.get_number_of_configurations(),
"solutions")
108 for i
in range(cs.get_number_of_configurations()):
109 cs.load_configuration(i)
110 print(
"solution number:", i,
" is:", m.evaluate(
False))
Various classes to hold sets of particles.
Upper bound harmonic function (non-zero when feature > mean)
void set_log_level(LogLevel l)
Set the current global log level.
Sample best solutions using Domino.
static XYZ setup_particle(kernel::Model *m, ParticleIndex pi)
Filter a configuration of the subset using the kernel::Model thresholds.
Do not allow two particles to be in the same state.
Store a kernel::ParticleIndexPairs.
Apply a function to the distance to a fixed point.
A decorator for a particle with x,y,z coordinates.
Class to handle individual model particles.
Basic functionality that is expected to be used by a wide variety of IMP users.
Applies a SingletonScore to a Singleton.
Applies a PairScore to each Pair in a list.
Divide-and-conquer inferential optimization in discrete space.
Class for storing model, its restraints, constraints, and particles.