Commit b089a3a1 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Fixed problem w/ setting of bond offsets

parent a82b4e4a
...@@ -1125,12 +1125,13 @@ void gpuSetAmoebaBondOffsets(amoebaGpuContext amoebaGpu ) ...@@ -1125,12 +1125,13 @@ void gpuSetAmoebaBondOffsets(amoebaGpuContext amoebaGpu )
{ {
// make sure only flip once // make sure only flip once
/*
static int flipped = 0; static int flipped = 0;
if( amoebaGpu && flipped ){ if( amoebaGpu && flipped ){
return; return;
} }
flipped = 1; flipped = 1;
*/
_gpuContext* gpu = amoebaGpu->gpuContext; _gpuContext* gpu = amoebaGpu->gpuContext;
amoebaGpu->amoebaSim.amoebaBond_offset = amoebaGpu->psAmoebaBondParameter ? amoebaGpu->psAmoebaBondParameter->_stride : 0; amoebaGpu->amoebaSim.amoebaBond_offset = amoebaGpu->psAmoebaBondParameter ? amoebaGpu->psAmoebaBondParameter->_stride : 0;
...@@ -1270,7 +1271,6 @@ void gpuSetAmoebaBondOffsets(amoebaGpuContext amoebaGpu ) ...@@ -1270,7 +1271,6 @@ void gpuSetAmoebaBondOffsets(amoebaGpuContext amoebaGpu )
} }
} }
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
......
...@@ -292,7 +292,7 @@ void kReduceMutualInducedAndGkFieldDelta_kernel( float* arrayOfDeltas1, float* a ...@@ -292,7 +292,7 @@ void kReduceMutualInducedAndGkFieldDelta_kernel( float* arrayOfDeltas1, float* a
// load deltas // load deltas
while( pos < 3*cAmoebaSim.numberOfAtoms ) while( pos < 3*cAmoebaSim.numberOfAtoms )
{ {
delta[threadIdx.x].x += arrayOfDeltas1[pos]; delta[threadIdx.x].x += arrayOfDeltas1[pos];
delta[threadIdx.x].y += arrayOfDeltas2[pos]; delta[threadIdx.x].y += arrayOfDeltas2[pos];
......
...@@ -677,9 +677,13 @@ void kCalculateAmoebaMultipoleForces(amoebaGpuContext amoebaGpu, bool hasAmoebaG ...@@ -677,9 +677,13 @@ void kCalculateAmoebaMultipoleForces(amoebaGpuContext amoebaGpu, bool hasAmoebaG
// calculate electrostatic forces // calculate electrostatic forces
if( amoebaGpu->multipoleNonbondedMethod == AMOEBA_NO_CUTOFF ){ if( amoebaGpu->multipoleNonbondedMethod == AMOEBA_NO_CUTOFF ){
cudaComputeAmoebaElectrostatic( amoebaGpu ); cudaComputeAmoebaElectrostatic( amoebaGpu );
// map torques to forces // map torques to forces
cudaComputeAmoebaMapTorquesAndAddTotalForce( amoebaGpu, amoebaGpu->psTorque, amoebaGpu->psForce, amoebaGpu->gpuContext->psForce4 ); cudaComputeAmoebaMapTorquesAndAddTotalForce( amoebaGpu, amoebaGpu->psTorque, amoebaGpu->psForce, amoebaGpu->gpuContext->psForce4 );
} else { } else {
cudaComputeAmoebaPmeElectrostatic( amoebaGpu ); cudaComputeAmoebaPmeElectrostatic( amoebaGpu );
} }
......
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