IMP logo
Public Member Functions | Static Public Member Functions
IMP::ConfigurationSet Class Reference

Detailed Description

A class to store a set of configurations of a model.

The class maintains a set of structures found by a Sampler protocol and allows them to be queried and loaded and saved.

(m,c)=IMP.example.create_model_and_particles()
m.add_restraint(r)
# we don't want to see lots of log messages about restraint evaluation
m.set_log_level(IMP.WARNING)
# the container (c) stores a list of particles, which are alse XYZR particles
# we can construct a list of all the decorated particles
xyzrs= c.get_particles()
s.set_number_of_attempts(10)
# but we do want something to watch
s.set_log_level(IMP.TERSE)
s.set_number_of_monte_carlo_steps(10)
# find some configurations which move the particles far apart
configs= s.get_sample();
for i in range(0, configs.get_number_of_configurations()):
configs.load_configuration(i)
# print out the sphere containing the point set
# - Why? - Why not?
print sphere
# cluster the solutions based on their coordinates
# of course, this doesn't return anything of interest since the points are
# randomly distributed, but, again, why not?
clustering = IMP.statistics.create_lloyds_kmeans(e, 3, 1000)
for i in range(0,clustering.get_number_of_clusters()):
# load the configuration for a central point
configs.load_configuration(clustering.get_cluster_representative(i))
print sphere

generate density map of fixed dimension, pdb2density, local fitting, analyze convergence, fit restraint

Examples: six particles optimization, nup84 cg, sample 0, nup84 rb, analyze 0

+ Inheritance diagram for IMP::ConfigurationSet:

List of all members.

Public Member Functions

 ConfigurationSet (Model *m, std::string name="ConfigurationSet %1%")
Modelget_model () const
unsigned int get_number_of_configurations () const
void load_configuration (int i) const
 Load the ith configuration into the Model.
void remove_configuration (unsigned int i)
void save_configuration ()
 Save the current configuration of the Model.
- Public Member Functions inherited from IMP::base::Object
std::size_t __hash__ () const
virtual std::string get_type_name () const =0
 Return a string identifying the type of the object.
virtual IMP::base::VersionInfo get_version_info () const =0
 Get information about the module and version of the object.
void set_check_level (CheckLevel l)
void set_log_level (LogLevel l)
 Set the logging level used in this object.
void set_was_used (bool tf) const
void show (std::ostream &out=std::cout) const
const std::string & get_name () const
void set_name (std::string name)

Static Public Member Functions

static ConfigurationSetget_from (IMP::base::Object *o)

Additional Inherited Members

- Protected Member Functions inherited from IMP::base::Object
 Object (std::string name)

Member Function Documentation

void IMP::ConfigurationSet::load_configuration ( int  i) const

Load the ith configuration into the Model.

Passing -1 returns it to the base configuration.

void IMP::ConfigurationSet::save_configuration ( )

Save the current configuration of the Model.


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

Generated on Tue May 22 2012 23:33:23 for IMP by doxygen 1.8.1