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.
6 from __future__
import print_function
26 m.set_log_level(IMP.base.SILENT)
42 chainr.set_name(
"The chain restraint")
43 restraints.append(chainr)
48 nbl.add_pair_filter(bpc)
56 tie.set_name(
"tie ends")
57 restraints.append(tie)
62 r.set_maximum_score(.1)
63 s.set_scoring_function(restraints)
64 s.set_number_of_attempts(10)
66 confs = s.create_sample()
67 print(
"Found", confs.get_number_of_configurations(),
"configurations")
68 fh = RMF.create_rmf_file(
"solutions.rmfz")
70 for i
in range(0, confs.get_number_of_configurations()):
71 confs.load_configuration(i)