Simpatico  v1.10
McSystemInterface.h
1 #ifndef MCMD_MC_SYSTEM_INTERFACE_H
2 #define MCMD_MC_SYSTEM_INTERFACE_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/simulation/SystemInterface.h> // base class
12 
13 namespace McMd
14 {
15 
16  using namespace Util;
17 
18  class McSystem;
19  class McPairPotential;
20  class BondPotential;
21  class AnglePotential;
22  class DihedralPotential;
23  class ExternalPotential;
24 
31  {
32 
33  public:
34 
40  McSystemInterface(McSystem& mcSystem);
41 
45  virtual ~McSystemInterface();
46 
47  protected:
48 
49  #ifndef SIMP_NOPAIR
50 
53  McPairPotential& pairPotential() const;
54  #endif
55 
56  #ifdef SIMP_BOND
57 
60  BondPotential& bondPotential() const;
61  #endif
62 
63  #ifdef SIMP_ANGLE
64 
67  AnglePotential& anglePotential() const;
68  #endif
69 
70  #ifdef SIMP_DIHEDRAL
71 
74  DihedralPotential& dihedralPotential() const;
75  #endif
76 
77  #ifdef SIMP_EXTERNAL
78 
81  ExternalPotential& externalPotential() const;
82  #endif
83 
84  private:
85 
86  #ifndef SIMP_NOPAIR
87  McPairPotential* pairPotentialPtr_;
88  #endif
89 
90  #ifdef SIMP_BOND
91  BondPotential* bondPotentialPtr_;
92  #endif
93 
94  #ifdef SIMP_ANGLE
95  AnglePotential* anglePotentialPtr_;
96  #endif
97 
98  #ifdef SIMP_DIHEDRAL
99  DihedralPotential* dihedralPotentialPtr_;
100  #endif
101 
102  #ifdef SIMP_EXTERNAL
103  ExternalPotential* externalPotentialPtr_;
104  #endif
105 
106  };
107 
108  // Inline methods
109 
110  #ifndef SIMP_NOPAIR
111  /*
112  * Get McPairPotential of McSystem.
113  */
115  { return *pairPotentialPtr_; }
116  #endif
117 
118  #ifdef SIMP_BOND
119  /*
120  * Get the BondPotential.
121  */
123  { return *bondPotentialPtr_; }
124  #endif
125 
126  #ifdef SIMP_ANGLE
127  /*
128  * Get AnglePotential.
129  */
131  { return *anglePotentialPtr_; }
132  #endif
133 
134  #ifdef SIMP_DIHEDRAL
135  /*
136  * Get DihedralPotential.
137  */
139  { return *dihedralPotentialPtr_; }
140  #endif
141 
142  #ifdef SIMP_EXTERNAL
143  /*
144  * Get ExternalPotential.
145  */
147  { return *externalPotentialPtr_; }
148  #endif
149 
150 }
151 #endif
A System for use in a Markov chain Monte Carlo simulation.
Definition: McSystem.h:52
Interface for a Angle Interaction.
AnglePotential & anglePotential() const
Get the AnglePotential.
An interface to a System.
A PairPotential for MC simulations (abstract).
McPairPotential & pairPotential() const
Get the McPairPotential.
Interface for a Dihedral Potential.
Abstract External Potential class.
Utility classes for scientific computation.
Definition: accumulators.mod:1
An interface to an McSystem.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
ExternalPotential & externalPotential() const
Get the ExternalPotential.
Abstract Bond Potential class.
DihedralPotential & dihedralPotential() const
Get the DihedralPotential.
BondPotential & bondPotential() const
Get the BondPotential.