Commit 274be989 authored by Peter Eastman's avatar Peter Eastman
Browse files

More fixes to compilation errors

parent 55081e21
......@@ -72,7 +72,7 @@ private:
* of two other particle's locations. Assuming the weights add up to 1, this means
* the virtual site is on the line passing through the two particles.
*/
class TwoParticleAverageSite : public VirtualSite {
class OPENMM_EXPORT TwoParticleAverageSite : public VirtualSite {
public:
/**
* Create a new TwoParticleAverageSite virtual site. Normally weight1 and weight2
......@@ -100,7 +100,7 @@ private:
* of three other particle's locations. Assuming the weights add up to 1, this means
* the virtual site is in the plane of the three particles.
*/
class ThreeParticleAverageSite : public VirtualSite {
class OPENMM_EXPORT ThreeParticleAverageSite : public VirtualSite {
public:
/**
* Create a new ThreeParticleAverageSite virtual site. Normally the weights
......@@ -137,7 +137,7 @@ private:
* The three weight factors are user-specified. This allows the virtual site location
* to be out of the plane of the three particles.
*/
class OutOfPlaneSite : public VirtualSite {
class OPENMM_EXPORT OutOfPlaneSite : public VirtualSite {
public:
/**
* Create a new OutOfPlaneSite virtual site.
......
......@@ -99,12 +99,12 @@ __kernel void distributeForces(__global const float4* restrict posq, __global fl
float4 f1 = force[atoms.y];
float4 f2 = force[atoms.z];
float4 f3 = force[atoms.w];
float4 fp2 = (float4) (weights.x*f.x - weights.z*v13.z*f.y + weights.z*v13.y*f[2],
weights.z*v13.z*f.x + weights.x*f.y - weights.z*v13.x*f[2],
float4 fp2 = (float4) (weights.x*f.x - weights.z*v13.z*f.y + weights.z*v13.y*f.z,
weights.z*v13.z*f.x + weights.x*f.y - weights.z*v13.x*f.z,
-weights.z*v13.y*f.x + weights.z*v13.x*f.y + weights.x*f.z, 0.0f);
float4 fp3 = (float4) (weights.y*f.x + weights.z*v12[2]*f.y - weights.z*v12.y*f.z,
-weights.z*v12[2]*f.x + weights.y*f.y + weights.z*v12.x*f.z,
weights.z*v12.y*f.x - weights.z*v12.x*f.y + weights.y*f[2], 0.0f);
float4 fp3 = (float4) (weights.y*f.x + weights.z*v12.z*f.y - weights.z*v12.y*f.z,
-weights.z*v12.z*f.x + weights.y*f.y + weights.z*v12.x*f.z,
weights.z*v12.y*f.x - weights.z*v12.x*f.y + weights.y*f.z, 0.0f);
f1.xyz += f.xyz-fp2.xyz-fp3.xyz;
f2.xyz += fp2.xyz;
f3.xyz += fp3.xyz;
......
......@@ -220,7 +220,7 @@ void ReferenceCustomDynamics::update(ContextImpl& context, int numberOfAtoms, ve
recordChangedParameters(context, globals);
}
RealOpenMM ReferenceCustomDynamics::computePerDof(int numberOfAtoms, vector<RealVec>& results, const vector<RealVec>& atomCoordinates,
void ReferenceCustomDynamics::computePerDof(int numberOfAtoms, vector<RealVec>& results, const vector<RealVec>& atomCoordinates,
const vector<RealVec>& velocities, const vector<RealVec>& forces, const vector<RealOpenMM>& masses,
const map<string, RealOpenMM>& globals, const vector<vector<RealVec> >& perDof, const Lepton::ExpressionProgram& expression) {
// Loop over all degrees of freedom.
......
......@@ -48,7 +48,7 @@ private:
std::vector<bool> invalidatesForces, needsForces, needsEnergy;
RealOpenMM energy;
RealOpenMM computePerDof(int numberOfAtoms, std::vector<OpenMM::RealVec>& results, const std::vector<OpenMM::RealVec>& atomCoordinates,
void computePerDof(int numberOfAtoms, std::vector<OpenMM::RealVec>& results, const std::vector<OpenMM::RealVec>& atomCoordinates,
const std::vector<OpenMM::RealVec>& velocities, const std::vector<OpenMM::RealVec>& forces, const std::vector<RealOpenMM>& masses,
const std::map<std::string, RealOpenMM>& globals, const std::vector<std::vector<OpenMM::RealVec> >& perDof, const Lepton::ExpressionProgram& expression);
......
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