Simpatico  v1.10
CfbRingRebridgeMove.h
1 #ifndef MCMD_CFB_RING_REBRIDGE_MOVE_H
2 #define MCMD_CFB_RING_REBRIDGE_MOVE_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <mcMd/mcMoves/base/CfbRebridgeBase.h> // base class
12 #include <util/containers/DArray.h> // member template
13 #include <util/space/Vector.h> // member template parameter
14 
15 namespace McMd
16 {
17 
18  using namespace Util;
19 
20  class McSystem;
21  class Molecule;
22 
35  {
36 
37  public:
38 
43 
49  virtual void readParameters(std::istream& in);
50 
56  virtual void loadParameters(Serializable::IArchive& ar);
57 
63  virtual void save(Serializable::OArchive& ar);
64 
68  virtual bool move();
69 
70  protected:
71 
74 
77 
79  int nRegrow_;
80 
81  private:
82 
93  void deleteSequence(int sign, Molecule *molPtr, int endId, int *bonds,
94  double &rosenbluth, double &energy);
95 
106  void addSequence(int sign, Molecule *molPtr, int beginId, int *bonds,
107  double &rosenbluth, double &energy);
108 
115  int modId(int id, int n);
116 
117  };
118 
119  // Private inline methods.
120 
121  inline int CfbRingRebridgeMove::modId(int id, int n)
122  {
123  if (id >= n) id = id%n;
124  if (id < 0) id = n - (-id)%n;
125  return id;
126  }
127 
128 }
129 #endif
A System for use in a Markov chain Monte Carlo simulation.
Definition: McSystem.h:52
Base class configuration bias moves internal segment regrowth moves.
Saving / output archive for binary ostream.
Utility classes for scientific computation.
Definition: accumulators.mod:1
int speciesId_
Integer index for molecular species.
DArray< Vector > oldPos_
Array of old positions of temporarily deleted atoms.
Dynamically allocatable contiguous array template.
Definition: DArray.h:31
Saving archive for binary istream.
Configuration bias rebridge moves for ring molecules.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
int nRegrow_
Number of particles at end to attempt to regrow.
A physical molecule (a set of covalently bonded Atoms).