Simpatico  v1.10
MdEnergyOutput.h
1 #ifndef MCMD_MD_ENERGY_OUTPUT_H
2 #define MCMD_MD_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/mdSimulation/MdSystem.h> // base template parameter
13 #include <util/global.h>
14 
15 namespace McMd
16 {
17 
18  using namespace Util;
19 
28  class MdEnergyOutput : public SystemAnalyzer<MdSystem>
29  {
30 
31  public:
32 
33  /*
34  * Constructor.
35  */
36  MdEnergyOutput(MdSystem& system);
37 
43  virtual void readParameters(std::istream& in);
44 
50  virtual void loadParameters(Serializable::IArchive &ar);
51 
57  virtual void save(Serializable::OArchive &ar);
58 
65  template <class Archive>
66  void serialize(Archive& ar, const unsigned int version);
67 
71  virtual void sample(long iStep);
72 
76  virtual void output();
77 
78  private:
79 
81  std::ofstream outputFile_;
82 
83  };
84 
85  /*
86  * Serialize to/from an archive.
87  */
88  template <class Archive>
89  void MdEnergyOutput::serialize(Archive& ar, const unsigned int version)
90  { Analyzer::serialize(ar, version); }
91 
92 }
93 #endif
File containing preprocessor macros for error handling.
void serialize(Archive &ar, PairSelector &selector, const unsigned int version)
Serialize a PairSelector.
Definition: PairSelector.h:167
void serialize(Archive &ar, const unsigned int version)
Serialize to/from an archive.
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).
A System for Molecular Dynamics simulation.
Definition: MdSystem.h:68
Analyzer to output total potential and kinetic energies.