Simpatico  v1.10
CfbLinear.h
1 #ifndef MCMD_CFB_LINEAR_H
2 #define MCMD_CFB_LINEAR_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/SystemMove.h> // base class
12 
13 namespace McMd
14 {
15 
16  using namespace Util;
17 
18  class Atom;
19  class Molecule;
20  class McSystem;
21 
39  class CfbLinear : public SystemMove
40  {
41 
42  public:
43 
47  CfbLinear(McSystem& system);
48 
52  virtual ~CfbLinear();
53 
57  virtual void readParameters(std::istream& in);
58 
64  virtual void loadParameters(Serializable::IArchive& ar);
65 
71  virtual void save(Serializable::OArchive& ar);
72 
95  void deleteAtom(Molecule& molecule, int atomId, int sign,
96  double &rosenbluth, double &energy);
97 
131  void addAtom(Molecule& molecule, Atom& atom0, Atom& atom1, int atomId,
132  int sign, double &rosenbluth, double &energy);
133 
134  protected:
135 
139  int nTrial() const;
140 
144  int speciesId() const;
145 
146  private:
147 
149  static const int MaxTrial_ = 200;
150 
152  int speciesId_;
153 
155  int nTrial_;
156 
157  #ifdef SIMP_ANGLE
158  bool hasAngles_;
159  #endif
160 
161  #ifdef SIMP_DIHEDRAL
162  bool hasDihedrals_;
163  #endif
164 
165  #ifdef SIMP_EXTERNAL
166  bool hasExternal_;
167  #endif
168 
172  void processParameters();
173 
174  };
175 
176  // Inline functions
177 
178  /*
179  * Get nTrial.
180  */
181  inline int CfbLinear::nTrial() const
182  { return nTrial_; }
183 
184  /*
185  * Get speciesId.
186  */
187  inline int CfbLinear::speciesId() const
188  { return speciesId_; }
189 
190 }
191 #endif
A System for use in a Markov chain Monte Carlo simulation.
Definition: McSystem.h:52
int nTrial() const
Get nTrial.
Definition: CfbLinear.h:181
Base class for configuration bias (CFB) end regrowth moves.
Definition: CfbLinear.h:39
Saving / output archive for binary ostream.
A point particle within a Molecule.
Utility classes for scientific computation.
Definition: accumulators.mod:1
An McMove that acts on one McSystem.
Definition: SystemMove.h:28
int speciesId() const
Get speciesId.
Definition: CfbLinear.h:187
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A physical molecule (a set of covalently bonded Atoms).