mcpele  1.0.0
The Monte Carlo Python Energy Landscape Explorer
mcpele/particle_pair_swap.h
00001 #ifndef _MCPELE_PARTICLE_PAIR_SWAP_H__
00002 #define _MCPELE_PARTICLE_PAIR_SWAP_H__
00003 
00004 #include <random>
00005 
00006 #include "mc.h"
00007 
00008 namespace mcpele {
00009 
00010 class ParticlePairSwap : public TakeStep {
00011 private:
00012     size_t m_seed;
00013     std::mt19937_64 m_generator;
00014     std::uniform_int_distribution<size_t> m_distribution;
00015     const size_t m_nr_particles;
00016 public:
00017     virtual ~ParticlePairSwap() {}
00018     ParticlePairSwap(const size_t seed, const size_t nr_particles);
00019     void displace(pele::Array<double>& coords, MC* mc);
00020     void swap_coordinates(const size_t particle_a, const size_t particle_b, pele::Array<double>& coords);
00021     size_t get_seed() const { return m_seed; }
00022     void set_generator_seed(const size_t inp);
00023 };
00024 
00025 } // namespace mcpele
00026 
00027 #endif // #ifndef _MCPELE_PARTICLE_PAIR_SWAP_H__
 All Classes Namespaces Functions Variables Typedefs