Simpatico  v1.10
DCDTrajectoryReader.h
1 #ifndef MCMD_DCD_TRAJECTORY_READER_H
2 #define MCMD_DCD_TRAJECTORY_READER_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/trajectory/TrajectoryReader.h> // base class
12 #include <simp/boundary/Boundary.h> // typedef
13 #include <util/containers/DArray.h> // member
14 
15 #include <fstream>
16 
17 namespace McMd
18 {
19 
20  using namespace Util;
21  using namespace Simp;
22 
33  {
34 
35  public:
36 
40  DCDTrajectoryReader(System& system);
41 
45  virtual ~DCDTrajectoryReader();
46 
52  void open(std::string filename);
53 
59  bool readFrame();
60 
64  void close();
65 
66  private:
67 
69  std::fstream file_;
70 
72  int nAtoms_;
73 
75  int nFrames_;
76 
78  int frameId_;
79 
81  DArray<float> xBuffer_;
82 
84  DArray<float> yBuffer_;
85 
87  DArray<float> zBuffer_;
88 
89  };
90 
91 }
92 #endif
TrajectoryReader for CHARMM ".dcd" data files.
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
Trajectory file reader (base class).
Single-processor Monte Carlo (MC) and molecular dynamics (MD).