|
faunus
|
Class storing a list of MC moves with their probability weights and randomly selecting one. More...
#include <move.h>
Public Member Functions | |
| MoveCollection (const json &list_of_moves, Space &spc, Energy::Hamiltonian &hamiltonian, Space &old_spc) | |
| void | addMove (std::shared_ptr< Move > &&move) |
| Register new move with correct weight. | |
| const BasePointerVector< Move > & | getMoves () const |
| Get list of moves. | |
| auto | repeatedStochasticMoves () |
| Generates a range of repeated, randomized move pointers guaranteed to be valid. More... | |
| auto | constantIntervalMoves (const unsigned int sweep_number=1) |
Range of moves excluded from the sample() algorithm above due to ZERO weight. More... | |
Friends | |
| void | to_json (json &j, const MoveCollection &propagator) |
| Generate json output. | |
Class storing a list of MC moves with their probability weights and randomly selecting one.
|
inline |
Range of moves excluded from the sample() algorithm above due to ZERO weight.
Moves added with zero weight are excluded from the sample() function but can be accessed through this function. This is used to run these moves at a fixed frequency Monte Carlo sweep frequency. Used by e.g. parallel tempering that in the current implementation must be run at fixed intervals due to MPI concurrency.
| sweep_number | Current sweep count to decide if move should be included based on sweep_interval |
|
inline |
Generates a range of repeated, randomized move pointers guaranteed to be valid.
All moves with repeat=0 are excluded. Effectively each registered move is called with a probability proportional to it's repeat value. The random picking of moves is repeated $ repeat_i$ times so that running over the range constitutes a complete MC "sweep".
1.8.13