This example shows using two rigid bodies and doing excluded volume with them.
15 def create_representation():
36 evr.set_maximum_score(.01)
41 def create_discrete_states(m, helices):
49 for dx
in range(0, 15):
55 pst.set_particle_states(
62 def create_sampler(m, rs, pst):
73 s.set_assignments_table(states)
74 s.set_subset_filter_tables(filters)
78 def display(m, helices, name):
81 for i, h
in enumerate(helices):
87 print "creating representation"
88 (m, helices) = create_representation()
90 print "creating score function"
93 print "creating discrete states"
94 pst = create_discrete_states(m, helices)
96 print "creating sampler"
97 s = create_sampler(m, rs, pst)
98 m.set_log_level(IMP.base.SILENT)
103 print "found ", cs.get_number_of_configurations(),
"solutions"
105 for i
in range(cs.get_number_of_configurations()):
106 cs.load_configuration(i)
107 ss = m.evaluate(
False)
109 print "** solution number:", i,
" is:", ss
110 display(m, helices,
"sol_" + str(i) +
".pym")