18 m.set_log_level(IMP.base.SILENT)
20 for i,d
in enumerate(ds):
36 for pr
in [(0,1), (1,2), (0,2)]:
38 (ds[pr[0]], ds[pr[1]]),
54 def setup(cover, scale):
58 pst.set_particle_states(p, st)
60 r.set_maximum_score(.5*scale**2)
63 rc.add_restraints(rs);
67 sampler.set_subset_filter_tables(fs)
68 sampler.set_log_level(IMP.base.SILENT)
69 return (sampler, lf, pst)
71 (sampler,lf, pst)=
setup(covers[0], 4.0)
74 ac= sampler.get_sample_assignments(subset)
78 def get_mapping(cover0, cover1):
79 nn= IMP.algebra.NearestNeighbor3D(cover0)
80 ret=[[]
for c
in cover0]
81 for i,p
in enumerate(cover1):
82 nns=nn.get_nearest_neighbor(p)
87 def display_mapping(index, cover0, cover1, mapping):
89 for i,c
in enumerate(mapping):
95 for i,c
in enumerate(cover0):
105 for curi
in range(1,len(covers)):
108 mapping=get_mapping(covers[curi-1], covers[curi])
110 display_mapping(curi-1, covers[curi-1], covers[curi], mapping)
111 (sampler, lf, pst)=
setup(covers[curi], scale)
115 for i,p
in enumerate(subset):
118 lf.set_allowed_states(p, allowed)
119 ccac=sampler.get_sample_assignments(subset)
123 print "for scale", scale,
"got", ac
125 for i,a
in enumerate(ac):
131 for c
in covers[curi]: