IMP logo
IMP Reference Guide  2.10.0
The Integrative Modeling Platform
IMP::core::MCCGSampler Class Reference

A simple sampler. More...

#include <IMP/core/MCCGSampler.h>

+ Inheritance diagram for IMP::core::MCCGSampler:

Detailed Description

A simple sampler.

This sampler randomizes the conformation and then uses Monte Carlo and conjugate gradient steps to search for good solutions. Each Monte Carlo move is followed by the specified number of conjugate gradient steps before it is decided whether to accept or reject the move. When the sampler encounters a solution that passes all of the restraint score cutoffs, it will accept the solution and move on to generating another one.

At the moment it only supports optimization of Cartesian coordinates, but this will be fixed when people ask for it (and they already have :-). We are also open to supporting a wider variety of optimization protocols (eg only do conjugate gradient steps occasionally).

Definition at line 40 of file MCCGSampler.h.

Public Member Functions

 MCCGSampler (Model *m, std::string name="MCCG Sampler %1%")
 
ConfigurationSetget_rejected_configurations () const
 
void set_bounding_box (const algebra::BoundingBoxD< 3 > &bb)
 Set the bounding box for randomizing the Cartesian coordinates. More...
 
void set_is_refining (bool tf)
 
void set_local_optimizer (Optimizer *opt)
 Set a local optimizer to use instead of ConjugateGradients. More...
 
void set_max_monte_carlo_step_size (double d)
 Set the maximum size of the MC step for all attributes. More...
 
void set_max_monte_carlo_step_size (FloatKey k, double d)
 Set the maximum size of the MC step for an attribute. More...
 
void set_save_rejected_configurations (bool tf)
 Whether or not to save rejected conformations. More...
 
- Public Member Functions inherited from IMP::Sampler
 Sampler (Model *m, std::string name="Sampler %1%")
 
ConfigurationSetcreate_sample () const
 
Modelget_model () const
 
ScoringFunctionget_scoring_function () const
 Return the scoring function that is being used. More...
 
void set_scoring_function (ScoringFunctionAdaptor sf)
 
- Public Member Functions inherited from IMP::Object
virtual void clear_caches ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
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)
 

Number of steps

A sampling run proceeds as 3 nested loops

  1. number of attempts
  2. number of Monte Carlo steps
  3. number of CG steps
void set_number_of_attempts (unsigned int att)
 Set the maximum number of attempts to find a solution. More...
 
void set_number_of_monte_carlo_steps (unsigned int cg)
 Set the number of MC steps to take in each optimization run. More...
 
void set_number_of_conjugate_gradient_steps (unsigned int cg)
 Set the number of CG steps to take after each MC step. More...
 

Optimizer states

The optimizer states will be added to the MonteCarlo optimizer used.

void remove_optimizer_state (OptimizerState *d)
 
void remove_optimizer_states (const OptimizerStates &d)
 
void set_optimizer_states (const OptimizerStates &ps)
 
void set_optimizer_states_order (const OptimizerStates &objs)
 
unsigned int add_optimizer_state (OptimizerState *obj)
 
void add_optimizer_states (const OptimizerStates &objs)
 
void clear_optimizer_states ()
 
unsigned int get_number_of_optimizer_states () const
 
bool get_has_optimizer_states ()
 
OptimizerStateget_optimizer_state (unsigned int i) const
 
OptimizerStates get_optimizer_states () const
 
void reserve_optimizer_states (unsigned int sz)
 
virtual ConfigurationSetdo_sample () const
 
virtual std::string get_type_name () const
 
virtual ::IMP::VersionInfo get_version_info () const
 Get information about the module and version of the object. More...
 
virtual ~MCCGSampler ()
 

Additional Inherited Members

- Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
virtual void do_destroy ()
 

Member Function Documentation

virtual ::IMP::VersionInfo IMP::core::MCCGSampler::get_version_info ( ) const
virtual

Get information about the module and version of the object.

Reimplemented from IMP::Object.

Definition at line 120 of file MCCGSampler.h.

void IMP::core::MCCGSampler::set_bounding_box ( const algebra::BoundingBoxD< 3 > &  bb)

Set the bounding box for randomizing the Cartesian coordinates.

void IMP::core::MCCGSampler::set_is_refining ( bool  tf)

if set to true, then do not randomize the configuration before sampling.

void IMP::core::MCCGSampler::set_local_optimizer ( Optimizer opt)

Set a local optimizer to use instead of ConjugateGradients.

void IMP::core::MCCGSampler::set_max_monte_carlo_step_size ( double  d)

Set the maximum size of the MC step for all attributes.

void IMP::core::MCCGSampler::set_max_monte_carlo_step_size ( FloatKey  k,
double  d 
)

Set the maximum size of the MC step for an attribute.

As was mentioned, at the moment k can be one of x,y or z.

void IMP::core::MCCGSampler::set_number_of_attempts ( unsigned int  att)

Set the maximum number of attempts to find a solution.

void IMP::core::MCCGSampler::set_number_of_conjugate_gradient_steps ( unsigned int  cg)

Set the number of CG steps to take after each MC step.

void IMP::core::MCCGSampler::set_number_of_monte_carlo_steps ( unsigned int  cg)

Set the number of MC steps to take in each optimization run.

void IMP::core::MCCGSampler::set_save_rejected_configurations ( bool  tf)

Whether or not to save rejected conformations.

Saving these can be useful if the sampling is not finding any good conformations.


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