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
bb3f4f82
Unverified
Commit
bb3f4f82
authored
Sep 06, 2025
by
Peter Eastman
Committed by
GitHub
Sep 06, 2025
Browse files
Fixed bug in calculating plasma self energy correction with offsets (#5069)
parent
d8798cb3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
platforms/common/src/CommonCalcNonbondedForce.cpp
platforms/common/src/CommonCalcNonbondedForce.cpp
+1
-0
platforms/common/src/kernels/nonbondedParameters.cc
platforms/common/src/kernels/nonbondedParameters.cc
+1
-1
No files found.
platforms/common/src/CommonCalcNonbondedForce.cpp
View file @
bb3f4f82
...
...
@@ -317,6 +317,7 @@ void CommonCalcNonbondedForceKernel::commonInitialize(const System& system, cons
paramsDefines
[
"ONE_4PI_EPS0"
]
=
cc
.
doubleToString
(
ONE_4PI_EPS0
);
paramsDefines
[
"EPSILON0"
]
=
cc
.
doubleToString
(
EPSILON0
);
paramsDefines
[
"WORK_GROUP_SIZE"
]
=
cc
.
intToString
(
cc
.
ThreadBlockSize
);
paramsDefines
[
"CHARGE_BUFFER_SIZE"
]
=
cc
.
intToString
(
cc
.
getNumThreadBlocks
());
hasOffsets
=
(
force
.
getNumParticleParameterOffsets
()
>
0
||
force
.
getNumExceptionParameterOffsets
()
>
0
);
if
(
hasOffsets
)
paramsDefines
[
"HAS_OFFSETS"
]
=
"1"
;
...
...
platforms/common/src/kernels/nonbondedParameters.cc
View file @
bb3f4f82
...
...
@@ -115,7 +115,7 @@ KERNEL void computePlasmaCorrection(GLOBAL real* RESTRICT chargeBuffer, GLOBAL m
real
alpha
,
real
volume
)
{
LOCAL
real
temp
[
WORK_GROUP_SIZE
];
real
sum
=
0
;
for
(
unsigned
int
index
=
LOCAL_ID
;
index
<
NUM_GROUPS
;
index
+=
LOCAL_SIZE
)
for
(
unsigned
int
index
=
LOCAL_ID
;
index
<
CHARGE_BUFFER_SIZE
;
index
+=
LOCAL_SIZE
)
sum
+=
chargeBuffer
[
index
];
temp
[
LOCAL_ID
]
=
sum
;
for
(
int
i
=
1
;
i
<
WORK_GROUP_SIZE
;
i
*=
2
)
{
...
...
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