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.
22 m.set_log_level(IMP.SILENT)
38 chainr.set_name(
"The chain restraint")
39 restraints.append(chainr)
44 nbl.add_pair_filter(bpc)
51 (ps[0].get_particle_index(),
52 ps[-1].get_particle_index()))
53 tie.set_name(
"tie ends")
54 restraints.append(tie)
59 r.set_maximum_score(.1)
60 s.set_scoring_function(restraints)
61 s.set_number_of_attempts(10)
63 confs = s.create_sample()
64 print(
"Found", confs.get_number_of_configurations(),
"configurations")
65 fh = RMF.create_rmf_file(
"solutions.rmfz")
67 for i
in range(0, confs.get_number_of_configurations()):
68 confs.load_configuration(i)