IMP logo
Public Member Functions
IMP::core::MCCGSampler Class Reference

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 tjhe 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 support 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).

Examples: chain, basic optimization, nup84 cg, sample 0, nup84 rb

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

List of all members.

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.
void set_is_refining (bool tf)
void set_local_optimizer (Optimizer *opt)
 Set a local optimizer to use instead of ConjugateGradients.
void set_max_monte_carlo_step_size (double d)
 Set the maximum size of the MC step for all attributes.
void set_max_monte_carlo_step_size (FloatKey k, double d)
 Set the maximum size of the MC step for an attribute.
void set_save_rejected_configurations (bool tf)
 Whether or not to save rejected conformations.

Number of steps

A sampling run proceeds as 3 nested loops

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

Optimizer states

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

void remove_optimizer_state (OptimizerState *d)
template<class F >
void remove_optimizer_states_if (const F &f)
template<class List >
void remove_optimizer_states (List d)
template<class List >
void set_optimizer_states (List ps)
template<class List >
void set_optimizer_states_order (List ps)
unsigned int add_optimizer_state (OptimizerState *obj)
template<class List >
void add_optimizer_states (List objs)
void clear_optimizer_states ()
unsigned int get_number_of_optimizer_states () const
bool get_has_optimizer_states () const
OptimizerStateget_optimizer_state (unsigned int i) const
OptimizerStates get_optimizer_states () const
void reserve_optimizer_states (unsigned int sz)
OptimizerStateIterator optimizer_states_begin ()
OptimizerStateIterator optimizer_states_end ()
OptimizerStateConstIterator optimizer_states_begin () const
OptimizerStateConstIterator optimizer_states_end () const
static MCCGSamplerget_from (IMP::base::Object *o)

Member Function Documentation

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:

Generated on Fri Feb 10 2012 23:36:26 for IMP by doxygen 1.7.5.1