IMP logo
IMP Reference Guide  2.7.0
The Integrative Modeling Platform
display_log.py
1 ## \example display/display_log.py
2 # A simple example of how to use one of the IMP.display.LogOptimizerStates.
3 
4 import IMP.display
5 import IMP.core
6 import IMP.container
7 import sys
8 
9 IMP.setup_from_argv(sys.argv,
10  "Example of how to use one of the IMP.display.LogOptimizerStates")
11 
12 m = IMP.Model()
13 ps = IMP.core.create_xyzr_particles(m, 20, 5)
15 
16 # Write outputs into a single file.
18  m, IMP.display.PymolWriter("log_file.pym"))
19 # the logging occurs ever two frames
20 log.set_period(2)
22 g.set_name("my particles")
23 g.set_color(IMP.display.Color(1, 0, 0))
24 log.add_geometry(g)
25 
27 r.set_log_level(IMP.VERBOSE)
28 
30 o.set_scoring_function([r])
31 mv = IMP.core.BallMover(m, ps, 10)
32 o.add_mover(mv)
33 o.add_optimizer_state(log)
34 
35 o.optimize(1000)
A Monte Carlo optimizer.
Definition: MonteCarlo.h:45
Represent an RGB color.
Definition: Color.h:24
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Various classes to hold sets of particles.
XYZRs create_xyzr_particles(Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
Display an IMP::SingletonContainer of IMP::core::XYZR particles as balls.
Definition: XYZR.h:151
Move continuous particle variables by perturbing them within a ball.
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Store a list of ParticleIndexes.
Basic functionality that is expected to be used by a wide variety of IMP users.
Prevent a set of particles and rigid bodies from inter-penetrating.
Write a CGO file with the geometry.
Definition: PymolWriter.h:34
Output IMP model data in various file formats.