Simpatico  v1.10
SystemAnalyzerFactory.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 "SystemAnalyzerFactory.h" // Class header
9 
10 // Analyzers for any System (Mc or Md)
11 #include <mcMd/analyzers/simulation/LogProgress.h>
12 #include "ConfigWriter.h"
13 #include "AtomMSD.h"
14 #include "RDF.h"
15 #include "StructureFactorP.h"
16 #include "StructureFactorPGrid.h"
17 #include "StructureFactor.h"
18 #include "StructureFactorGrid.h"
19 #include "CompositionProfile.h"
20 #include "VanHove.h"
21 #include "BoundaryAverage.h"
22 #include "ClusterHistogram.h"
23 
24 #ifdef SIMP_BOND
25 #include "RadiusGyration.h"
26 #include "BlockRadiusGyration.h"
27 #include "BondLengthDist.h"
28 #include "IntraStructureFactor.h"
29 #include "IntraStructureFactorGrid.h"
30 #include "ComMSD.h"
31 #include "IntraPairAutoCorr.h"
32 #include "RingRouseAutoCorr.h"
33 #include "LinearRouseAutoCorr.h"
34 #endif
35 
36 #ifdef MCMD_PERTURB
37 #ifdef UTIL_MPI
38 #include <mcMd/analyzers/perturb/BennettsMethod.h>
39 #endif
40 #include <mcMd/analyzers/perturb/PerturbDerivative.h>
41 #endif
42 
43 namespace McMd
44 {
45 
46  using namespace Util;
47 
48  /*
49  * Constructor.
50  */
52  System& system)
53  : simulationPtr_(&simulation),
54  systemPtr_(&system)
55  {}
56 
57  /*
58  * Return a pointer to a instance of Species subclass className.
59  */
60  Analyzer* SystemAnalyzerFactory::factory(const std::string &className) const
61  {
62  Analyzer* ptr = 0;
63 
64  if (className == "LogProgress") {
65  ptr = new LogProgress();
66  } else
67  if (className == "ConfigWriter") {
68  ptr = new ConfigWriter(system());
69  } else
70  if (className == "RDF") {
71  ptr = new RDF(system());
72  } else
73  if (className == "StructureFactorP") {
74  ptr = new StructureFactorP(system());
75  } else
76  if (className == "StructureFactorPGrid") {
77  ptr = new StructureFactorPGrid(system());
78  } else
79  if (className == "StructureFactor") {
80  ptr = new StructureFactor(system());
81  } else
82  if (className == "StructureFactorGrid") {
83  ptr = new StructureFactorGrid(system());
84  } else
85  if (className == "BoundaryAverage") {
86  ptr = new BoundaryAverage(system());
87  } else
88  if (className == "CompositionProfile") {
89  ptr = new CompositionProfile(system());
90  } else
91  if (className == "AtomMSD") {
92  ptr = new AtomMSD(system());
93  } else
94  if (className == "VanHove") {
95  ptr = new VanHove(system());
96  } else
97  if (className == "ClusterHistogram") {
98  ptr = new ClusterHistogram(system());
99  }
100 
101  #ifdef SIMP_BOND
102  else
103  if (className == "IntraStructureFactor") {
104  ptr = new IntraStructureFactor(system());
105  } else
106  if (className == "IntraStructureFactorGrid") {
107  ptr = new IntraStructureFactorGrid(system());
108  } else
109  if (className == "RadiusGyration") {
110  ptr = new RadiusGyration(system());
111  } else
112  if (className == "BlockRadiusGyration") {
113  ptr = new BlockRadiusGyration(system());
114  } else
115  if (className == "BondLengthDist") {
116  ptr = new BondLengthDist(system());
117  } else
118  if (className == "ComMSD") {
119  ptr = new ComMSD(system());
120  } else
121  if (className == "IntraPairAutoCorr") {
122  ptr = new IntraPairAutoCorr(system());
123  } else
124  if (className == "LinearRouseAutoCorr") {
125  ptr = new LinearRouseAutoCorr(system());
126  } else
127  if (className == "RingRouseAutoCorr") {
128  ptr = new RingRouseAutoCorr(system());
129  }
130  #endif
131 
132  #ifdef UTIL_MPI
133  #ifdef MCMD_PERTURB
134  else
135  if (className == "PerturbDerivative") {
136  ptr = new PerturbDerivative(system());
137  } else
138  if (className == "BennettsMethod") {
139  ptr = new BennettsMethod(system());
140  }
141  #endif
142  #endif
143 
144  return ptr;
145  }
146 
147 }
Periodically dump system configuration to a new file.
StructureFactorP evaluates partial structure factors in Fourier space.
SystemAnalyzerFactory(Simulation &simulation, System &system)
Constructor.
Intramolecular contribution to the structure factor S(k)
Radius of gyration of different blocks in a molecule.
Autocorrelation for vector separation of any two monomers on a molecule.
A set of interacting Molecules enclosed by a Boundary.
Definition: System.h:115
Identify micelle clusters in polymeric systems.
The main object in a simulation, which coordinates others.
Autocorrelation for Rouse mode coefficients of a linear molecule.
Evaluates the van Hove function S(k,t) for one or more wavevector k.
StructureFactorGrid evaluates structure factors in Fourier space.
StructureFactorPGrid evaluates structure factors in Fourier space.
Radius of gyration of a molecule.
RDF evaluates the atomic radial distribution function.
Definition: RDF.h:43
Abstract base for periodic output and/or analysis actions.
Periodically write step number to a Log file.
Definition: LogProgress.h:23
Utility classes for scientific computation.
Definition: accumulators.mod:1
Autocorrelation for vector separation of two atoms on a molecule.
Average of boundary lengths and volume of simulation cell.
virtual Analyzer * factory(const std::string &className) const
Return pointer to a new Analyzer object.
PerturbDerivative returns average value of Perturbation::derivative().
StructureFactor evaluates structure factors in Fourier space.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
Bennett&#39;s method estimates free energy difference between two states.
BondLengthDist evaluates the distribution function of the lengths of the bonds.
IntraStructureFactorGrid evaluates structure factors in Fourier space.
Molecular center of mass mean squared displacement.
Definition: ComMSD.h:35
CompositionProfile evaluates the distribution of monomer positions along several user-specified direc...
Autocorrelation for Rouse mode coefficients of a ring molecule.