We are interested in applying domino to problems systematically in a multiscale manner. This script experiments with those approaches.
19 m.set_log_level(IMP.base.SILENT)
22 for i, d
in enumerate(ds):
38 for pr
in [(0, 1), (1, 2), (0, 2)]:
40 (ds[pr[0]], ds[pr[1]]),
55 def setup(cover, scale):
59 pst.set_particle_states(p, st)
61 r.set_maximum_score(.5 * scale ** 2)
68 sampler.set_subset_filter_tables(fs)
69 sampler.set_log_level(IMP.base.SILENT)
70 return (sampler, lf, pst)
72 (sampler, lf, pst) = setup(covers[0], 4.0)
75 ac = sampler.get_sample_assignments(subset)
80 def get_mapping(cover0, cover1):
81 nn = IMP.algebra.NearestNeighbor3D(cover0)
82 ret = [[]
for c
in cover0]
83 for i, p
in enumerate(cover1):
84 nns = nn.get_nearest_neighbor(p)
91 def display_mapping(index, cover0, cover1, mapping):
93 for i, c
in enumerate(mapping):
99 for i, c
in enumerate(cover0):
106 for curi
in range(1, len(covers)):
107 scale = 4.0 / 2 ** curi
109 mapping = get_mapping(covers[curi - 1], covers[curi])
111 display_mapping(curi - 1, covers[curi - 1], covers[curi], mapping)
112 (sampler, lf, pst) = setup(covers[curi], scale)
116 for i, p
in enumerate(subset):
119 lf.set_allowed_states(p, allowed)
120 ccac = sampler.get_sample_assignments(subset)
124 print "for scale", scale,
"got", ac
126 for i, a
in enumerate(ac):
132 for c
in covers[curi]: