mcpele  1.0.0
The Monte Carlo Python Energy Landscape Explorer
 All Classes Namespaces Functions Variables Typedefs
Public Member Functions
mcpele::TakeStepPattern Class Reference

#include <take_step_pattern.h>

Inheritance diagram for mcpele::TakeStepPattern:
mcpele::TakeStep

List of all members.

Public Member Functions

virtual ~TakeStepPattern ()
void add_step (std::shared_ptr< TakeStep > step_input, const size_t repetitions_input=1)
void displace (pele::Array< double > &coords, MC *mc)
void report (pele::Array< double > &old_coords, const double old_energy, pele::Array< double > &new_coords, const double new_energy, const bool success, MC *mc)
std::vector< size_t > get_pattern () const
std::vector< size_t > get_pattern_direct ()

Detailed Description

Create a pattern of TakeSteps to be exectuted by MC.

Example -------

To have MC looping over a pattern consisting of 99 times step_A and 1 time step_B, do e.g.: auto pot = std::make_shared<SomePotential>(SomeParameters); auto mc = std::make_shared<mcpele::MC>(pot, SomeCoordinates, SomeTemperature); auto step_pattern = std::make_shared<mcpele::TakeStepPattern>(); auto step_A = std::make_shared<SomeTakeStep>(SomeParameters); auto step_B = std::make_shared<SomeOtherTakeStep>(SomeOtherParameters); step_pattern->add_step(step_A, 99); step_pattern->add_step(step_B, 1); mc->set_takestep(step_pattern); mc->run(1e6);

Definition at line 26 of file take_step_pattern.h.


Constructor & Destructor Documentation

virtual mcpele::TakeStepPattern::~TakeStepPattern ( ) [inline, virtual]

Definition at line 30 of file take_step_pattern.h.


Member Function Documentation

void mcpele::TakeStepPattern::add_step ( std::shared_ptr< TakeStep step_input,
const size_t  repetitions_input = 1 
) [inline]

Definition at line 31 of file take_step_pattern.h.

void mcpele::TakeStepPattern::displace ( pele::Array< double > &  coords,
MC mc 
) [virtual]

Implements mcpele::TakeStep.

Definition at line 5 of file take_step_pattern.cpp.

std::vector<size_t> mcpele::TakeStepPattern::get_pattern ( ) const [inline]

Definition at line 38 of file take_step_pattern.h.

std::vector<size_t> mcpele::TakeStepPattern::get_pattern_direct ( ) [inline]

Definition at line 39 of file take_step_pattern.h.

void mcpele::TakeStepPattern::report ( pele::Array< double > &  old_coords,
const double  old_energy,
pele::Array< double > &  new_coords,
const double  new_energy,
const bool  success,
MC mc 
) [inline, virtual]

Reimplemented from mcpele::TakeStep.

Definition at line 34 of file take_step_pattern.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs