Commit b518ad19 authored by peastman's avatar peastman
Browse files

Fixed compilation errors on Windows

parent 2b3e7d7a
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <cmath> #include <cmath>
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#include <algorithm>
using namespace OpenMM; using namespace OpenMM;
using namespace std; using namespace std;
...@@ -108,7 +109,7 @@ void LocalEnergyMinimizer::minimize(Context& context, double tolerance, int maxI ...@@ -108,7 +109,7 @@ void LocalEnergyMinimizer::minimize(Context& context, double tolerance, int maxI
if (x == NULL) if (x == NULL)
throw OpenMMException("LocalEnergyMinimizer: Failed to allocate memory"); throw OpenMMException("LocalEnergyMinimizer: Failed to allocate memory");
double constraintTol = context.getIntegrator().getConstraintTolerance(); double constraintTol = context.getIntegrator().getConstraintTolerance();
double workingConstraintTol = max(1e-4, constraintTol); double workingConstraintTol = std::max(1e-4, constraintTol);
double k = tolerance/workingConstraintTol; double k = tolerance/workingConstraintTol;
// Initialize the minimizer. // Initialize the minimizer.
......
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
* This tests the Cuda implementation of CudaAmoebaAngleForce. * This tests the Cuda implementation of CudaAmoebaAngleForce.
*/ */
#ifdef WIN32
#define _USE_MATH_DEFINES // Needed to get M_PI
#endif
#include "openmm/internal/AssertionUtilities.h" #include "openmm/internal/AssertionUtilities.h"
#include "openmm/Context.h" #include "openmm/Context.h"
#include "openmm/CustomAngleForce.h" #include "openmm/CustomAngleForce.h"
......
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