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
11dc1eb6
"platforms/opencl/tests/TestOpenCLGBSAOBCForce.cpp" did not exist on "b12bd24c9e3a79c3da06693ef6d6d1d21e0e086c"
Commit
11dc1eb6
authored
Jun 11, 2019
by
Peter Eastman
Browse files
Fixed error with Drude particles
parent
da28ce0e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
platforms/cuda/src/kernels/pmeExclusions.cu
platforms/cuda/src/kernels/pmeExclusions.cu
+6
-5
platforms/opencl/src/kernels/pmeExclusions.cl
platforms/opencl/src/kernels/pmeExclusions.cl
+6
-5
No files found.
platforms/cuda/src/kernels/pmeExclusions.cu
View file @
11dc1eb6
const
float4
exclusionParams
=
PARAMS
[
index
];
real3
delta
=
make_real3
(
pos2
.
x
-
pos1
.
x
,
pos2
.
y
-
pos1
.
y
,
pos2
.
z
-
pos1
.
z
);
const
real
r2
=
delta
.
x
*
delta
.
x
+
delta
.
y
*
delta
.
y
+
delta
.
z
*
delta
.
z
;
const
real
invR
=
R
SQRT
(
r2
);
const
real
r
=
r2
*
invR
;
const
real
r
=
SQRT
(
r2
);
const
real
invR
=
RECIP
(
r
)
;
const
real
alphaR
=
EWALD_ALPHA
*
r
;
const
real
expAlphaRSqr
=
EXP
(
-
alphaR
*
alphaR
);
const
real
erfAlphaR
=
ERF
(
alphaR
);
real
tempForce
=
0.0
f
;
if
(
erfAlphaR
>
1e-6
f
)
{
if
(
alphaR
>
1e-6
f
)
{
const
real
erfAlphaR
=
ERF
(
alphaR
);
const
real
prefactor
=
exclusionParams
.
x
*
invR
;
tempForce
=
-
prefactor
*
(
erfAlphaR
-
alphaR
*
expAlphaRSqr
*
TWO_OVER_SQRT_PI
);
energy
-=
prefactor
*
erfAlphaR
;
...
...
@@ -29,6 +29,7 @@ const real dprefac = eprefac + dar6/6.0f;
energy
+=
coef
*
(
1.0
f
-
expDar2
*
eprefac
);
tempForce
+=
6.0
f
*
coef
*
(
1.0
f
-
expDar2
*
dprefac
);
#endif
delta
*=
tempForce
*
invR
*
invR
;
if
(
r
>
0
)
delta
*=
tempForce
*
invR
*
invR
;
real3
force1
=
-
delta
;
real3
force2
=
delta
;
platforms/opencl/src/kernels/pmeExclusions.cl
View file @
11dc1eb6
const
float4
exclusionParams
=
PARAMS[index]
;
real3
delta
=
(
real3
)
(
pos2.x-pos1.x,
pos2.y-pos1.y,
pos2.z-pos1.z
)
;
const
real
r2
=
delta.x*delta.x
+
delta.y*delta.y
+
delta.z*delta.z
;
const
real
invR
=
R
SQRT
(
r2
)
;
const
real
r
=
r2*invR
;
const
real
r
=
SQRT
(
r2
)
;
const
real
invR
=
RECIP
(
r
)
;
const
real
alphaR
=
EWALD_ALPHA*r
;
const
real
expAlphaRSqr
=
EXP
(
-alphaR*alphaR
)
;
const
real
erfAlphaR
=
erf
(
alphaR
)
;
real
tempForce
=
0.0f
;
if
(
erfAlphaR
>
1e-6f
)
{
if
(
alphaR
>
1e-6f
)
{
const
real
erfAlphaR
=
erf
(
alphaR
)
;
const
real
prefactor
=
exclusionParams.x*invR
;
tempForce
=
-prefactor*
(
erfAlphaR-alphaR*expAlphaRSqr*TWO_OVER_SQRT_PI
)
;
energy
-=
prefactor*erfAlphaR
;
...
...
@@ -29,6 +29,7 @@ const real dprefac = eprefac + dar6/6.0f;
energy
+=
coef*
(
1.0f
-
expDar2*eprefac
)
;
tempForce
+=
6.0f*coef*
(
1.0f
-
expDar2*dprefac
)
;
#
endif
delta
*=
tempForce*invR*invR
;
if
(
r
>
0
)
delta
*=
tempForce*invR*invR
;
real3
force1
=
-delta
;
real3
force2
=
delta
;
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