Commit ff4827b4 authored by Lee-Ping's avatar Lee-Ping
Browse files

Changed the variable type of anisotropic from int to bool.

parent 6f09ac01
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
* @param frequency the frequency at which Monte Carlo pressure changes should be attempted (in time steps) * @param frequency the frequency at which Monte Carlo pressure changes should be attempted (in time steps)
* @param anisotropic switch to determine whether anisotropic barostat (independent xyz-coordinate scaling) is turned on. * @param anisotropic switch to determine whether anisotropic barostat (independent xyz-coordinate scaling) is turned on.
*/ */
MonteCarloBarostat(double defaultPressure, double temperature, int frequency = 25, int anisotropic = 0); MonteCarloBarostat(double defaultPressure, double temperature, int frequency = 25, bool anisotropic = 0);
/** /**
* Get the default pressure acting on the system (in bar). * Get the default pressure acting on the system (in bar).
* *
...@@ -84,7 +84,7 @@ public: ...@@ -84,7 +84,7 @@ public:
/** /**
* Set the switch which specifies whether anisotropic barostat is turned on. 1 = On, 0 = Off * Set the switch which specifies whether anisotropic barostat is turned on. 1 = On, 0 = Off
*/ */
void setAnisotropic(int aniso) { void setAnisotropic(bool aniso) {
anisotropic = aniso; anisotropic = aniso;
} }
/** /**
...@@ -135,7 +135,8 @@ protected: ...@@ -135,7 +135,8 @@ protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
double defaultPressure, temperature; double defaultPressure, temperature;
int frequency, anisotropic, randomNumberSeed; int frequency, randomNumberSeed;
bool anisotropic;
double GetTemperature() const { double GetTemperature() const {
return temperature; return temperature;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
using namespace OpenMM; using namespace OpenMM;
MonteCarloBarostat::MonteCarloBarostat(double defaultPressure, double temperature, int frequency, int anisotropic) : MonteCarloBarostat::MonteCarloBarostat(double defaultPressure, double temperature, int frequency, bool anisotropic) :
defaultPressure(defaultPressure), temperature(temperature), frequency(frequency), anisotropic(anisotropic) { defaultPressure(defaultPressure), temperature(temperature), frequency(frequency), anisotropic(anisotropic) {
setRandomNumberSeed((int) time(NULL)); setRandomNumberSeed((int) time(NULL));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment