Simpatico  v1.10
NLinkAverage.h
1 #ifndef NLINK_AVERAGE_H
2 #define NLINK_AVERAGE_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2014, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <mcMd/analyzers/SystemAnalyzer.h> // base class template
12 #include <mcMd/simulation/System.h> // class template parameter
13 #include <util/accumulators/Average.h> // member
14 
15 #include <cstdio>
16 #include <cstring>
17 
18 namespace Simp {
19  class Species;
20 }
21 
22 namespace McMd
23 {
24 
25  using namespace Util;
26  using namespace Simp;
27 
28 
40  class NLinkAverage : public SystemAnalyzer<System>
41  {
42 
43  public:
44 
50  NLinkAverage(System &system);
51 
66  virtual void readParameters(std::istream& in);
67 
71  virtual void setup();
72 
78  virtual void sample(long iStep);
79 
83  virtual void output();
84 
85  private:
86 
88  std::ofstream outputFile_;
89 
91  Average accumulator_;
92 
94  int nSamplePerBlock_;
95 
96  };
97 
98 }
99 #endif
Calculates the average and variance of a sampled property.
Definition: Average.h:43
Average number of crosslinks.
Definition: NLinkAverage.h:40
A set of interacting Molecules enclosed by a Boundary.
Definition: System.h:115
Classes used by all simpatico molecular simulations.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Template for Analyzer associated with one System.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).