Commit 593d359c authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Various MSVC build issues:

  sqrt of an integer is ambiguous
  methods declared to return a value must return a value
parent cf36f2e6
......@@ -52,7 +52,7 @@ ReferenceCMAPTorsionIxn::ReferenceCMAPTorsionIxn(const vector<vector<vector<Real
--------------------------------------------------------------------------------------- */
void ReferenceCMAPTorsionIxn::calculateIxn(RealOpenMM** atomCoordinates, RealOpenMM** forces, RealOpenMM* totalEnergy) const {
for (int i = 0; i < torsionMaps.size(); i++)
for (unsigned int i = 0; i < torsionMaps.size(); i++)
calculateOneIxn(i, atomCoordinates, forces, totalEnergy);
}
......@@ -113,7 +113,7 @@ void ReferenceCMAPTorsionIxn::calculateOneIxn(int index, RealOpenMM** atomCoordi
// Identify which patch this is in.
int size = (int) SQRT(coeff[map].size());
int size = (int) SQRT(double(coeff[map].size()));
RealOpenMM delta = 2*M_PI/size;
int s = (int) (angleA/delta);
int t = (int) (angleB/delta);
......@@ -190,4 +190,5 @@ void ReferenceCMAPTorsionIxn::calculateOneIxn(int index, RealOpenMM** atomCoordi
int ReferenceCMAPTorsionIxn::calculateBondIxn(int* atomIndices, RealOpenMM** atomCoordinates,
RealOpenMM* parameters, RealOpenMM** forces, RealOpenMM* energyByBond, RealOpenMM* energyByAtom) const {
return 0; // but it must return a value to avoid MSVC compile error
}
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