Simpatico  v1.10
Processor.h
1 #ifndef TOOLS_PROCESSOR_H
2 #define TOOLS_PROCESSOR_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 <tools/storage/Configuration.h> // base class
12 #include <tools/config/ConfigReaderFactory.h> // member
13 #include <tools/config/ConfigWriterFactory.h> // member
14 #include <tools/trajectory/TrajectoryReaderFactory.h> // member
15 #include <tools/processor/ProcessorAnalyzerManager.h> // member
16 #include <util/misc/FileMaster.h> // member
17 
18 namespace Tools
19 {
20 
21  class ConfigReader;
22 
23  using namespace Util;
24 
30  class Processor : public Configuration
31  {
32 
33  public:
34 
38  Processor();
39 
43  ~Processor();
44 
46 
47 
54  void setOptions(int argc, char * const * argv);
55 
57 
61  void readParam();
62 
68  void readParam(const char* filename);
69 
75  void readParameters(std::istream& in);
76 
80  void readCommands();
81 
87  void readCommands(std::istream &in);
88 
90 
92 
98  void setConfigReader(const std::string& configReaderName);
99 
103  ConfigReader& configReader();
104 
108  void readConfig(std::ifstream& in);
109 
113  void readConfig(const std::string& filename);
114 
129  void analyzeConfigs(const std::string& baseFileName,
130  int min, int max, int interval = 1);
131 
133 
135 
141  void setConfigWriter(const std::string& configWriterName);
142 
146  ConfigWriter& configWriter();
147 
151  void writeConfig(std::ofstream& in);
152 
156  void writeConfig(const std::string& filename);
157 
159 
161 
167  void setTrajectoryReader(const std::string& trajectoryStyle);
168 
172  TrajectoryReader& trajectoryReader();
173 
179  void analyzeTrajectory(const std::string& filename);
180 
182 
184 
188  FileMaster& fileMaster();
189 
191 
192  private:
193 
195  ConfigReader* configReaderPtr_;
196 
198  ConfigWriter* configWriterPtr_;
199 
201  TrajectoryReader* trajectoryReaderPtr_;
202 
204  ConfigReaderFactory configReaderFactory_;
205 
207  ConfigWriterFactory configWriterFactory_;
208 
210  TrajectoryReaderFactory trajectoryReaderFactory_;
211 
213  ProcessorAnalyzerManager analyzerManager_;
214 
216  FileMaster fileMaster_;
217 
219  std::string configReaderName_;
220 
221  };
222 
223 }
224 #endif
Abstract reader/writer for configuration files.
Definition: ConfigReader.h:27
A post-processor for analyzing outputs of MD simulations.
Definition: Processor.h:30
Abstract trajectory file reader.
Manager for a list of Analyzer objects.
An instantaneous molecular dynamics configuration.
Definition: Configuration.h:40
Abstract reader/writer for configuration files.
Default Factory for subclasses of ConfigReader.
Default Factory for subclasses of TrajectoryReader.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Single-processor classes for pre- and post-processing MD trajectories.
A FileMaster manages input and output files for a simulation.
Definition: FileMaster.h:142
virtual void readParam(std::istream &in)
Read the parameter file block.
Default Factory for subclasses of ConfigWriter.