OpenMM

- Main Page
- Related Pages
- Classes

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MonteCarloAnisotropicBarostat.h
1 #ifndef OPENMM_MONTECARLOANISOTROPICBAROSTAT_H_
2 #define OPENMM_MONTECARLOANISOTROPICBAROSTAT_H_
3
4 /* -------------------------------------------------------------------------- *
5 * OpenMM *
6 * -------------------------------------------------------------------------- *
7 * This is part of the OpenMM molecular simulation toolkit originating from *
8 * Simbios, the NIH National Center for Physics-Based Simulation of *
9 * Biological Structures at Stanford, funded under the NIH Roadmap for *
10 * Medical Research, grant U54 GM072970. See https://simtk.org. *
11 * *
12 * Portions copyright (c) 2010-2013 Stanford University and the Authors. *
13 * Authors: Peter Eastman, Lee-Ping Wang *
14 * Contributors: *
15 * *
16 * Permission is hereby granted, free of charge, to any person obtaining a *
17 * copy of this software and associated documentation files (the "Software"), *
18 * to deal in the Software without restriction, including without limitation *
19 * the rights to use, copy, modify, merge, publish, distribute, sublicense, *
20 * and/or sell copies of the Software, and to permit persons to whom the *
21 * Software is furnished to do so, subject to the following conditions: *
22 * *
23 * The above copyright notice and this permission notice shall be included in *
24 * all copies or substantial portions of the Software. *
25 * *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
27 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
28 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
29 * THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
30 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
31 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
32 * USE OR OTHER DEALINGS IN THE SOFTWARE. *
33 * -------------------------------------------------------------------------- */
34
35 #include "Force.h"
36 #include "Vec3.h"
37 #include <string>
38 #include "internal/windowsExport.h"
39
40 namespace OpenMM {
41
58 class OPENMM_EXPORT MonteCarloAnisotropicBarostat : public Force {
59 public:
64 static const std::string& PressureX() {
65 static const std::string key = "MonteCarloPressureX";
66 return key;
67 }
72 static const std::string& PressureY() {
73 static const std::string key = "MonteCarloPressureY";
74 return key;
75 }
80 static const std::string& PressureZ() {
81 static const std::string key = "MonteCarloPressureZ";
82 return key;
83 }
94 MonteCarloAnisotropicBarostat(const Vec3& defaultPressure, double temperature, bool scaleX = true, bool scaleY = true, bool scaleZ = true, int frequency = 25);
100 const Vec3& getDefaultPressure() const {
101 return defaultPressure;
102 }
109 void setDefaultPressure(const Vec3& pressure) {
110 defaultPressure = pressure;
111 }
115 bool getScaleX() const {
116 return scaleX;
117 }
121 bool getScaleY() const {
122 return scaleY;
123 }
127 bool getScaleZ() const {
128 return scaleZ;
129 }
134 int getFrequency() const {
135 return frequency;
136 }
141 void setFrequency(int freq) {
142 frequency = freq;
143 }
147 double getTemperature() const {
148 return temperature;
149 }
155 void setTemperature(double temp) {
156 temperature = temp;
157 }
161 int getRandomNumberSeed() const {
162 return randomNumberSeed;
163 }
175 void setRandomNumberSeed(int seed) {
176 randomNumberSeed = seed;
177 }
184 bool usesPeriodicBoundaryConditions() const {
185 return true;
186 }
187 protected:
188 ForceImpl* createImpl() const;
189 private:
190 Vec3 defaultPressure;
191 double temperature;
192 bool scaleX, scaleY, scaleZ;
193 int frequency, randomNumberSeed;
194 };
195
196 } // namespace OpenMM
197
198 #endif /*OPENMM_MONTECARLOANISOTROPICBAROSTAT_H_*/
OpenMM::MonteCarloAnisotropicBarostat::setTemperature
void setTemperature(double temp)
Set the temperature at which the system is being maintained.
Definition: MonteCarloAnisotropicBarostat.h:155
OpenMM::MonteCarloAnisotropicBarostat::getScaleY
bool getScaleY() const
Get whether to allow the Y dimension of the periodic box to change size.
Definition: MonteCarloAnisotropicBarostat.h:121
OpenMM::MonteCarloAnisotropicBarostat
This class uses a Monte Carlo algorithm to adjust the size of the periodic box, simulating the effect...
Definition: MonteCarloAnisotropicBarostat.h:58
OpenMM::MonteCarloAnisotropicBarostat::getDefaultPressure
const Vec3 & getDefaultPressure() const
Get the default pressure (in bar).
Definition: MonteCarloAnisotropicBarostat.h:100
OpenMM::MonteCarloAnisotropicBarostat::PressureZ
static const std::string & PressureZ()
This is the name of the parameter which stores the current pressure acting on the Z-axis (in bar)...
Definition: MonteCarloAnisotropicBarostat.h:80
OpenMM::Force
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
OpenMM::MonteCarloAnisotropicBarostat::usesPeriodicBoundaryConditions
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: MonteCarloAnisotropicBarostat.h:184
OpenMM::MonteCarloAnisotropicBarostat::setDefaultPressure
void setDefaultPressure(const Vec3 &pressure)
Set the default pressure acting on the system.
Definition: MonteCarloAnisotropicBarostat.h:109
OpenMM::MonteCarloAnisotropicBarostat::getScaleX
bool getScaleX() const
Get whether to allow the X dimension of the periodic box to change size.
Definition: MonteCarloAnisotropicBarostat.h:115
OpenMM::Vec3
This class represents a three component vector.
Definition: Vec3.h:45
OpenMM::MonteCarloAnisotropicBarostat::getTemperature
double getTemperature() const
Get the temperature at which the system is being maintained, measured in Kelvin.
Definition: MonteCarloAnisotropicBarostat.h:147
OpenMM::MonteCarloAnisotropicBarostat::setFrequency
void setFrequency(int freq)
Set the frequency (in time steps) at which Monte Carlo pressure changes should be attempted...
Definition: MonteCarloAnisotropicBarostat.h:141
OpenMM::MonteCarloAnisotropicBarostat::PressureX
static const std::string & PressureX()
This is the name of the parameter which stores the current pressure acting on the X-axis (in bar)...
Definition: MonteCarloAnisotropicBarostat.h:64
OpenMM::MonteCarloAnisotropicBarostat::PressureY
static const std::string & PressureY()
This is the name of the parameter which stores the current pressure acting on the Y-axis (in bar)...
Definition: MonteCarloAnisotropicBarostat.h:72
OpenMM::MonteCarloAnisotropicBarostat::getRandomNumberSeed
int getRandomNumberSeed() const
Get the random number seed.
Definition: MonteCarloAnisotropicBarostat.h:161
OpenMM::MonteCarloAnisotropicBarostat::setRandomNumberSeed
void setRandomNumberSeed(int seed)
Set the random number seed.
Definition: MonteCarloAnisotropicBarostat.h:175
OpenMM::MonteCarloAnisotropicBarostat::getScaleZ
bool getScaleZ() const
Get whether to allow the Z dimension of the periodic box to change size.
Definition: MonteCarloAnisotropicBarostat.h:127
OpenMM
Definition: AndersenThermostat.h:40
OpenMM::MonteCarloAnisotropicBarostat::getFrequency
int getFrequency() const
Get the frequency (in time steps) at which Monte Carlo pressure changes should be attempted...
Definition: MonteCarloAnisotropicBarostat.h:134