00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef IMPCORE_MCCG_SAMPLER_H
00010 #define IMPCORE_MCCG_SAMPLER_H
00011
00012 #include "core_config.h"
00013
00014 #include <IMP/Sampler.h>
00015 #include <IMP/macros.h>
00016 #include <IMP/algebra/BoundingBoxD.h>
00017 #include "internal/CoreListSingletonContainer.h"
00018
00019 IMPCORE_BEGIN_NAMESPACE
00020
00021 class MonteCarlo;
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 class IMPCOREEXPORT MCCGSampler : public Sampler
00037 {
00038 struct Parameters {
00039 unsigned int cg_steps_;
00040 int mc_steps_;
00041 typedef std::map<FloatKey, double> BallSizes;
00042 BallSizes ball_sizes_;
00043 typedef std::map<FloatKey, std::pair<Float, Float> > Bounds;
00044 Bounds bounds_;
00045 unsigned int attempts_;
00046 FloatKeys opt_keys_;
00047 Parameters();
00048 };
00049 Parameters default_parameters_;
00050
00051 Parameters fill_in_parameters() const;
00052 void randomize(const Parameters &pms,
00053 internal::CoreListSingletonContainer *sc) const;
00054 internal::CoreListSingletonContainer* set_up_movers(const Parameters &pms,
00055 MonteCarlo *mc) const;
00056 public:
00057 MCCGSampler(Model *m);
00058
00059
00060 void set_bounding_box(const algebra::BoundingBoxD<3> &bb);
00061
00062
00063 void set_number_of_attempts(unsigned int att);
00064
00065
00066 void set_number_of_monte_carlo_steps(unsigned int cg);
00067
00068
00069 void set_max_monte_carlo_step_size(double d);
00070
00071
00072
00073
00074
00075 void set_max_monte_carlo_step_size(FloatKey k, double d);
00076
00077
00078 void set_number_of_conjugate_gradient_steps(unsigned int cg);
00079
00080 IMP_SAMPLER(MCCGSampler);
00081 };
00082
00083 IMPCORE_END_NAMESPACE
00084
00085 #endif