Simpatico  v1.10
RingTetraRebridgeMove.h
1 #ifndef MCMD_RING_TETRA_REBRIDGE_MOVE_H
2 #define MCMD_RING_TETRA_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/GroupRebridgeBase.h> // base class
12 #include <util/space/Vector.h> // template parameter
13 #include <util/containers/DArray.h> // member template
14 
15 namespace McMd
16 {
17 
18  using namespace Util;
19 
20  class McSystem;
21  class Molecule;
22 
30  {
31 
32  public:
33 
40 
46  virtual void readParameters(std::istream& in);
47 
51  virtual bool move();
52 
58  virtual void loadParameters(Serializable::IArchive& ar);
59 
65  virtual void save(Serializable::OArchive& ar);
66 
67  protected:
68 
71 
73  int nAtom_;
74 
76  double upperBridge_;
77 
79  double lowerBridge_;
80 
83 
91  bool scanBridge(Molecule* molPtr, int aId, int &cId);
92 
99  int modId(int id, int n);
100 
101  };
102 
103  // Private inline methods.
104 
105  inline int RingTetraRebridgeMove::modId(int id, int n)
106  {
107  if (id >= n) id = id%n;
108  if (id < 0) id = n - (-id)%n;
109  return id;
110  }
111 
112 }
113 #endif
A System for use in a Markov chain Monte Carlo simulation.
Definition: McSystem.h:52
int modId(int id, int n)
Shift Atom index along a Ring.
double upperBridge_
Upper bounds for trial length of a bridge.
Saving / output archive for binary ostream.
Utility classes for scientific computation.
Definition: accumulators.mod:1
int speciesId_
Integer index for molecular species.
double lowerBridge_
Lower bounds for trial length of a bridge.
Dynamically allocatable contiguous array template.
Definition: DArray.h:31
DArray< Vector > R_
Arrays of atom positions of the correct molecule shape.
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
Molecule move that attempt the exchange of interior pieces of one close rings.
int nAtom_
Number of atoms per molecule.
A physical molecule (a set of covalently bonded Atoms).
Base class for rebridging a group of atoms forming a tetrahedron.