This example shows how to set up an optimization involving several particles constrained to be connected in a loop. It uses non bonded lists and a variety of restraints.
25 m.set_log_level(IMP.base.SILENT)
41 chainr.set_name(
"The chain restraint")
42 restraints.append(chainr)
47 nbl.add_pair_filter(bpc)
55 tie.set_name(
"tie ends")
56 restraints.append(tie)
61 r.set_maximum_score(.1)
62 s.set_scoring_function(restraints)
63 s.set_number_of_attempts(10)
65 confs = s.create_sample()
66 print "Found", confs.get_number_of_configurations(),
"configurations"
67 fh = RMF.create_rmf_file(
"solutions.rmfz")
69 for i
in range(0, confs.get_number_of_configurations()):
70 confs.load_configuration(i)