Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
3e4ffaff
Commit
3e4ffaff
authored
Jul 23, 2012
by
Mark Friedrichs
Browse files
Added documentation associated w/ mapping torques
parent
f0612350
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaElectrostatic.h
...orms/cuda/src/kernels/kCalculateAmoebaCudaElectrostatic.h
+2
-2
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaKirkwood.cu
...latforms/cuda/src/kernels/kCalculateAmoebaCudaKirkwood.cu
+3
-4
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaKirkwoodEDiff.cu
...rms/cuda/src/kernels/kCalculateAmoebaCudaKirkwoodEDiff.cu
+0
-2
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaMapTorques.cu
...tforms/cuda/src/kernels/kCalculateAmoebaCudaMapTorques.cu
+10
-0
No files found.
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaElectrostatic.h
View file @
3e4ffaff
...
...
@@ -276,14 +276,14 @@ void METHOD_NAME(kCalculateAmoebaCudaElectrostatic, Forces_kernel)(
offset
=
(
x
+
tgx
+
warp
*
cSim
.
paddedNumberOfAtoms
);
add3dArray
(
3
*
offset
,
localParticle
.
force
,
outputTorque
);
offset
=
(
y
+
tgx
+
warp
*
cSim
.
paddedNumberOfAtoms
);
offset
=
(
y
+
tgx
+
warp
*
cSim
.
paddedNumberOfAtoms
);
add3dArray
(
3
*
offset
,
sA
[
threadIdx
.
x
].
force
,
outputTorque
);
#else
offset
=
(
x
+
tgx
+
(
y
>>
GRIDBITS
)
*
cSim
.
paddedNumberOfAtoms
);
load3dArray
(
3
*
offset
,
localParticle
.
force
,
outputTorque
);
offset
=
(
y
+
tgx
+
(
x
>>
GRIDBITS
)
*
cSim
.
paddedNumberOfAtoms
);
offset
=
(
y
+
tgx
+
(
x
>>
GRIDBITS
)
*
cSim
.
paddedNumberOfAtoms
);
load3dArray
(
3
*
offset
,
sA
[
threadIdx
.
x
].
force
,
outputTorque
);
#endif
...
...
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaKirkwood.cu
View file @
3e4ffaff
...
...
@@ -95,9 +95,9 @@ __device__ void loadKirkwoodShared( struct KirkwoodParticle* sA, unsigned int at
}
__device__
void
calculateKirkwoodPairIxnOrig_kernel
(
KirkwoodParticle
&
atomI
,
KirkwoodParticle
&
atomJ
,
float
*
outputForce
,
float
outputTorque
[
2
][
3
],
float
*
outputBorn
,
float
*
outputBornPolar
,
float
*
outputEnergy
float
*
outputForce
,
float
outputTorque
[
2
][
3
],
float
*
outputBorn
,
float
*
outputBornPolar
,
float
*
outputEnergy
){
...
...
@@ -2004,7 +2004,6 @@ void kCalculateAmoebaKirkwood( amoebaGpuContext amoebaGpu )
// Tinker's Born1 && E-diff
//kCalculateObcGbsaForces2( amoebaGpu->gpuContext );
kCalculateGrycukGbsaForces2
(
amoebaGpu
);
kCalculateAmoebaKirkwoodEDiff
(
amoebaGpu
);
...
...
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaKirkwoodEDiff.cu
View file @
3e4ffaff
...
...
@@ -939,8 +939,6 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu )
gpuContext
gpu
=
amoebaGpu
->
gpuContext
;
// apparently debug array can take up nontrivial no. registers
static
unsigned
int
threadsPerBlock
=
0
;
if
(
threadsPerBlock
==
0
){
unsigned
int
maxThreads
;
...
...
plugins/amoeba/platforms/cuda/src/kernels/kCalculateAmoebaCudaMapTorques.cu
View file @
3e4ffaff
...
...
@@ -456,6 +456,16 @@ void cudaComputeAmoebaMapTorqueAndAddToForce( amoebaGpuContext amoebaGpu, CUDASt
gpuContext
gpu
=
amoebaGpu
->
gpuContext
;
// The default is to use the Cuda force4 output buffers to collect the forces on each particle arising from the torques: a torque on
// particle-i will be mapped into a force on particle-j, where particle-j is one of particles defining the molecular frame axes
// associated w/ particle-i.
// if amoebaGpu->amoebaSim.maxTorqueBufferIndex > amoebaGpu->gpuContext->sim.outputBuffers, then
// the number of force4 output buffers is too small to accomodate the number of particles whose torques contribute to the force
// on at least one particle. In this case, the CUDAStream amoebaGpu->psTorqueMapForce4 is used instead to collect the forces.
// amoebaClearMapTorqueForce_kernel() clears these buffers; the call to amoebaAddMapTorqueForceToForce_kernel() below
// add the torques from the amoebaGpu->psTorqueMapForce4 buffers to the force4 CUDAStream
if
(
amoebaGpu
->
amoebaSim
.
maxTorqueBufferIndex
>
amoebaGpu
->
gpuContext
->
sim
.
outputBuffers
&&
amoebaGpu
->
psTorqueMapForce4
!=
amoebaGpu
->
gpuContext
->
psForce4
&&
amoebaGpu
->
psTorqueMapForce4
){
amoebaClearMapTorqueForce_kernel
<<<
gpu
->
sim
.
blocks
,
gpu
->
sim
.
threads_per_block
>>>
(
);
LAUNCHERROR
(
"amoebaClearMapTorqueForce"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment