IMP  2.0.1
The Integrative Modeling Platform
IMP::statistics::ConfigurationSetXYZEmbedding Class Reference

Embed a configuration using the XYZ coordinates of a set of particles. More...

#include <IMP/statistics/embeddings.h>

+ Inheritance diagram for IMP::statistics::ConfigurationSetXYZEmbedding:

Public Member Functions

 ConfigurationSetXYZEmbedding (ConfigurationSet *cs, SingletonContainerAdaptor pi, bool align=false)
 
virtual void do_show (std::ostream &out) const
 
unsigned int get_number_of_items () const
 
algebra::VectorKD get_point (unsigned int i) const
 
algebra::VectorKDs get_points () const
 

Additional Inherited Members

- Protected Member Functions inherited from IMP::statistics::Embedding
 Embedding (std::string name)
 

Detailed Description

The point for each configuration of the model is a concatenation of the Cartesian coordinates of the particles contained in the passed SingletonContainer.

See ConfigurationSet for more information about the input.

1 ## \example kernel/basic_optimization.py
2 ## This illustrates a basic main loop for optimization and searching for the best
3 ## scoring conformation.
4 ##
5 
6 import IMP.example
7 import IMP.statistics
8 
9 (m,c)=IMP.example.create_model_and_particles()
12 m.add_restraint(r)
13 # we don't want to see lots of log messages about restraint evaluation
14 m.set_log_level(IMP.WARNING)
15 
16 # the container (c) stores a list of particles, which are alse XYZR particles
17 # we can construct a list of all the decorated particles
18 xyzrs= c.get_particles()
19 
21 s.set_number_of_attempts(10)
22 # but we do want something to watch
23 s.set_log_level(IMP.base.TERSE)
24 s.set_number_of_monte_carlo_steps(10)
25 # find some configurations which move the particles far apart
26 configs= s.get_sample();
27 for i in range(0, configs.get_number_of_configurations()):
28  configs.load_configuration(i)
29  # print out the sphere containing the point set
30  # - Why? - Why not?
31  sphere= IMP.core.get_enclosing_sphere(xyzrs)
32  print sphere
33 
34 # cluster the solutions based on their coordinates
36 
37 # of course, this doesn't return anything of interest since the points are
38 # randomly distributed, but, again, why not?
39 clustering = IMP.statistics.create_lloyds_kmeans(e, 3, 1000)
40 for i in range(0,clustering.get_number_of_clusters()):
41  # load the configuration for a central point
42  configs.load_configuration(clustering.get_cluster_representative(i))
43  sphere= IMP.core.get_enclosing_sphere(xyzrs)
44  print sphere

Definition at line 30 of file embeddings.h.

Constructor & Destructor Documentation

IMP::statistics::ConfigurationSetXYZEmbedding::ConfigurationSetXYZEmbedding ( ConfigurationSet cs,
SingletonContainerAdaptor  pi,
bool  align = false 
)

If align is true, all the configurations are rigidly aligned with the first before generating their coordinates.


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