Redefine the default boolean type to gmx_bool.
[alexxy/gromacs.git] / src / kernel / openmm_wrapper.cpp
index 6e61dec5175f89fcb1aa3b4b9af4cdb94294aaee..d043f0756f702b46b4ed653203c54cca55d98bd1 100644 (file)
  * https://simtk.org/project/xml/downloads.xml?group_id=161#package_id600
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <types/simple.h>
 #include <cmath>
 #include <set>
 #include <iostream>
@@ -84,7 +89,7 @@ using namespace OpenMM;
  * \param[out] t    Destination variable to convert to.
  */
 template <class T>
-static bool from_string(T& t, const string& s, ios_base& (*f)(ios_base&))
+static gmx_bool from_string(T& t, const string& s, ios_base& (*f)(ios_base&))
 {
     istringstream iss(s);
     return !(iss >> f >> t).fail();
@@ -137,7 +142,7 @@ static void splitOptionValue(const string &s, string &opt, string &val)
                  integer less than, equal to, or greater than 0 if \p s1 less than, 
                  identical to, or greater than \p s2.
  */
-static bool isStringEqNCase(const string s1, const string s2)
+static gmx_bool isStringEqNCase(const string s1, const string s2)
 {
     return (gmx_strncasecmp(s1.c_str(), s2.c_str(), max(s1.length(), s2.length())) == 0);
 }
@@ -378,7 +383,7 @@ public:
     System* system;      /*! The system to simulate. */
     Context* context;   /*! The OpenMM context in which the simulation is carried out. */
     Integrator* integrator; /*! The integrator used in the simulation. */
-    bool removeCM;          /*! If \true remove venter of motion, false otherwise. */
+    gmx_bool removeCM;          /*! If \true remove venter of motion, false otherwise. */
     GmxOpenMMPlatformOptions *platformOpt; /*! Platform options. */
 };
 
@@ -756,7 +761,7 @@ void* openmm_init(FILE *fplog, const char *platformOptStr,
 {
 
     char warn_buf[STRLEN];
-    static bool hasLoadedPlugins = false;
+    static gmx_bool hasLoadedPlugins = false;
     string usedPluginDir;
     int devId;
 
@@ -1416,7 +1421,7 @@ void openmm_cleanup(FILE* fplog, void* data)
 void openmm_copy_state(void *data,
                        t_state *state, double *time,
                        rvec f[], gmx_enerdata_t *enerd,
-                       bool includePos, bool includeVel, bool includeForce, bool includeEnergy)
+                       gmx_bool includePos, gmx_bool includeVel, gmx_bool includeForce, gmx_bool includeEnergy)
 {
     int types = 0;
     if (includePos)