Simpatico  v1.10
MdVirialStressTensorAverage.h
1 #ifndef MD_VIRIAL_STRESSTENSOR_AVERAGE_H
2 #define MD_VIRIAL_STRESSTENSOR_AVERAGE_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 <mcMd/analyzers/Analyzer.h>
12 #include <mcMd/analyzers/SystemAnalyzer.h>
13 #include <mcMd/mdSimulation/MdSystem.h>
14 #include <util/space/Tensor.h>
15 #include <util/accumulators/Average.h>
16 
17 namespace McMd
18 {
19 
20  using namespace Util;
21 
31  {
32 
33  public:
34 
41 
46  {}
47 
53  virtual void readParameters(std::istream& in);
54 
60  virtual void loadParameters(Serializable::IArchive &ar);
61 
67  virtual void save(Serializable::OArchive &ar);
68 
72  virtual void clear();
73 
79  virtual void sample(long iStep);
80 
84  virtual void output();
85 
86  private:
87 
89  std::ofstream outputFile_;
90 
92  Average sxxAccumulator_;
93 
95  Average sxyAccumulator_;
96 
98  Average sxzAccumulator_;
99 
101  Average syxAccumulator_;
102 
104  Average syyAccumulator_;
105 
107  Average syzAccumulator_;
108 
110  Average szxAccumulator_;
111 
113  Average szyAccumulator_;
114 
116  Average szzAccumulator_;
117 
119  int nSamplePerBlock_;
120 
122  long nSample_;
123 
125  long isInitialized_;
126 
127  };
128 
129 }
130 #endif
Calculates the average and variance of a sampled property.
Definition: Average.h:43
Periodically write (tensor) StressTensor to file.
Saving / output archive for binary ostream.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Template for Analyzer associated with one System.
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A System for Molecular Dynamics simulation.
Definition: MdSystem.h:68