IMP logo

IMP::display::LogOptimizerState Class Reference


Detailed Description

Write geometry to a container periodically.

The State writes a series of files generated from a printf-style format string. The added geometry objects are stored by reference internally.

import IMP
import IMP.display
import IMP.core

m= IMP.Model()
c= IMP.container.ListSingletonContainer(IMP.core.create_xyzr_particles(m, 20, 5))

log= IMP.display.LogOptimizerState(IMP.display.PymolWriter(), "log_file.%04d.pym")
g= IMP.display.XYZRsGeometry(c, IMP.core.XYZR.get_default_radius_key())
g.set_name("my particles")
g.set_color(IMP.display.Color(1,0,0))
log.add_geometry(g)
log.write("initial.pym")

r= IMP.core.ExcludedVolumeRestraint(c)
m.add_restraint(r)

o= IMP.core.MonteCarlo(m)
mv= IMP.core.BallMover(c, 10)
o.add_mover(mv)
o.add_optimizer_state(log)

o.optimize(1000)
Inheritance diagram for IMP::display::LogOptimizerState:

Inheritance graph
[legend]

Public Member Functions

void add_geometry (const Geometries &g)
void add_geometry (Geometry *g)
void do_update (unsigned int call_number)
virtual std::string get_type_name () const
virtual ::IMP::VersionInfo get_version_info () const
 LogOptimizerState (Writer *writer, std::string name_template)
 Write files using name_template as a template (must have a d in it).
void set_skip_steps (unsigned int k)
virtual void update ()
void write (TextOutput file_name) const
 Force writing the a file with the given name.

Friends

template<class T >
void IMP::internal::unref (T *)

The documentation for this class was generated from the following files:

Generated on Mon Mar 8 23:08:59 2010 for IMP by doxygen 1.5.8