Simpatico  v1.10
McEnergyOutput.h
1 #ifndef MCMD_MC_ENERGY_OUTPUT_H
2 #define MCMD_MC_ENERGY_OUTPUT_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/SystemAnalyzer.h> // base class template
12 #include <mcMd/mcSimulation/McSystem.h> // base template parameter
13 
14 namespace McMd
15 {
16 
17  using namespace Util;
18 
27  class McEnergyOutput : public SystemAnalyzer<McSystem>
28  {
29 
30  public:
31 
37  McEnergyOutput(McSystem& system);
38 
44  virtual void readParameters(std::istream& in);
45 
51  virtual void loadParameters(Serializable::IArchive& ar);
52 
58  virtual void save(Serializable::OArchive& ar);
59 
66  template <class Archive>
67  void serialize(Archive& ar, const unsigned int version);
68 
72  void sample(long iStep);
73 
77  virtual void output();
78 
79  private:
80 
82  std::ofstream outputFile_;
83 
84  };
85 
86  /*
87  * Serialize to/from an archive.
88  */
89  template <class Archive>
90  void McEnergyOutput::serialize(Archive& ar, const unsigned int version)
91  { Analyzer::serialize(ar, version); }
92 
93 }
94 #endif
A System for use in a Markov chain Monte Carlo simulation.
Definition: McSystem.h:52
Analyzer to output total potential energy.
void serialize(Archive &ar, PairSelector &selector, const unsigned int version)
Serialize a PairSelector.
Definition: PairSelector.h:167
Saving / output archive for binary ostream.
void serialize(Archive &ar, const unsigned int version)
Serialize to/from an archive.
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).
void serialize(Archive &ar, const unsigned int version)
Serialize to/from an archive.