Commit a84a2997 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed bugs in CMAPTorsionForce

parent 551eb600
......@@ -133,7 +133,7 @@ void kCalculateCMAPTorsionForces_kernel(int numAtoms, int numTorsions, float4* f
int s = (int) (angleA/delta);
int t = (int) (angleB/delta);
float4 c[4];
int coeffIndex = 4*(pos.x+s+size*t);
int coeffIndex = pos.x+4*(s+size*t);
c[0] = coeff[coeffIndex];
c[1] = coeff[coeffIndex+1];
c[2] = coeff[coeffIndex+2];
......
......@@ -71,7 +71,7 @@ __kernel void computeCMAPTorsionForces(int numAtoms, int numTorsions, __global f
int s = (int) (angleA/delta);
int t = (int) (angleB/delta);
float4 c[4];
int coeffIndex = 4*(pos.x+s+size*t);
int coeffIndex = pos.x+4*(s+size*t);
c[0] = coeff[coeffIndex];
c[1] = coeff[coeffIndex+1];
c[2] = coeff[coeffIndex+2];
......
......@@ -49,7 +49,7 @@ void CMAPTorsionForceProxy::serialize(const void* object, SerializationNode& nod
int size;
vector<double> energy;
force.getMapParameters(i, size, energy);
SerializationNode& map = maps.createChildNode("Torsion").setIntProperty("size", size);
SerializationNode& map = maps.createChildNode("Map").setIntProperty("size", size);
for (int i = 0; i < (int) energy.size(); i++)
map.createChildNode("Energy").setDoubleProperty("e", energy[i]);
}
......
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