This example shows using two rigid bodies and doing excluded volume with them.
15 def create_representation():
35 evr.set_maximum_score(.01)
40 def create_discrete_states(m, helices):
48 for dx
in range(0, 15):
54 pst.set_particle_states(
61 def create_sampler(m, rs, pst):
72 s.set_assignments_table(states)
73 s.set_subset_filter_tables(filters)
77 def display(m, helices, name):
80 for i, h
in enumerate(helices):
86 print "creating representation"
87 (m, helices) = create_representation()
89 print "creating score function"
92 print "creating discrete states"
93 pst = create_discrete_states(m, helices)
95 print "creating sampler"
96 s = create_sampler(m, rs, pst)
97 m.set_log_level(IMP.base.SILENT)
100 cs = s.create_sample()
102 print "found ", cs.get_number_of_configurations(),
"solutions"
104 for i
in range(cs.get_number_of_configurations()):
105 cs.load_configuration(i)
106 ss = m.evaluate(
False)
108 print "** solution number:", i,
" is:", ss
109 display(m, helices,
"sol_" + str(i) +
".pym")