Simpatico  v1.10
NvtDpdVvIntegrator.h
1 #ifndef MCMD_NVT_DPD_VV_INTEGRATOR_H
2 #define MCMD_NVT_DPD_VV_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 <mcMd/mdIntegrators/MdIntegrator.h>
12 #include <util/containers/DArray.h>
13 #include <util/space/Vector.h>
14 
15 #include <iostream>
16 
17 namespace Util {
18  class Random;
19 }
20 namespace Simp {
21  class EnergyEnsemble;
22 }
23 
24 namespace McMd
25 {
26 
27  class PairList;
28 
29  using namespace Util;
30  using namespace Simp;
31 
41  {
42 
43  public:
44 
51 
55  virtual ~NvtDpdVvIntegrator();
56 
62  virtual void readParameters(std::istream &in);
63 
69  virtual void loadParameters(Serializable::IArchive& ar);
70 
76  virtual void save(Serializable::OArchive& ar);
77 
81  virtual void setup();
82 
86  virtual void step();
87 
88  private:
89 
90  static const int MaxAtomType;
91 
93  DArray<Vector> dissipativeForces_;
94 
96  DArray<Vector> randomForces_;
97 
99  DArray<double> dtMinvFactors_;
100 
102  double cutoff_;
103 
105  double gamma_;
106 
108  double sigma_;
109 
111  double temperature_;
112 
114  double cutoffSq_;
115 
117  const PairList* pairListPtr_;
118 
120  const Boundary* boundaryPtr_;
121 
123  Random* randomPtr_;
124 
126  const EnergyEnsemble* energyEnsemblePtr_;
127 
129  int atomCapacity_;
130 
132  bool isInitialized_;
133 
134  /*
135  * Calculate random and dissipative DPD forces.
136  *
137  * This function computes and stores dissipative forces on all
138  * atoms, and computes and random forces iff computeRandom is
139  * true. Dissipative and random forces are stored in separate
140  * arrays from the conservative atomic forces.
141  *
142  * \param computeRandom If true compute new random forces.
143  */
144  void computeDpdForces(bool computeRandom);
145 
146  };
147 
148 }
149 #endif
An orthorhombic periodic unit cell.
A Verlet neighbor list.
Classes used by all simpatico molecular simulations.
Abstract base for molecular dynamics integrators.
Definition: MdIntegrator.h:30
Saving / output archive for binary ostream.
A statistical ensemble for energy.
Utility classes for scientific computation.
Definition: accumulators.mod:1
A velocity-Verlet dissipative particle dynamics (DPD) integrator.
Dynamically allocatable contiguous array template.
Definition: DArray.h:31
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A System for Molecular Dynamics simulation.
Definition: MdSystem.h:68
Random number generator.
Definition: Random.h:46