Path Integral Quantum Monte Carlo
move.h
Go to the documentation of this file.
1 
9 #include "common.h"
10 
11 #ifndef MOVE_H
12 #define MOVE_H
13 
14 /* #define DEBUG_WORM */
15 /* #define DEBUG_MOVE */
16 
17 class Path;
18 class ActionBase;
19 
20 // ========================================================================
21 // MoveBase Class
22 // ========================================================================
30 class MoveBase {
31 
32  public:
33  MoveBase (Path &, ActionBase *, MTRand &,
34  ensemble _operateOnConfig=ANY, bool _varLength=false);
35  virtual ~MoveBase();
36 
39  string name1;
40 
42  virtual string getName() {return "base";}
43 
45  double getAcceptanceRatio() {
46  return (numAttempted == 0 ? 0.0 : 1.0*numAccepted/(1.0*numAttempted));
47  }
48 
51  return (totAttempted == 0 ? 0.0 : 1.0*totAccepted/(1.0*totAttempted));
52  }
53 
55  double getAcceptanceRatioLevel(int n) {
56  return (numAttemptedLevel(n) == 0 ? 0.0 :
57  1.0*numAcceptedLevel(n)/(1.0*numAttemptedLevel(n)));
58  }
59 
61  int getNumAttempted() { return numAttempted; }
63  int getNumAccepted() { return numAccepted; }
65  int getNumAttemptedLevel(int n) { return numAttemptedLevel(n); }
67  int getNumAcceptedLevel(int n) { return numAcceptedLevel(n); }
68 
70  virtual bool attemptMove() = 0;
71 
76 
77  protected:
78  friend class PathIntegralMonteCarlo; // Friends for I/O
79 
82  MTRand &random;
83 
84  bool success;
85 
88  int numToMove;
89  int numLevels; // The 2^numLevels = num slices moved
90 
93 
94  Array <uint32,1> numAcceptedLevel;
95  Array <uint32,1> numAttemptedLevel;
96 
97  Array <dVec,1> originalPos;
98  Array <dVec,1> newPos;
99 
100  vector <iVec> winding;
101  vector <int> windingSector;
102  vector <double> cumrho0;
103 
104  int maxWind;
105  int numWind;
106 
107  double oldAction;
108  double newAction;
109  double deltaAction;
110 
111  double sqrt2LambdaTau;
112  double sqrtLambdaTau;
113 
117 
119  virtual void keepMove();
121  virtual void undoMove() = 0;
122 
123  /* Returns a new bead position based on the staging algorithm */
124  dVec newStagingPosition(const beadLocator &, const beadLocator &, const int, const int);
125  dVec newStagingPosition(const beadLocator &, const beadLocator &, const int, const int, iVec &);
126 
128  iVec sampleWindingSector(const beadLocator &, const beadLocator &, const int, double &);
129 
131  iVec getWindingNumber(const beadLocator &, const beadLocator &);
132 
133  /* Return a new bead position which samples the free particle density matrix */
135 
136  /* Returns a new bead position based on the bisection algorithm */
137  dVec newBisectionPosition(const beadLocator&, const int);
138 
139  double newK,oldK;
140  double newV,oldV;
141 
142  /* Debugging methods */
143  void printMoveState(string);
144  void checkMove(int,double);
145 };
146 
147 // ========================================================================
148 // Displace Move Class
149 // ========================================================================
153 class DisplaceMove: public MoveBase {
154 
155  public:
156  DisplaceMove(Path &, ActionBase *, MTRand &,
157  ensemble _operateOnConfig=ANY);
158  ~DisplaceMove();
159 
160  bool attemptMove();
161  static const string name;
162  string getName() {return name;}
163 
164  private:
165  beadLocator beadIndex; // The index of the bead being moved
166  void undoMove(); // revert everything back
167 };
168 
169 
170 // ========================================================================
171 // End Staging Move Class
172 // ========================================================================
173 /* A derived class which performs a staiging move on the end of a path.
174  */
175 class EndStagingMove: public MoveBase {
176 
177  public:
178  EndStagingMove(Path &, ActionBase *, MTRand &,
179  ensemble _operateOnConfig=ANY);
180  ~EndStagingMove();
181 
182  bool attemptMove();
183  static const string name;
184  string getName() {return name;}
185 
186  private:
187  bool leftMoving; // True if update moves left to right
188  beadLocator leftBead; // The left most bead being moved
189  beadLocator rightBead; // The left most bead being moved
190  void undoMove(); // revert everything back
191 };
192 
193 
194 // ========================================================================
195 // End Staging Move Class
196 // ========================================================================
197 /* A derived class which performs a staiging move on the end of a path.
198  */
199 class MidStagingMove: public MoveBase {
200 
201  public:
202  MidStagingMove(Path &, ActionBase *, MTRand &,
203  ensemble _operateOnConfig=ANY);
204  ~MidStagingMove();
205 
206  bool attemptMove();
207  static const string name;
208  string getName() {return name;}
209 
210  private:
211  beadLocator leftBead; // The left most bead being moved
212  beadLocator rightBead; // The left most bead being moved
213  beadLocator midBeadL; // Bead on left of break to be updated
214  beadLocator midBeadR; // Bead on right of break to be updated
215  void undoMove(); // revert everything back
216 };
217 
218 
219 // ========================================================================
220 // SwapBreak Move Class
221 // ========================================================================
222 /* A derived class which swaps the location of a broken worldline.
223 */
224 class SwapBreakMove: public MoveBase {
225 
226  public:
227  SwapBreakMove(Path &, ActionBase *, MTRand &,
228  ensemble _operateOnConfig=ANY);
229  ~SwapBreakMove();
230 
231  bool attemptMove();
232  static const string name;
233  string getName() {return name;}
234 
235  private:
236  void undoMove(){};
237 
238 };
239 
240 // ========================================================================
241 // CenterOfMass Move Class
242 // ========================================================================
247 class CenterOfMassMove: public MoveBase {
248 
249  public:
250  CenterOfMassMove(Path &, ActionBase *, MTRand &,
251  ensemble _operateOnConfig=ANY);
253 
254  bool attemptMove();
255  static const string name;
256  string getName() {return name;}
257 
258  private:
259  beadLocator startBead,endBead; // The start and end beads
260  void undoMove(); // revert everything back
261 };
262 
263 
264 // ========================================================================
265 // Staging Move Class
266 // ========================================================================
271 class StagingMove: public MoveBase {
272 
273  public:
274  StagingMove(Path &, ActionBase *, MTRand &,
275  ensemble _operateOnConfig=ANY);
276  ~StagingMove();
277 
278  bool attemptMove();
279  static const string name;
280  string getName() {return name;}
281 
282  private:
283  beadLocator startBead,endBead; // The start and end of the stage
284 
285  void undoMove(); // Undo the move
286 
287  int stageLength; // The length of the stage
288 };
289 
290 // ========================================================================
291 // Bisection Move Class
292 // ========================================================================
296 class BisectionMove: public MoveBase {
297 
298  public:
299  BisectionMove(Path &, ActionBase *, MTRand &,
300  ensemble _operateOnConfig=ANY);
301  ~BisectionMove();
302 
303  bool attemptMove();
304  static const string name;
305  string getName() {return name;}
306 
307  private:
308  Array <bool,1> include; // Which beads have been included?
309 
310  beadLocator startBead,endBead;
311 
312  int numActiveBeads; // The total number of active beads
313  int level; // The current level
314  int shift; // The distance between slices at a given level
315 
316  double oldDeltaAction; // The old and new action differences
317 
318  void keepMove(); // Keep the move
319  void undoMove(); // Undo the move
320 };
321 
322 // ========================================================================
323 // Open Move Class
324 // ========================================================================
329 class OpenMove: public MoveBase {
330 
331  public:
332  OpenMove(Path &, ActionBase *, MTRand &,
333  ensemble _operateOnConfig=DIAGONAL, bool _varLength=true);
334  ~OpenMove();
335 
336  bool attemptMove();
337  static const string name;
338  string getName() {return name;}
339 
340  private:
341  beadLocator headBead, tailBead; // The temporary head and tail locatores
342  int gapLength; // The proposed WL length to remove
343  int numLevels; // The 2^numLevels = num slices moved
344 
345  void undoMove(); // Undo a move
346  void keepMove(); // keep the move
347 
348 };
349 
350 // ========================================================================
351 // Close Move Class
352 // ========================================================================
357 class CloseMove: public MoveBase {
358 
359  public:
360  CloseMove(Path &, ActionBase *, MTRand &,
361  ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true);
362  ~CloseMove();
363 
364  bool attemptMove();
365  static const string name;
366  string getName() {return name;}
367 
368  private:
369  beadLocator headBead,tailBead; // The temporary head and tail slices
370  int numLevels; // The 2^numLevels = num slices moved
371 
372  Array <int,1> oldBeadOn; // The old and new bead states
373 
374  void undoMove(); // Undo a move
375  void keepMove(); // keep the move
376 };
377 
378 // ========================================================================
379 // Insert Move Class
380 // ========================================================================
385 class InsertMove: public MoveBase {
386 
387  public:
388  InsertMove(Path &, ActionBase *, MTRand &,
389  ensemble _operateOnConfig=DIAGONAL, bool _varLength=true);
390  ~InsertMove();
391 
392  bool attemptMove();
393  static const string name;
394  string getName() {return name;}
395 
396  private:
397  beadLocator headBead,tailBead; // The temporary head and tail beads
398 
399  int wormLength; // The proposed WL length to close
400  int numLevels; // The 2^numLevels = num slices moved
401 
402  void undoMove(); // Undo a move
403  void keepMove(); // keep the move
404 };
405 
406 // ========================================================================
407 // Remove Move Class
408 // ========================================================================
413 class RemoveMove: public MoveBase {
414 
415  public:
416  RemoveMove(Path &, ActionBase *, MTRand &,
417  ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true);
418  ~RemoveMove();
419 
420  bool attemptMove();
421  static const string name;
422  string getName() {return name;}
423 
424  private:
425  int numLevels; // The 2^numLevels = num slices moved
426 
427  void undoMove(); // Undo a move
428  void keepMove(); // keep the move
429 };
430 
431 // ========================================================================
432 // Advance Head Move Class
433 // ========================================================================
438 class AdvanceHeadMove: public MoveBase {
439 
440  public:
441  AdvanceHeadMove(Path &, ActionBase *, MTRand &,
442  ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true);
444 
445  bool attemptMove();
446  static const string name;
447  string getName() {return name;}
448 
449  private:
450  beadLocator headBead; // The temporary new head
451 
452  int advanceLength; // The proposed WL length to advance
453  int numLevels; // The 2^numLevels = num slices moved
454 
455  void undoMove(); // Undo a move
456  void keepMove(); // keep the move
457 
458  beadLocator startBead;
459  Array <dVec,1> newPos; // The modified particle positions
460  Array <unsigned int,1> oldBeadOn; // The old and new bead states
461 
462 };
463 
464 // ========================================================================
465 // Advance Tail Move Class
466 // ========================================================================
472 class AdvanceTailMove: public MoveBase {
473 
474  public:
475  AdvanceTailMove(Path &, ActionBase *, MTRand &,
476  ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true);
478 
479  bool attemptMove();
480  static const string name;
481  string getName() {return name;}
482 
483  private:
484  beadLocator tailBead; // The temporary new tail
485 
486  int advanceLength; // The proposed WL length to advance
487  int numLevels; // The 2^numLevels = num slices moved
488 
489  void undoMove(); // Undo a move
490  void keepMove(); // keep the move
491 };
492 
493 // ========================================================================
494 // Recede Head Move Class
495 // ========================================================================
500 class RecedeHeadMove: public MoveBase {
501 
502  public:
503  RecedeHeadMove(Path &, ActionBase *, MTRand &,
504  ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true);
505  ~RecedeHeadMove();
506 
507  bool attemptMove();
508  static const string name;
509  string getName() {return name;}
510 
511  private:
512  beadLocator headBead; // The proposed new head position
513  int recedeLength; // The number of slices to recede by
514  int numLevels; // The 2^numLevels = num slices moved
515 
516  void undoMove(); // Undo a move
517  void keepMove(); // keep the move
518 };
519 
520 // ========================================================================
521 // Recede Tail Move Class
522 // ========================================================================
527 class RecedeTailMove: public MoveBase {
528 
529  public:
530  RecedeTailMove(Path &, ActionBase *, MTRand &,
531  ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true);
532  ~RecedeTailMove();
533 
534  bool attemptMove();
535  static const string name;
536  string getName() {return name;}
537 
538  private:
539  beadLocator tailBead; // The proposed new head position
540  int recedeLength; // The number of slices to recede by
541  int numLevels; // The 2^numLevels = num slices moved
542 
543  void undoMove(); // Undo a move
544  void keepMove(); // keep the move
545 };
546 
547 // ========================================================================
548 // Swap Move Base Class
549 // ========================================================================
554 class SwapMoveBase: public MoveBase {
555 
556  public:
557  SwapMoveBase(Path &, ActionBase *, MTRand &,
558  ensemble _operateOnConfig=OFFDIAGONAL);
559  ~SwapMoveBase();
560 
561  protected:
563  int numLevels;
564  unsigned int sizeCDF;
565 
566  vector <double> cumulant;
567 
570 
571  double SigmaSwap;
572 
573  /* Returns the normalization factor for the probability dist. */
574  double getNorm(const beadLocator&, const int sign=1);
575 
576  /* Gets the bead where the swap will pivot. */
578 
579  /* An overloaded version which also gets the winding sector */
581 };
582 
583 // ========================================================================
584 // Swap Head Move Class
585 // ========================================================================
591 class SwapHeadMove: public SwapMoveBase {
592 
593  public:
594  SwapHeadMove(Path &, ActionBase *, MTRand &,
595  ensemble _operateOnConfig=OFFDIAGONAL);
596  ~SwapHeadMove();
597 
598  bool attemptMove();
599  static const string name;
600  string getName() {return name;}
601 
602  private:
603 
604  double SigmaHead; // The probability normalization factor
605  beadLocator nextSwap; // Used for re-linking
606 
607  void undoMove(); // Undo a move
608  void keepMove(); // keep the move
609 };
610 
611 // ========================================================================
612 // Swap Tail Move Class
613 // ========================================================================
619 class SwapTailMove: public SwapMoveBase {
620 
621  public:
622  SwapTailMove(Path &, ActionBase *, MTRand &,
623  ensemble _operateOnConfig=OFFDIAGONAL);
624  ~SwapTailMove();
625 
626  bool attemptMove();
627  static const string name;
628  string getName() {return name;}
629 
630  private:
631 
632  double SigmaTail; // The probability normalization factor
633  beadLocator prevSwap; // Used for re-linking
634 
635  void undoMove(); // Undo a move
636  void keepMove(); // keep the move
637 };
638 
639 #endif
Holds a base class that all action classes will be derived from.
Definition: action.h:29
A derived class which performs an advance head move, causing the head of a worm in a off-diagonal con...
Definition: move.h:438
~AdvanceHeadMove()
Destructor.
Definition: move.cpp:2419
string getName()
return the move name
Definition: move.h:447
AdvanceHeadMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true)
Constructor.
Definition: move.cpp:2408
bool attemptMove()
Perform an advance head move.
Definition: move.cpp:2430
A derived class which performs an advance tail move, causing the tail of a worm in a off-diagonal con...
Definition: move.h:472
~AdvanceTailMove()
Destructor.
Definition: move.cpp:2598
bool attemptMove()
Perform an advance tail move.
Definition: move.cpp:2609
string getName()
return the move name
Definition: move.h:481
AdvanceTailMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true)
Constructor.
Definition: move.cpp:2587
A derived class which performs a bisection move, which exactly samples the kinetic action.
Definition: move.h:296
BisectionMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=ANY)
Constructor.
Definition: move.cpp:1440
bool attemptMove()
Bisection Move : attempt Move.
Definition: move.cpp:1486
~BisectionMove()
Destructor.
Definition: move.cpp:1468
string getName()
return the move name
Definition: move.h:305
A derived class which performs a simple displacement of the center of mass of the entire wordline for...
Definition: move.h:247
CenterOfMassMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=ANY)
Constructor.
Definition: move.cpp:1102
string getName()
return the move name
Definition: move.h:256
bool attemptMove()
Performs a Center of Mass move.
Definition: move.cpp:1126
~CenterOfMassMove()
Destructor.
Definition: move.cpp:1117
A derived class which performs a close move, creating a diagonal world line configuration.
Definition: move.h:357
string getName()
return the move name
Definition: move.h:366
bool attemptMove()
Perform a close move.
Definition: move.cpp:1881
~CloseMove()
Destructor.
Definition: move.cpp:1869
CloseMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true)
Constructor.
Definition: move.cpp:1858
A derived class which performs a simple single slice displacement move.
Definition: move.h:153
bool attemptMove()
Perform a single slice update on the head or tail.
Definition: move.cpp:523
DisplaceMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=ANY)
Constructor.
Definition: move.cpp:503
string getName()
return the move name
Definition: move.h:162
string getName()
return the move name
Definition: move.h:184
EndStagingMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=ANY)
Constructor.
Definition: move.cpp:656
bool attemptMove()
Perform a single slice update on the head or tail.
Definition: move.cpp:674
A derived class which performs an insert move, creating an off-diagonal world line configuration with...
Definition: move.h:385
string getName()
return the move name
Definition: move.h:394
bool attemptMove()
Perform an insert move.
Definition: move.cpp:2081
InsertMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=DIAGONAL, bool _varLength=true)
Constructor.
Definition: move.cpp:2058
~InsertMove()
Destructor.
Definition: move.cpp:2069
MidStagingMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=ANY)
Constructor.
Definition: move.cpp:837
bool attemptMove()
CMH: Add a description for this update.
Definition: move.cpp:854
string getName()
return the move name
Definition: move.h:208
The base class that all moves will be derived from.
Definition: move.h:30
double sqrtLambdaTau
sqrt(Lambda * tau)
Definition: move.h:112
virtual ~MoveBase()
Destructor.
Definition: move.cpp:138
dVec neighborPos
Staging neighbor position.
Definition: move.h:115
bool variableLength
Does the move have a variable length?
Definition: move.h:38
uint32 numAttempted
The number of attempted moves.
Definition: move.h:87
Array< dVec, 1 > originalPos
The original particle positions.
Definition: move.h:97
vector< iVec > winding
The winding vectors
Definition: move.h:100
Array< dVec, 1 > newPos
New particle positions.
Definition: move.h:98
int getNumAccepted()
Get the number of moves accepted.
Definition: move.h:63
iVec getWindingNumber(const beadLocator &, const beadLocator &)
Find the winding number for a path between two beads.
Definition: move.cpp:409
int getNumAcceptedLevel(int n)
Get the number of moves accepted by level.
Definition: move.h:67
double getAcceptanceRatio()
Get the acceptance ratio.
Definition: move.h:45
int getNumAttemptedLevel(int n)
Get the number of moves attempted by level.
Definition: move.h:65
double oldV
The old and new potential action.
Definition: move.h:140
Path & path
A reference to the paths.
Definition: move.h:80
MoveBase(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=ANY, bool _varLength=false)
Move naming conventions:
Definition: move.cpp:60
dVec newFreeParticlePosition(const beadLocator &)
Generates a new position, which exactly samples the free particle density matrix.
Definition: move.cpp:448
void resetAccept()
Reset the number accepted counter.
Definition: move.h:75
int numWind
The total number of winding vectors.
Definition: move.h:105
dVec newStagingPosition(const beadLocator &, const beadLocator &, const int, const int)
Returns a new staging position which will exactly sample the kinetic action.
Definition: move.cpp:268
double getTotAcceptanceRatio()
Get the total acceptance ratio.
Definition: move.h:50
iVec sampleWindingSector(const beadLocator &, const beadLocator &, const int, double &)
Obtain a winding sector for a stage-like move.
Definition: move.cpp:357
virtual bool attemptMove()=0
Attempt the move (will be overloaded).
void resetTotAccept()
Reset the total accepted counter.
Definition: move.h:73
dVec newBisectionPosition(const beadLocator &, const int)
Returns a new bisection position which will exactly sample the kinetic action.
Definition: move.cpp:469
ensemble operateOnConfig
What configurations do we operate on?
Definition: move.h:37
virtual void undoMove()=0
undo the move
MTRand & random
A reference to the RNG.
Definition: move.h:82
int maxWind
The largest winding number.
Definition: move.h:104
beadLocator nBeadIndex
Neighbor bead index.
Definition: move.h:114
double deltaAction
The action difference.
Definition: move.h:109
ActionBase * actionPtr
A base pointer to the action.
Definition: move.h:81
int numToMove
The number of particles moved.
Definition: move.h:88
virtual string getName()
return the move name
Definition: move.h:42
int getNumAttempted()
Get the number of moves attempted.
Definition: move.h:61
uint32 numAccepted
The number of accepted moves.
Definition: move.h:86
dVec newRanPos
Staing random position.
Definition: move.h:116
vector< int > windingSector
Used to index different winding sectors.
Definition: move.h:101
static uint32 totAccepted
The total number of moves accepted.
Definition: move.h:91
double getAcceptanceRatioLevel(int n)
Get the acceptance ratio by level.
Definition: move.h:55
virtual void keepMove()
Keep the move.
Definition: move.cpp:248
double newAction
The new potential action.
Definition: move.h:108
Array< uint32, 1 > numAttemptedLevel
The number of moves attempted at each level.
Definition: move.h:95
bool success
Did we sucessfully perform a move?
Definition: move.h:84
double sqrt2LambdaTau
sqrt(2 * Lambda * tau)
Definition: move.h:111
double oldAction
The original potential action.
Definition: move.h:107
static uint32 totAttempted
The total number of moves attempted.
Definition: move.h:92
Array< uint32, 1 > numAcceptedLevel
The number of moves accepted at each level.
Definition: move.h:94
vector< double > cumrho0
Used for tower-sampling winding sectors.
Definition: move.h:102
double oldK
The old and new kinetic action.
Definition: move.h:139
A derived class which performs an open move, creating a worm with a well defined head and tail.
Definition: move.h:329
OpenMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=DIAGONAL, bool _varLength=true)
Constructor.
Definition: move.cpp:1658
bool attemptMove()
Perform an open move.
Definition: move.cpp:1680
string getName()
return the move name
Definition: move.h:338
~OpenMove()
Destructor.
Definition: move.cpp:1669
The main driver class for the entire path integral monte carlo program.
Definition: pimc.h:37
The space-time trajectories.
Definition: path.h:29
A derived class which performs a recede move on the head, causing a worm head to propagate backwards ...
Definition: move.h:500
string getName()
return the move name
Definition: move.h:509
bool attemptMove()
Perform a recede head move.
Definition: move.cpp:2780
~RecedeHeadMove()
Destructor.
Definition: move.cpp:2770
RecedeHeadMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true)
Constructor.
Definition: move.cpp:2759
A derived class which performs a recede move on the tail, causing a worm tail to propagate backwards ...
Definition: move.h:527
string getName()
return the move name
Definition: move.h:536
RecedeTailMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true)
Constructor.
Definition: move.cpp:2926
bool attemptMove()
Perform a recede tail move.
Definition: move.cpp:2947
~RecedeTailMove()
Destructor.
Definition: move.cpp:2937
A derived class which performs a remove move, creating a diagonal world line configuration by destroy...
Definition: move.h:413
bool attemptMove()
Perform a remove move.
Definition: move.cpp:2266
RemoveMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=OFFDIAGONAL, bool _varLength=true)
Constructor.
Definition: move.cpp:2243
~RemoveMove()
Destructor.
Definition: move.cpp:2254
string getName()
return the move name
Definition: move.h:422
A derived class which performs a staging move, which exactly samples the kinetic action.
Definition: move.h:271
bool attemptMove()
Perform the staging move.
Definition: move.cpp:1316
StagingMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=ANY)
Constructor.
Definition: move.cpp:1289
string getName()
return the move name
Definition: move.h:280
~StagingMove()
Destructor.
Definition: move.cpp:1306
SwapBreakMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=ANY)
Constructor.
Definition: move.cpp:1007
string getName()
return the move name
Definition: move.h:233
bool attemptMove()
CMH: Please add a method description for this move.
Definition: move.cpp:1023
A derived class which performs a swap head move, which mixes up worldlines by reconnecting the worm h...
Definition: move.h:591
~SwapHeadMove()
Destructor.
Definition: move.cpp:3307
SwapHeadMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=OFFDIAGONAL)
Constructor.
Definition: move.cpp:3292
string getName()
return the move name
Definition: move.h:600
bool attemptMove()
Perform a swap head move.
Definition: move.cpp:3317
A derived class which forms the base of a swap head and swap tail move class.
Definition: move.h:554
beadLocator pivot
The pivot bead.
Definition: move.h:568
SwapMoveBase(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=OFFDIAGONAL)
Constructor.
Definition: move.cpp:3105
vector< double > cumulant
The cumulant array used in selecting a pivot.
Definition: move.h:566
beadLocator selectPivotBead()
Select the pivot bead for a swap move.
Definition: move.cpp:3269
double SigmaSwap
Probability normalization factor.
Definition: move.h:571
~SwapMoveBase()
Destructor.
Definition: move.cpp:3113
double getNorm(const beadLocator &, const int sign=1)
Get the normalization constant for a swap move.
Definition: move.cpp:3141
unsigned int sizeCDF
The size of the cumulative distribution function.
Definition: move.h:564
beadLocator swap
The swap bead.
Definition: move.h:569
int swapLength
The length of worldLine to be moved.
Definition: move.h:562
int numLevels
The number of bisection levels.
Definition: move.h:563
A derived class which performs a swap tail move, which mixes up worldlines by reconnecting the worm t...
Definition: move.h:619
~SwapTailMove()
Destructor.
Definition: move.cpp:3545
bool attemptMove()
Perform a swap tail move.
Definition: move.cpp:3554
string getName()
return the move name
Definition: move.h:628
SwapTailMove(Path &, ActionBase *, MTRand &, ensemble _operateOnConfig=OFFDIAGONAL)
Constructor.
Definition: move.cpp:3530
Global common header with shared dependencies and methods.
unsigned long uint32
Unsigned integer type, at least 32 bits.
Definition: common.h:105
TinyVector< int, 2 > beadLocator
time-slice,bead-number world line index
Definition: common.h:117
ensemble
Each move can operate on only the digaonal ensemble, only the off-diagonal ensemble,...
Definition: common.h:133
TinyVector< double, NDIM > dVec
A NDIM-vector of type double.
Definition: common.h:111
TinyVector< int, NDIM > iVec
A NDIM-vector of type integer.
Definition: common.h:114