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
5c983283
Commit
5c983283
authored
Jan 09, 2014
by
peastman
Browse files
Fixed a bug that could potentially cause LJ energy to be nan
parent
d3469b87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
platforms/opencl/src/kernels/coulombLennardJones.cl
platforms/opencl/src/kernels/coulombLennardJones.cl
+2
-1
No files found.
platforms/opencl/src/kernels/coulombLennardJones.cl
View file @
5c983283
...
@@ -75,7 +75,7 @@ if ((!isExcluded && r2 < CUTOFF_SQUARED) || needCorrection) {
...
@@ -75,7 +75,7 @@ if ((!isExcluded && r2 < CUTOFF_SQUARED) || needCorrection) {
real
sig6
=
sig2*sig2*sig2
;
real
sig6
=
sig2*sig2*sig2
;
real
epssig6
=
sig6*
(
sigmaEpsilon1.y*sigmaEpsilon2.y
)
;
real
epssig6
=
sig6*
(
sigmaEpsilon1.y*sigmaEpsilon2.y
)
;
tempForce
=
epssig6*
(
12.0f*sig6
-
6.0f
)
;
tempForce
=
epssig6*
(
12.0f*sig6
-
6.0f
)
;
real
ljEnergy
=
select
((
real
)
0
,
epssig6*
(
sig6-1
)
,
includeInteraction
)
;
real
ljEnergy
=
epssig6*
(
sig6-1
)
;
#
if
USE_LJ_SWITCH
#
if
USE_LJ_SWITCH
if
(
r
>
LJ_SWITCH_CUTOFF
)
{
if
(
r
>
LJ_SWITCH_CUTOFF
)
{
real
x
=
r-LJ_SWITCH_CUTOFF
;
real
x
=
r-LJ_SWITCH_CUTOFF
;
...
@@ -85,6 +85,7 @@ if ((!isExcluded && r2 < CUTOFF_SQUARED) || needCorrection) {
...
@@ -85,6 +85,7 @@ if ((!isExcluded && r2 < CUTOFF_SQUARED) || needCorrection) {
ljEnergy
*=
switchValue
;
ljEnergy
*=
switchValue
;
}
}
#
endif
#
endif
ljEnergy
=
select
((
real
)
0
,
ljEnergy,
includeInteraction
)
;
tempEnergy
+=
ljEnergy
;
tempEnergy
+=
ljEnergy
;
#
endif
#
endif
#
if
HAS_COULOMB
#
if
HAS_COULOMB
...
...
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