mcpele  1.0.0
The Monte Carlo Python Energy Landscape Explorer
mcpele/take_step_pattern.h
00001 #ifndef _MCPELE_TAKE_STEP_PATTERN_H__
00002 #define _MCPELE_TAKE_STEP_PATTERN_H__
00003 
00004 #include "pattern_manager.h"
00005 
00006 namespace mcpele {
00007 
00026 class TakeStepPattern : public TakeStep {
00027 private:
00028     PatternManager<std::shared_ptr<TakeStep> > m_steps;
00029 public:
00030     virtual ~TakeStepPattern() {}
00031     void add_step(std::shared_ptr<TakeStep> step_input,
00032             const size_t repetitions_input=1) { m_steps.add(step_input, repetitions_input); }
00033     void displace(pele::Array<double>& coords, MC* mc);
00034     void report(pele::Array<double>& old_coords, const double old_energy,
00035             pele::Array<double>& new_coords, const double new_energy,
00036             const bool success, MC* mc) { m_steps.get_step_ptr()->report(
00037                     old_coords, old_energy, new_coords, new_energy, success, mc); }
00038     std::vector<size_t> get_pattern() const { return m_steps.get_pattern(); }
00039     std::vector<size_t> get_pattern_direct() { return m_steps.get_pattern_direct(); }
00040 };
00041 
00042 } // namespace mcpele
00043 
00044 #endif // #ifndef _MCPELE_TAKE_STEP_PATTERN_H__
 All Classes Namespaces Functions Variables Typedefs