Simpatico  v1.10
SliplinkMdAnalyzerFactory.cpp
1 #ifndef SLIPLINK_MD_ANALYZER_FACTORY_CPP
2 #define SLIPLINK_MD_ANALYZER_FACTORY_CPP
3 
4 #include "SliplinkMdAnalyzerFactory.h" // Class header
5 #include <mcMd/mdSimulation/MdSystem.h>
6 
7 // Include headers for any user defined Analyzers for MD simulations
8 #include "Crosslinker.h"
9 #include "G1MSD.h"
10 #include "EndtoEnd.h"
11 #include "EndtoEndXYZ.h"
12 #include "LinkLengthDist.h"
13 #include "LinkLifeTime.h"
14 #include "SSChainDist.h"
15 #include "VelProf.h"
16 #include "NLinkAverage.h"
17 #include "InterIntraLink.h"
18 #include "LinkLTPos.h"
19 #include "LinkMSD.h"
20 
21 namespace McMd
22 {
23 
24  /*
25  * Return a pointer to a new instance of className.
26  */
27  Analyzer* SliplinkMdAnalyzerFactory::factory(const std::string &className) const
28  {
29  Analyzer* spp = 0;
30 
31  // Check names of user defined subclasses of Analyzer
32  //if (className == "NewAnalyzer1") {
33  // spp = new NewAnalyzer1(system());
34  //} else
35  //if (className == "NewAnalyzer2") {
36  // spp = new NewAnalyzer2(system());
37  //} else
38  // ...
39  //}
40 
41  if (className == "Crosslinker") {
42  spp = new Crosslinker(system());
43  }
44  else if (className == "G1MSD") {
45  spp = new G1MSD(system());
46  }
47  else if (className == "EndtoEnd") {
48  spp = new EndtoEnd(system());
49  }
50  else if (className == "EndtoEndXYZ") {
51  spp = new EndtoEndXYZ(system());
52  }
53  else if (className == "LinkLengthDist") {
54  spp = new LinkLengthDist(system());
55  }
56  else if (className == "LinkLifeTime") {
57  spp = new LinkLifeTime(system());
58  }
59  else if (className == "SSChainDist") {
60  spp = new SSChainDist(system());
61  }
62  else if (className == "VelProf") {
63  spp = new VelProf(system());
64  }
65  else if (className == "NLinkAverage") {
66  spp = new NLinkAverage(system());
67  }
68  else if (className == "InterIntraLink") {
69  spp = new InterIntraLink(system());
70  }
71  else if (className == "LinkLTPos") {
72  spp = new LinkLTPos(system());
73  }
74  else if (className == "LinkMSD") {
75  spp = new LinkMSD(system());
76  }
77 
78  // If not a user-defined class, try the standard factory
79  if (!spp) {
80  spp = MdAnalyzerFactory::factory(className);
81  }
82 
83  return spp;
84  }
85 
86 }
87 
88 #endif
Mean square end to end distance of a molecule.
Definition: EndtoEndXYZ.h:51
Average number of crosslinks.
Definition: NLinkAverage.h:40
Evaluates msd of link ends along the chains.
Definition: LinkMSD.h:40
virtual Analyzer * factory(const std::string &className) const
Return pointer to a new Analyzer object.
LinkLengthDist evaluates the distribution function of the lengths of the links.
MdSystem & system() const
Return reference to parent MdSystem.
End to end distance of a molecule.
Definition: EndtoEnd.h:54
Evaluates x-velocity profile as a function of z.
Definition: VelProf.h:36
Abstract base for periodic output and/or analysis actions.
LinkLifeTime evaluates how long the slip-springs live.
Definition: LinkLifeTime.h:30
SSChainDist evaluates the distribution of slip-springs along the chains.
Definition: SSChainDist.h:32
Autocorrelation for vector separation of any two monomers on a molecule.
Definition: G1MSD.h:30
Analyzer to create crosslinks and output the resulting configuration.
Definition: Crosslinker.h:25
virtual Analyzer * factory(const std::string &className) const
Return pointer to a new Analyzer object.
LinkLTPos evaluates how long the slip-springs live as a function of position along the chain...
Definition: LinkLTPos.h:31
Single-processor Monte Carlo (MC) and molecular dynamics (MD).