Use the IMP::misc::DecayPairContainerOptimizerState to gradually break the bonds in a bd simulation.
5 from __future__
import print_function
18 "Use the IMP::misc::DecayPairContainerOptimizerState to gradually "
19 "break the bonds in a bd simulation")
39 for i
in range(0, np):
40 p = m.add_particle(
"p")
45 d.set_coordinates_are_optimized(
True)
53 for i
in range(0, nb):
54 pp = random.sample(ps, 2)
55 if pp
not in bds
and [pp[1], pp[0]]
not in bds:
60 dos.set_period(period)
61 dos.set_log_level(IMP.SILENT)
71 dos.get_output_container(),
78 bd.set_maximum_time_step(1000)
79 bd.set_scoring_function(rs + [ev])
80 bd.add_optimizer_state(dos)
84 rmf = RMF.create_rmf_file(fn)
85 print(
"setting up file")
91 os.set_period(max(steps / 100, 1))
92 bd.add_optimizer_state(os)