This example shows using two rigid bodies and doing excluded volume with them.
18 def create_representation():
35 all.extend(IMP.atom.get_by_type(h, IMP.atom.ATOM_TYPE))
38 evr.set_maximum_score(.01)
43 def create_discrete_states(m, helices):
51 for dx
in range(0, 15):
57 pst.set_particle_states(
64 def create_sampler(m, rs, pst):
76 s.set_assignments_table(states)
77 s.set_subset_filter_tables(filters)
81 def display(m, helices, name):
84 for i, h
in enumerate(helices):
90 print(
"creating representation")
91 (m, helices) = create_representation()
93 print(
"creating score function")
96 print(
"creating discrete states")
97 pst = create_discrete_states(m, helices)
99 print(
"creating sampler")
100 s = create_sampler(m, rs, pst)
101 m.set_log_level(IMP.SILENT)
104 cs = s.create_sample()
106 print(
"found ", cs.get_number_of_configurations(),
"solutions")
109 for i
in range(cs.get_number_of_configurations()):
110 cs.load_configuration(i)
111 ss = sf.evaluate(
False)
113 print(
"** solution number:", i,
" is:", ss)
114 display(m, helices,
"sol_" + str(i) +
".pym")