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):
 
   91 print(
"creating representation")
 
   92 (m, helices) = create_representation()
 
   94 print(
"creating score function")
 
   97 print(
"creating discrete states")
 
   98 pst = create_discrete_states(m, helices)
 
  100 print(
"creating sampler")
 
  101 s = create_sampler(m, rs, pst)
 
  102 m.set_log_level(IMP.SILENT)
 
  105 cs = s.create_sample()
 
  107 print(
"found ", cs.get_number_of_configurations(), 
"solutions")
 
  110 for i 
in range(cs.get_number_of_configurations()):
 
  111     cs.load_configuration(i)
 
  112     ss = sf.evaluate(
False)
 
  114     print(
"** solution number:", i, 
" is:", ss)
 
  115     display(m, helices, 
"sol_" + str(i) + 
".pym")