Simpatico  v1.10
tools/analyzers/AtomMSD.h
1 #ifndef TOOLS_ATOM_MSD_H
2 #define TOOLS_ATOM_MSD_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 <tools/analyzers/Analyzer.h> // base class template
12 #include <util/accumulators/MeanSqDispArray.h> // member template
13 #include <util/space/Vector.h> // member template parameter
14 #include <util/containers/DArray.h> // member template
15 
16 namespace Tools
17 {
18 
19  using namespace Util;
20 
26  class AtomMSD : public Analyzer
27  {
28 
29  public:
30 
36  AtomMSD(Processor &processor);
37 
44  AtomMSD(Configuration &configuration, FileMaster& fileMaster);
45 
51  virtual void readParameters(std::istream& in);
52 
56  virtual void setup();
57 
63  virtual void sample(long iStep);
64 
68  virtual void output();
69 
70  private:
71 
73  std::ofstream outputFile_;
74 
76  MeanSqDispArray<Vector> accumulator_;
77 
79  DArray<Vector> truePositions_;
80 
82  DArray<Vector> oldPositions_;
83 
85  DArray<IntVector> shifts_;
86 
88  int speciesId_;
89 
91  int atomId_;
92 
94  int nMolecule_;
95 
97  int capacity_;
98 
100  int isInitialized_;
101 
102  };
103 
104 }
105 #endif
Mean-squared displacement of specific atoms in specific species.
A post-processor for analyzing outputs of MD simulations.
Definition: Processor.h:30
Abstract base for periodic output and/or analysis actions.
An instantaneous molecular dynamics configuration.
Definition: Configuration.h:40
Utility classes for scientific computation.
Definition: accumulators.mod:1
Single-processor classes for pre- and post-processing MD trajectories.
Mean-squared displacement (MSD) vs.
A FileMaster manages input and output files for a simulation.
Definition: FileMaster.h:142
Dynamically allocatable contiguous array template.
Definition: DArray.h:31