Simpatico  v1.10
SliplinkMcAnalyzerFactory.cpp
1 #include "SliplinkMcAnalyzerFactory.h"
2 #include <mcMd/mcSimulation/McSimulation.h>
3 #include <mcMd/mcSimulation/McSystem.h>
4 
5 // Include headers for any user defined Analyzers for MC simulations
6 #include "G1MSD.h"
7 #include "EndtoEnd.h"
8 #include "EndtoEndXYZ.h"
9 #include "LinkLengthDist.h"
10 #include "LinkLifeTime.h"
11 #include "SSChainDist.h"
12 #include "VelProf.h"
13 #include "NLinkAverage.h"
14 #include "InterIntraLink.h"
15 #include "LinkLTPos.h"
16 #include "LinkMSD.h"
17 
18 namespace McMd
19 {
20 
21  /*
22  * Return a pointer to a new instance of className.
23  */
24  Analyzer* SliplinkMcAnalyzerFactory::factory(const std::string &className) const
25  {
26  Analyzer* ptr = 0;
27 
28  ptr = trySubfactories(className);
29  if (ptr) return ptr;
30 
31  if (className == "G1MSD") {
32  ptr = new G1MSD(system());
33  }
34  else if (className == "EndtoEnd") {
35  ptr = new EndtoEnd(system());
36  }
37  else if (className == "EndtoEndXYZ") {
38  ptr = new EndtoEndXYZ(system());
39  }
40  else if (className == "LinkLengthDist") {
41  ptr = new LinkLengthDist(system());
42  }
43  else if (className == "LinkLifeTime") {
44  ptr = new LinkLifeTime(system());
45  }
46  else if (className == "SSChainDist") {
47  ptr = new SSChainDist(system());
48  }
49  else if (className == "VelProf") {
50  ptr = new VelProf(system());
51  }
52  else if (className == "NLinkAverage") {
53  ptr = new NLinkAverage(system());
54  }
55  else if (className == "InterIntraLink") {
56  ptr = new InterIntraLink(system());
57  }
58  else if (className == "LinkLTPos") {
59  ptr = new LinkLTPos(system());
60  }
61  else if (className == "LinkMSD") {
62  ptr = new LinkMSD(system());
63  }
64 
65  #if 0
66  // If not a user-defined class, try the standard factory
67  if (!ptr) {
68  ptr = McAnalyzerFactory::factory(className);
69  }
70  #endif
71 
72  return ptr;
73  }
74 
75 }
virtual Analyzer * factory(const std::string &className) const
Return pointer to a new Analyzer object.
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
LinkLengthDist evaluates the distribution function of the lengths of the links.
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
Analyzer * trySubfactories(const std::string &className) const
Search through subfactories for match.
McSystem & system() const
Return reference to parent McSystem.
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
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).
virtual Analyzer * factory(const std::string &className) const
Return pointer to a new Analyzer object.