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
ec8b0037
Commit
ec8b0037
authored
Sep 17, 2012
by
Peter Eastman
Browse files
Bug fixes to AmoebaGeneralizedKirkwoodForce
parent
b587b396
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
80 deletions
+86
-80
plugins/amoeba/platforms/cuda2/src/AmoebaCudaKernels.cpp
plugins/amoeba/platforms/cuda2/src/AmoebaCudaKernels.cpp
+4
-1
plugins/amoeba/platforms/cuda2/src/kernels/gkPairForce.cu
plugins/amoeba/platforms/cuda2/src/kernels/gkPairForce.cu
+82
-79
No files found.
plugins/amoeba/platforms/cuda2/src/AmoebaCudaKernels.cpp
View file @
ec8b0037
...
@@ -1777,7 +1777,10 @@ void CudaCalcAmoebaGeneralizedKirkwoodForceKernel::initialize(const System& syst
...
@@ -1777,7 +1777,10 @@ void CudaCalcAmoebaGeneralizedKirkwoodForceKernel::initialize(const System& syst
defines
[
"GK_FC"
]
=
cu
.
doubleToString
(
1
*
(
1
-
solventDielectric
)
/
(
0
+
1
*
solventDielectric
));
defines
[
"GK_FC"
]
=
cu
.
doubleToString
(
1
*
(
1
-
solventDielectric
)
/
(
0
+
1
*
solventDielectric
));
defines
[
"GK_FD"
]
=
cu
.
doubleToString
(
2
*
(
1
-
solventDielectric
)
/
(
1
+
2
*
solventDielectric
));
defines
[
"GK_FD"
]
=
cu
.
doubleToString
(
2
*
(
1
-
solventDielectric
)
/
(
1
+
2
*
solventDielectric
));
defines
[
"GK_FQ"
]
=
cu
.
doubleToString
(
3
*
(
1
-
solventDielectric
)
/
(
2
+
3
*
solventDielectric
));
defines
[
"GK_FQ"
]
=
cu
.
doubleToString
(
3
*
(
1
-
solventDielectric
)
/
(
2
+
3
*
solventDielectric
));
defines
[
"EPSILON_FACTOR"
]
=
cu
.
doubleToString
(
138.9354558456
);
defines
[
"ENERGY_SCALE_FACTOR"
]
=
cu
.
doubleToString
(
138.9354558456
/
solventDielectric
);
defines
[
"ENERGY_SCALE_FACTOR"
]
=
cu
.
doubleToString
(
138.9354558456
/
solventDielectric
);
if
(
multipoles
->
getPolarizationType
()
==
AmoebaMultipoleForce
::
Direct
)
defines
[
"DIRECT_POLARIZATION"
]
=
""
;
stringstream
forceSource
;
stringstream
forceSource
;
forceSource
<<
CudaKernelSources
::
vectorOps
;
forceSource
<<
CudaKernelSources
::
vectorOps
;
forceSource
<<
CudaAmoebaKernelSources
::
amoebaGk
;
forceSource
<<
CudaAmoebaKernelSources
::
amoebaGk
;
...
@@ -1837,7 +1840,7 @@ void CudaCalcAmoebaGeneralizedKirkwoodForceKernel::finishComputation(CudaArray&
...
@@ -1837,7 +1840,7 @@ void CudaCalcAmoebaGeneralizedKirkwoodForceKernel::finishComputation(CudaArray&
int
forceThreadBlockSize
=
nb
.
getForceThreadBlockSize
();
int
forceThreadBlockSize
=
nb
.
getForceThreadBlockSize
();
void
*
gkForceArgs
[]
=
{
&
cu
.
getForce
().
getDevicePointer
(),
&
torque
.
getDevicePointer
(),
&
cu
.
getEnergyBuffer
().
getDevicePointer
(),
void
*
gkForceArgs
[]
=
{
&
cu
.
getForce
().
getDevicePointer
(),
&
torque
.
getDevicePointer
(),
&
cu
.
getEnergyBuffer
().
getDevicePointer
(),
&
cu
.
getPosq
().
getDevicePointer
(),
&
startTileIndex
,
&
numTileIndices
,
&
labFrameDipoles
.
getDevicePointer
(),
&
cu
.
getPosq
().
getDevicePointer
(),
&
startTileIndex
,
&
numTileIndices
,
&
labFrameDipoles
.
getDevicePointer
(),
&
labFrameQuadrupoles
.
getDevicePointer
(),
&
inducedDipole
.
getDevicePointer
(),
&
inducedDipolePolar
.
getDevicePointer
(),
&
labFrameQuadrupoles
.
getDevicePointer
(),
&
inducedDipole
S
->
getDevicePointer
(),
&
inducedDipolePolar
S
->
getDevicePointer
(),
&
bornRadii
->
getDevicePointer
(),
&
bornForce
->
getDevicePointer
()};
&
bornRadii
->
getDevicePointer
(),
&
bornForce
->
getDevicePointer
()};
cu
.
executeKernel
(
gkForceKernel
,
gkForceArgs
,
numForceThreadBlocks
*
forceThreadBlockSize
,
forceThreadBlockSize
);
cu
.
executeKernel
(
gkForceKernel
,
gkForceArgs
,
numForceThreadBlocks
*
forceThreadBlockSize
,
forceThreadBlockSize
);
printf
(
"bornForce
\n
"
);
printf
(
"bornForce
\n
"
);
...
...
plugins/amoeba/platforms/cuda2/src/kernels/gkPairForce.cu
View file @
ec8b0037
This diff is collapsed.
Click to expand it.
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