Simpatico  v1.10
PairEnergy.h
1 #ifndef TOOLS_PAIR_ENERGY_H
2 #define TOOLS_PAIR_ENERGY_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
12 #include <tools/neighbor/CellList.h> // member
13 #include <simp/interaction/pair/LJPair.h> // member
14 #include <tools/neighbor/CellList.h> // member
15 #include <util/containers/GArray.h> // member
16 
17 namespace Tools
18 {
19 
23  class PairEnergy : public Analyzer
24  {
25  public:
26 
33 
39  PairEnergy(Processor &processor);
40 
48 
54  virtual void readParameters(std::istream& in);
55 
59  virtual void setup();
60 
66  virtual void sample(long iStep);
67 
71  virtual void output();
72 
73  private:
74 
76  typedef Simp::LJPair Interaction;
77 
78  // TODO: Generalize to other interaction types
79 
81  std::ofstream outputFile_;
82 
84  Interaction interaction_;
85 
87  CellList cellList_;
88 
90  double cutoff_;
91 
93  int atomCapacity_;
94 
96  int isInitialized_;
97 
99  GArray<int> timesteps_;
100 
102  GArray<double> energies_;
103 
104  };
105 
106 }
107 #endif
PairEnergy(Configuration &configuration)
Constructor.
Definition: PairEnergy.cpp:21
A post-processor for analyzing outputs of MD simulations.
Definition: Processor.h:30
A cell list used only to identify nearby atom pairs.
virtual void readParameters(std::istream &in)
Read parameters from file.
Definition: PairEnergy.cpp:56
Abstract base for periodic output and/or analysis actions.
An instantaneous molecular dynamics configuration.
Definition: Configuration.h:40
Analyzer to compute total nonbonded pair energy.
Definition: PairEnergy.h:23
virtual void sample(long iStep)
Compute nonbonded pair energy.
Definition: PairEnergy.cpp:92
virtual void output()
Output final results to file.
Definition: PairEnergy.cpp:173
Configuration & configuration()
Get the parent Configuration by reference.
Single-processor classes for pre- and post-processing MD trajectories.
A FileMaster manages input and output files for a simulation.
Definition: FileMaster.h:142
virtual void setup()
Setup before main loop.
Definition: PairEnergy.cpp:75
A cutoff, shifted Lennard-Jones nonbonded pair interaction.
Definition: LJPair.h:33
FileMaster & fileMaster()
Get an associated FileMaster by reference.