Simpatico  v1.10
McMoveFactory.cpp
1 /*
2 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
3 *
4 * Copyright 2010 - 2017, The Regents of the University of Minnesota
5 * Distributed under the terms of the GNU General Public License.
6 */
7 
8 #include "McMoveFactory.h" // Class header
9 
10 #include "common/AtomDisplaceMove.h"
11 #include "common/RigidDisplaceMove.h"
12 #include "common/HybridMdMove.h"
13 #include "common/HybridNphMdMove.h"
14 #include "common/MdMove.h"
15 #include "common/DpdMove.h"
16 
17 #ifdef SIMP_BOND
18 #include "linear/EndSwapMove.h"
19 #include "linear/CfbEndMove.h"
20 #include "linear/CfbLinearEndMove.h"
21 #include "linear/CfbReptationMove.h"
22 #include "linear/CfbReptateMove.h"
23 #include "linear/CfbRebridgeMove.h"
24 #include "linear/CfbDoubleRebridgeMove.h"
25 
26 #include "ring/CfbRingRebridgeMove.h"
27 #include "ring/RingTetraRebridgeMove.h"
28 #include "ring/RingOctaRebridgeMove.h"
29 
30 #include "semigrand/HomopolymerSemiGrandMove.h"
31 #endif
32 
33 namespace McMd
34 {
35 
36  using namespace Util;
37 
38  /*
39  * Return a pointer to a instance of Species subclass className.
40  */
41  McMove* McMoveFactory::factory(const std::string &className) const
42  {
43  McMove* ptr = 0;
44 
45  // Try subfactories first
46  ptr = trySubfactories(className);
47  if (ptr) return ptr;
48 
49  if (className == "HybridMdMove") {
50  ptr = new HybridMdMove(*systemPtr_);
51  } else
52  if (className == "HybridNphMdMove") {
53  ptr = new HybridNphMdMove(*systemPtr_);
54  } else
55  if (className == "MdMove") {
56  ptr = new MdMove(*systemPtr_);
57  } else
58  if (className == "DpdMove") {
59  ptr = new DpdMove(*systemPtr_);
60  } else
61  if (className == "AtomDisplaceMove") {
62  ptr = new AtomDisplaceMove(*systemPtr_);
63  } else
64  if (className == "RigidDisplaceMove") {
65  ptr = new RigidDisplaceMove(*systemPtr_);
66  }
67  #ifdef SIMP_BOND
68  else
69  if (className == "EndSwapMove") {
70  ptr = new EndSwapMove(*systemPtr_);
71  } else
72  if (className == "CfbEndMove") {
73  ptr = new CfbEndMove(*systemPtr_);
74  } else
75  if (className == "CfbLinearEndMove") {
76  ptr = new CfbLinearEndMove(*systemPtr_);
77  } else
78  if (className == "CfbReptationMove") {
79  ptr = new CfbReptationMove(*systemPtr_);
80  } else
81  if (className == "CfbReptateMove") {
82  ptr = new CfbReptateMove(*systemPtr_);
83  } else
84  if (className == "CfbRebridgeMove") {
85  ptr = new CfbRebridgeMove(*systemPtr_);
86  } else
87  if (className == "CfbDoubleRebridgeMove") {
88  ptr = new CfbDoubleRebridgeMove(*systemPtr_);
89  } else
90  if (className == "CfbRingRebridgeMove") {
91  ptr = new CfbRingRebridgeMove(*systemPtr_);
92  } else
93  if (className == "RingTetraRebridgeMove") {
94  ptr = new RingTetraRebridgeMove(*systemPtr_);
95  } else
96  if (className == "RingOctaRebridgeMove") {
97  ptr = new RingOctaRebridgeMove(*systemPtr_);
98  } else
99  if (className == "HomopolymerSemiGrandMove") {
100  ptr = new HomopolymerSemiGrandMove(*systemPtr_);
101  }
102  #endif
103 
104  return ptr;
105  }
106 
107 }
configuration bias trimer double rebridge moves, to reconnect two chains.
DpdMove is a short dissipative particle dynamics (DPD) simulation.
Definition: DpdMove.h:36
HybridNphMove is a hybrid Molecular Dynamics MC move for NPT ensemble.
MdMove is a simple NVE molecular Dynamics MC move.
Definition: MdMove.h:38
Random displacement of one atom.
McMove is an abstract base class for Monte Carlo moves.
Definition: McMove.h:31
A move that changes the type of a HomopolymerSG molecule.
Configuration bias end regrowth move for flexible linear chains.
HybridMdMove is a hybrid Molecular Dynamics MC move.
Definition: HybridMdMove.h:31
Random rigid displacement of a molecule.
Utility classes for scientific computation.
Definition: accumulators.mod:1
virtual McMove * factory(const std::string &className) const
Return pointer to a new McMove object.
Configuration bias end regrowth move for flexible linear chains.
Definition: CfbEndMove.h:32
Molecule rebridging move for a Ring species.
Configuration bias rebridge moves for ring molecules.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A move that swaps the ends of a linear hetero-polymer.
Definition: EndSwapMove.h:36
Molecule move that attempt the exchange of interior pieces of one close rings.
Configuration bias reptation move for a Linear species.
Config-bias move for internal segment of a flexible linear polymer.
Configuration bias reptation move for a Linear species.