Simpatico  v1.10
MdIntegrator.h
1 #ifndef MCMD_MD_INTEGRATOR_H
2 #define MCMD_MD_INTEGRATOR_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 <util/param/ParamComposite.h> // base class
12 #include <simp/boundary/Boundary.h> // typedef
13 
14 #include <iostream>
15 
16 namespace McMd
17 {
18 
19  using namespace Util;
20  using namespace Simp;
21 
22  class Simulation;
23  class MdSystem;
24 
31  {
32 
33  public:
34 
40  MdIntegrator(MdSystem& system);
41 
45  virtual ~MdIntegrator();
46 
53  virtual void setup()
54  {}
55 
59  virtual void step() = 0;
60 
64  Boundary& boundary();
65 
69  MdSystem& system();
70 
74  Simulation& simulation();
75 
76  protected:
77 
79  double dt_;
80 
81  private:
82 
84  Boundary* boundaryPtr_;
85 
87  MdSystem* systemPtr_;
88 
90  Simulation* simulationPtr_;
91 
92  };
93 
94  // Inline methods
95 
96  /*
97  * Get Boundary of parent System.
98  */
100  { return *boundaryPtr_; }
101 
102  /*
103  * Get parent MdSystem.
104  */
106  { return *systemPtr_; }
107 
108  /*
109  * Get parent Simulation.
110  */
112  { return *simulationPtr_; }
113 
114 }
115 #endif
An orthorhombic periodic unit cell.
Boundary & boundary()
Get Boundary of parent System by reference.
Definition: MdIntegrator.h:99
Classes used by all simpatico molecular simulations.
virtual void setup()
Initialize internal state, if any.
Definition: MdIntegrator.h:53
Simulation & simulation()
Get parent Simulation by reference.
Definition: MdIntegrator.h:111
The main object in a simulation, which coordinates others.
Abstract base for molecular dynamics integrators.
Definition: MdIntegrator.h:30
MdSystem & system()
Get parent MdSystem by reference.
Definition: MdIntegrator.h:105
Utility classes for scientific computation.
Definition: accumulators.mod:1
double dt_
Integrator time step.
Definition: MdIntegrator.h:79
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A System for Molecular Dynamics simulation.
Definition: MdSystem.h:68
An object that can read multiple parameters from file.