This example shows writing a brownian dynamics simulation to a rmf file. It includes a bounding box, restraints and a hierarchy of particles.
5 from __future__
import print_function, division
24 for i
in range(0, np)]
28 p.set_coordinates_are_optimized(
True)
35 for i
in range(0, len(ps) // 2):
36 pp = (ps[2 * i], ps[2 * i + 1])
61 bd.set_log_level(IMP.SILENT)
62 bd.set_scoring_function(sf)
64 bd.set_maximum_time_step(10)
66 rmf = RMF.create_rmf_file(
"brownian.rmf")
67 rmf.set_description(
"Brownian dynamics trajectory with 10fs timestep.\n")
73 os.update_always(
"initial conformation")
74 os.set_log_level(IMP.SILENT)
76 bd.add_optimizer_state(os)
80 print(
"file is", rmf.get_name())