"plugins/amoeba/vscode:/vscode.git/clone" did not exist on "7c2e5991a1aa4e99b93293e48f6fdcf00bf0e81d"
Commit 6c61ddfe authored by peastman's avatar peastman
Browse files

Bug fixes

parent 892d2285
...@@ -424,6 +424,7 @@ __kernel void computeGBSAForce1( ...@@ -424,6 +424,7 @@ __kernel void computeGBSAForce1(
localData[localAtomIndex].z = posq1.z; localData[localAtomIndex].z = posq1.z;
localData[localAtomIndex].q = posq1.w; localData[localAtomIndex].q = posq1.w;
localData[get_local_id(0)].bornRadius = bornRadius1; localData[get_local_id(0)].bornRadius = bornRadius1;
SYNC_WARPS;
for (unsigned int j = 0; j < TILE_SIZE; j++) { for (unsigned int j = 0; j < TILE_SIZE; j++) {
if (atom1 < NUM_ATOMS && y*TILE_SIZE+j < NUM_ATOMS) { if (atom1 < NUM_ATOMS && y*TILE_SIZE+j < NUM_ATOMS) {
real4 posq2 = (real4) (localData[tbx+j].x, localData[tbx+j].y, localData[tbx+j].z, localData[tbx+j].q); real4 posq2 = (real4) (localData[tbx+j].x, localData[tbx+j].y, localData[tbx+j].z, localData[tbx+j].q);
...@@ -454,8 +455,8 @@ __kernel void computeGBSAForce1( ...@@ -454,8 +455,8 @@ __kernel void computeGBSAForce1(
#ifdef USE_CUTOFF #ifdef USE_CUTOFF
} }
#endif #endif
SYNC_WARPS;
} }
SYNC_WARPS;
} }
} }
else { else {
...@@ -472,6 +473,7 @@ __kernel void computeGBSAForce1( ...@@ -472,6 +473,7 @@ __kernel void computeGBSAForce1(
localData[get_local_id(0)].fy = 0.0f; localData[get_local_id(0)].fy = 0.0f;
localData[get_local_id(0)].fz = 0.0f; localData[get_local_id(0)].fz = 0.0f;
localData[get_local_id(0)].fw = 0.0f; localData[get_local_id(0)].fw = 0.0f;
SYNC_WARPS;
unsigned int tj = tgx; unsigned int tj = tgx;
for (j = 0; j < TILE_SIZE; j++) { for (j = 0; j < TILE_SIZE; j++) {
if (atom1 < NUM_ATOMS && y*TILE_SIZE+tj < NUM_ATOMS) { if (atom1 < NUM_ATOMS && y*TILE_SIZE+tj < NUM_ATOMS) {
...@@ -627,6 +629,7 @@ __kernel void computeGBSAForce1( ...@@ -627,6 +629,7 @@ __kernel void computeGBSAForce1(
localData[get_local_id(0)].fz = 0.0f; localData[get_local_id(0)].fz = 0.0f;
localData[get_local_id(0)].fw = 0.0f; localData[get_local_id(0)].fw = 0.0f;
} }
SYNC_WARPS;
#ifdef USE_PERIODIC #ifdef USE_PERIODIC
if (singlePeriodicCopy) { if (singlePeriodicCopy) {
// The box is small enough that we can just translate all the atoms into a single periodic // The box is small enough that we can just translate all the atoms into a single periodic
......
...@@ -455,7 +455,7 @@ void testSwitchingFunction() { ...@@ -455,7 +455,7 @@ void testSwitchingFunction() {
positions[1] = Vec3(r+delta, 0, 0); positions[1] = Vec3(r+delta, 0, 0);
context.setPositions(positions); context.setPositions(positions);
double e2 = context.getState(State::Energy).getPotentialEnergy(); double e2 = context.getState(State::Energy).getPotentialEnergy();
ASSERT_EQUAL_TOL((e2-e1)/(2*delta), state.getForces()[0][0], 1e-3); ASSERT_EQUAL_TOL((e2-e1)/(2*delta), state.getForces()[0][0], 2e-3);
} }
} }
......
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