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
db8b58e3
Commit
db8b58e3
authored
Nov 14, 2011
by
Mark Friedrichs
Browse files
Bug fix for GBVI force
parent
dcd9f1ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
platforms/cuda/src/kernels/gpu.cpp
platforms/cuda/src/kernels/gpu.cpp
+3
-7
platforms/cuda/src/kernels/kCalculateGBVIAux.h
platforms/cuda/src/kernels/kCalculateGBVIAux.h
+3
-2
No files found.
platforms/cuda/src/kernels/gpu.cpp
View file @
db8b58e3
...
@@ -1108,18 +1108,14 @@ void gpuSetGBVIParameters(gpuContext gpu, float innerDielectric, float solventDi
...
@@ -1108,18 +1108,14 @@ void gpuSetGBVIParameters(gpuContext gpu, float innerDielectric, float solventDi
(
*
gpu
->
psGBVIData
)[
i
].
w
=
1.0
f
;
(
*
gpu
->
psGBVIData
)[
i
].
w
=
1.0
f
;
(
*
gpu
->
psGBVISwitchDerivative
)[
i
]
=
1.0
f
;
(
*
gpu
->
psGBVISwitchDerivative
)[
i
]
=
1.0
f
;
(
*
gpu
->
psObcData
)[
i
].
x
=
radius
[
i
];
(
*
gpu
->
psObcData
)[
i
].
y
=
0.9
f
*
radius
[
i
];
#undef DUMP_PARAMETERS
#define DUMP_PARAMETERS 0
#define DUMP_PARAMETERS 0
#if (DUMP_PARAMETERS == 1)
#if (DUMP_PARAMETERS == 1)
(
void
)
fprintf
(
stderr
,
"GBVI param: %5u R=%1
4
.7e scaledR=%1
4
.7e gamma*tau=%1
4
.7e bornRadiusScaleFactor=%1
4
.7e
\n
"
,
(
void
)
fprintf
(
stderr
,
"GBVI param: %5u R=%1
5
.7e scaledR=%1
5.7e R-S=%15
.7e gamma*tau=%1
5
.7e bornRadiusScaleFactor=%1
5
.7e
\n
"
,
i
,
(
*
gpu
->
psGBVIData
)[
i
].
x
,
(
*
gpu
->
psGBVIData
)[
i
].
y
,
i
,
(
*
gpu
->
psGBVIData
)[
i
].
x
,
(
*
gpu
->
psGBVIData
)[
i
].
y
,
(
*
gpu
->
psGBVIData
)[
i
].
x
-
(
*
gpu
->
psGBVIData
)[
i
].
y
,
(
*
gpu
->
psGBVIData
)[
i
].
z
,
(
*
gpu
->
psGBVIData
)[
i
].
w
);
(
*
gpu
->
psGBVIData
)[
i
].
z
,
(
*
gpu
->
psGBVIData
)[
i
].
w
);
#endif
#endif
#undef DUMP_PARAMETERS
}
}
//(void) fprintf( stderr, "gpuSetGBVIParameters: setting Obc parameters!!!! should be removed.\n" );
// Dummy out extra atom data
// Dummy out extra atom data
for
(
unsigned
int
i
=
atoms
;
i
<
gpu
->
sim
.
paddedNumberOfAtoms
;
i
++
)
for
(
unsigned
int
i
=
atoms
;
i
<
gpu
->
sim
.
paddedNumberOfAtoms
;
i
++
)
{
{
...
...
platforms/cuda/src/kernels/kCalculateGBVIAux.h
View file @
db8b58e3
...
@@ -62,8 +62,8 @@ static __device__ float getGBVI_Volume( float r, float R, float S )
...
@@ -62,8 +62,8 @@ static __device__ float getGBVI_Volume( float r, float R, float S )
return (mask*( L_upper - L_lower ) + addOn);
return (mask*( L_upper - L_lower ) + addOn);
*/
*/
float
addOn
=
0
.
0
;
float
addOn
=
0
.
0
;
float
mask
=
1
.
0
;
float
mask
=
1
.
0
;
float
lowerBound
=
(
r
-
S
);
float
lowerBound
=
(
r
-
S
);
float
diff
=
(
S
-
R
);
float
diff
=
(
S
-
R
);
...
@@ -130,6 +130,7 @@ static __device__ float getGBVI_dE2( float r, float R, float S, float bornForce
...
@@ -130,6 +130,7 @@ static __device__ float getGBVI_dE2( float r, float R, float S, float bornForce
}
}
float
dE2
=
getGBVI_dL_dr
(
r
,
lowerBound
,
S
)
+
mask
*
getGBVI_dL_dx
(
r
,
lowerBound
,
S
);
float
dE2
=
getGBVI_dL_dr
(
r
,
lowerBound
,
S
)
+
mask
*
getGBVI_dL_dx
(
r
,
lowerBound
,
S
);
dE
-=
(
absDiff
>=
r
)
&&
r
>=
diff
?
0
.
0
f
:
dE2
;
dE
-=
(
absDiff
>=
r
)
&&
r
>=
diff
?
0
.
0
f
:
dE2
;
dE
=
r
<
-
diff
?
0
.
0
f
:
dE
;
dE
*=
(
(
r
>
1.0e-08
f
)
?
(
bornForce
/
r
)
:
0
.
0
f
);
dE
*=
(
(
r
>
1.0e-08
f
)
?
(
bornForce
/
r
)
:
0
.
0
f
);
...
...
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