Simpatico  v1.10
mcMd/analyzers/trajectory/LammpsDumpWriter.h
1 #ifndef MCMD_CONFIG_WRITER_H
2 #define MCMD_CONFIG_WRITER_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>
12 #include <mcMd/simulation/System.h>
13 
14 namespace McMd
15 {
16 
17  using namespace Util;
18 
24  class LammpsDumpWriter : public SystemAnalyzer<System>
25  {
26 
27  public:
28 
34  LammpsDumpWriter(System& system);
35 
40  {}
41 
47  virtual void readParameters(std::istream& in);
48 
54  virtual void save(Serializable::OArchive& ar);
55 
61  virtual void loadParameters(Serializable::IArchive& ar);
62 
69  template <class Archive>
70  void serialize(Archive& ar, const unsigned int version);
71 
75  virtual void setup();
76 
82  virtual void sample(long iStep);
83 
87  virtual void output();
88 
89  private:
90 
91  // Output file stream
92  std::ofstream outputFile_;
93 
95  long nSample_;
96 
98  long isInitialized_;
99 
100  };
101 
102  /*
103  * Serialize to/from an archive.
104  */
105  template <class Archive>
106  void LammpsDumpWriter::serialize(Archive& ar, const unsigned int version)
107  {
108  Analyzer::serialize(ar, version);
109  ar & nSample_;
110  }
111 
112 }
113 #endif
void serialize(Archive &ar, const unsigned int version)
Serialize to/from an archive.
A set of interacting Molecules enclosed by a Boundary.
Definition: System.h:115
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.
Periodically write snapshots to a lammps dump (i.e., trajectory) file.
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).