Simpatico  v1.10
ddMd/analyzers/scattering/VanHove.h
1 #ifndef DDMD_VAN_HOVE_H
2 #define DDMD_VAN_HOVE_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 #include <ddMd/analyzers/Analyzer.h>
11 #include <ddMd/simulation/Simulation.h>
12 #include <util/containers/DArray.h> // member template
13 #include <util/containers/DMatrix.h> // member template
14 #include <util/accumulators/AutoCorr.h> // member template parameter
15 #include <util/space/Vector.h> // member template parameter
16 
17 #include <util/global.h>
18 
19 #include <iostream>
20 #include <complex>
21 
22 namespace DdMd
23 {
24 
25  using namespace Util;
26 
77  class VanHove : public Analyzer
78  {
79  public:
80 
86  VanHove(Simulation &simulation);
87 
91  ~VanHove();
92 
107  virtual void readParameters(std::istream& in);
108 
114  virtual void loadParameters(Serializable::IArchive& ar);
115 
121  virtual void save(Serializable::OArchive& ar);
122 
126  virtual void clear();
127 
133  void sample(long iStep);
134 
138  virtual void output();
139 
140  protected:
141 
143  std::ofstream outputFile_;
144 
146  DArray< AutoCorr< std::complex<double>, std::complex<double> > >
148 
151 
152  DArray< std::complex<double> > totalFourierModes_;
153 
156 
159 
162 
164  int nWave_;
165 
167  int nBuffer_;
168 
170  int nSample_;
171 
174 
177 
179  void makeWaveVectors();
180 
181  };
182 
183 }
184 #endif
Abstract base for periodic output and/or analysis actions.
int nBuffer_
Number of samples stored in history buffer.
Evaluates the van Hove function S(k,t) for one or more wavevector k.
DArray< Vector > waveVectors_
Array of wave vectors.
DArray< AutoCorr< std::complex< double >, std::complex< double > > > accumulators_
Autocorrelation function accumulators.
bool isInitialized_
Has readParam been called?
File containing preprocessor macros for error handling.
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
DArray< IntVector > waveIntVectors_
Array of miller index vectors for wavevectors.
Saving / output archive for binary ostream.
DArray< std::complex< double > > fourierModes_
Fourier modes. First index is wavevector, second is atom type.
Utility classes for scientific computation.
Definition: accumulators.mod:1
int nWave_
Number of wavevectors.
int nSample_
Number of samples thus far.
Dynamically allocatable contiguous array template.
Definition: DArray.h:31
Saving archive for binary istream.
std::ofstream outputFile_
Output file stream.
DArray< double > atomTypeCoeffs_
Array of coefficients for atom types.
int nAtomType_
Number of atom types, copied from Simulation::nAtomType().