Simpatico  v1.10
mcMd/analyzers/system/StructureFactorGrid.h
1 #ifndef MCMD_STRUCTURE_FACTOR_GRID_H
2 #define MCMD_STRUCTURE_FACTOR_GRID_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include "StructureFactor.h"
12 #include <util/crystal/LatticeSystem.h>
13 
14 namespace McMd
15 {
16 
17  using namespace Util;
18 
62  {
63 
64  public:
65 
71  StructureFactorGrid(System &system);
72 
86  virtual void readParameters(std::istream& in);
87 
93  virtual void loadParameters(Serializable::IArchive& ar);
94 
100  virtual void save(Serializable::OArchive& ar);
101 
108  template <class Archive>
109  void serialize(Archive& ar, const unsigned int version);
110 
114  virtual void setup();
115 
119  virtual void output();
120 
126  virtual void sample(long iStep);
127 
128  private:
129 
131  DArray<int> starIds_;
132 
134  DArray<int> starSizes_;
135 
137  int hMax_;
138 
140  int nStar_;
141 
143  LatticeSystem lattice_;
144 
146  bool isInitialized_;
147 
149  std::ofstream logFile_;
150  };
151 
152 
153  /*
154  * Serialize to/from an archive.
155  */
156  template <class Archive>
157  void StructureFactorGrid::serialize(Archive& ar, const unsigned int version)
158  {
159  StructureFactor::serialize(ar, version);
160  ar & hMax_;
161  //serializeEnum(ar, lattice_);
162  ar & lattice_;
163  ar & nStar_;
164  ar & starIds_;
165  ar & starSizes_;
166  }
167 
168 }
169 #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.
StructureFactorGrid evaluates structure factors in Fourier space.
Utility classes for scientific computation.
Definition: accumulators.mod:1
void serialize(Archive &ar, const unsigned int version)
Serialize to/from an archive.
StructureFactor evaluates structure factors in Fourier space.
Saving archive for binary istream.
LatticeSystem
Enumeration of the 7 possible Bravais lattice systems.
Definition: LatticeSystem.h:29
Single-processor Monte Carlo (MC) and molecular dynamics (MD).