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
d2318e3b
Unverified
Commit
d2318e3b
authored
Mar 21, 2025
by
Peter Eastman
Committed by
GitHub
Mar 21, 2025
Browse files
Reference and CPU allow more changes to nonbonded exceptions (#4858)
parent
2f0ec953
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
platforms/cpu/src/CpuKernels.cpp
platforms/cpu/src/CpuKernels.cpp
+6
-2
platforms/reference/src/ReferenceKernels.cpp
platforms/reference/src/ReferenceKernels.cpp
+6
-2
No files found.
platforms/cpu/src/CpuKernels.cpp
View file @
d2318e3b
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2013-202
4
Stanford University and the Authors. *
* Portions copyright (c) 2013-202
5
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -746,7 +746,11 @@ void CpuCalcNonbondedForceKernel::copyParametersToContext(ContextImpl& context,
int
particle1
,
particle2
;
double
chargeProd
,
sigma
,
epsilon
;
force
.
getExceptionParameters
(
i
,
particle1
,
particle2
,
chargeProd
,
sigma
,
epsilon
);
if
(
nb14Index
.
find
(
i
)
==
nb14Index
.
end
())
{
if
(
chargeProd
!=
0.0
||
epsilon
!=
0.0
||
exceptionsWithOffsets
.
find
(
i
)
!=
exceptionsWithOffsets
.
end
())
throw
OpenMMException
(
"updateParametersInContext: The set of non-excluded exceptions has changed"
);
}
else
nb14s
.
push_back
(
i
);
}
if
(
nb14s
.
size
()
!=
num14
)
...
...
platforms/reference/src/ReferenceKernels.cpp
View file @
d2318e3b
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008-202
4
Stanford University and the Authors. *
* Portions copyright (c) 2008-202
5
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -1067,7 +1067,11 @@ void ReferenceCalcNonbondedForceKernel::copyParametersToContext(ContextImpl& con
int
particle1
,
particle2
;
double
chargeProd
,
sigma
,
epsilon
;
force
.
getExceptionParameters
(
i
,
particle1
,
particle2
,
chargeProd
,
sigma
,
epsilon
);
if
(
nb14Index
.
find
(
i
)
==
nb14Index
.
end
())
{
if
(
chargeProd
!=
0.0
||
epsilon
!=
0.0
||
exceptionsWithOffsets
.
find
(
i
)
!=
exceptionsWithOffsets
.
end
())
throw
OpenMMException
(
"updateParametersInContext: The set of non-excluded exceptions has changed"
);
}
else
nb14s
.
push_back
(
i
);
}
if
(
nb14s
.
size
()
!=
num14
)
...
...
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