All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MonteCarloAnisotropicBarostat.h
#ifndef OPENMM_MONTECARLOANISOTROPICBAROSTAT_H_
#define OPENMM_MONTECARLOANISOTROPICBAROSTAT_H_
/* -------------------------------------------------------------------------- *
* OpenMM *
* -------------------------------------------------------------------------- *
* This is part of the OpenMM molecular simulation toolkit originating from *
* Simbios, the NIH National Center for Physics-Based Simulation of *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2010-2013 Stanford University and the Authors. *
* Authors: Peter Eastman, Lee-Ping Wang *
* Contributors: *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the "Software"), *
* to deal in the Software without restriction, including without limitation *
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
* and/or sell copies of the Software, and to permit persons to whom the *
* Software is furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
* THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
#include "Force.h"
#include "Vec3.h"
#include <string>
#include "internal/windowsExport.h"
namespace OpenMM {
class OPENMM_EXPORT MonteCarloAnisotropicBarostat : public Force {
public:
static const std::string& PressureX() {
static const std::string key = "MonteCarloPressureX";
return key;
}
static const std::string& PressureY() {
static const std::string key = "MonteCarloPressureY";
return key;
}
static const std::string& PressureZ() {
static const std::string key = "MonteCarloPressureZ";
return key;
}
MonteCarloAnisotropicBarostat(const Vec3& defaultPressure, double temperature, bool scaleX = true, bool scaleY = true, bool scaleZ = true, int frequency = 25);
const Vec3& getDefaultPressure() const {
return defaultPressure;
}
void setDefaultPressure(const Vec3& pressure) {
defaultPressure = pressure;
}
bool getScaleX() const {
return scaleX;
}
bool getScaleY() const {
return scaleY;
}
bool getScaleZ() const {
return scaleZ;
}
int getFrequency() const {
return frequency;
}
void setFrequency(int freq) {
frequency = freq;
}
double getTemperature() const {
return temperature;
}
void setTemperature(double temp) {
temperature = temp;
}
int getRandomNumberSeed() const {
return randomNumberSeed;
}
void setRandomNumberSeed(int seed) {
randomNumberSeed = seed;
}
bool usesPeriodicBoundaryConditions() const {
return true;
}
protected:
ForceImpl* createImpl() const;
private:
Vec3 defaultPressure;
double temperature;
bool scaleX, scaleY, scaleZ;
int frequency, randomNumberSeed;
};
} // namespace OpenMM
#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