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
a3628b48
Unverified
Commit
a3628b48
authored
Jan 13, 2025
by
Peter Eastman
Committed by
GitHub
Jan 13, 2025
Browse files
Allow more changes to nonbonded exceptions (#4766)
parent
c1e7b29f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
platforms/cuda/src/CudaKernels.cpp
platforms/cuda/src/CudaKernels.cpp
+6
-2
platforms/hip/src/HipKernels.cpp
platforms/hip/src/HipKernels.cpp
+6
-2
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+6
-2
No files found.
platforms/cuda/src/CudaKernels.cpp
View file @
a3628b48
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* 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 *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -1115,7 +1115,11 @@ void CudaCalcNonbondedForceKernel::copyParametersToContext(ContextImpl& context,
...
@@ -1115,7 +1115,11 @@ void CudaCalcNonbondedForceKernel::copyParametersToContext(ContextImpl& context,
int
particle1
,
particle2
;
int
particle1
,
particle2
;
double
chargeProd
,
sigma
,
epsilon
;
double
chargeProd
,
sigma
,
epsilon
;
force
.
getExceptionParameters
(
i
,
particle1
,
particle2
,
chargeProd
,
sigma
,
epsilon
);
force
.
getExceptionParameters
(
i
,
particle1
,
particle2
,
chargeProd
,
sigma
,
epsilon
);
if
(
chargeProd
!=
0.0
||
epsilon
!=
0.0
||
exceptionsWithOffsets
.
find
(
i
)
!=
exceptionsWithOffsets
.
end
())
if
(
exceptionIndex
.
find
(
i
)
==
exceptionIndex
.
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
exceptions
.
push_back
(
i
);
exceptions
.
push_back
(
i
);
}
}
int
numContexts
=
cu
.
getPlatformData
().
contexts
.
size
();
int
numContexts
=
cu
.
getPlatformData
().
contexts
.
size
();
...
...
platforms/hip/src/HipKernels.cpp
View file @
a3628b48
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* 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. *
* Portions copyright (c) 2020-2022 Advanced Micro Devices, Inc. *
* Portions copyright (c) 2020-2022 Advanced Micro Devices, Inc. *
* Authors: Peter Eastman, Nicholas Curtis *
* Authors: Peter Eastman, Nicholas Curtis *
* Contributors: *
* Contributors: *
...
@@ -1023,7 +1023,11 @@ void HipCalcNonbondedForceKernel::copyParametersToContext(ContextImpl& context,
...
@@ -1023,7 +1023,11 @@ void HipCalcNonbondedForceKernel::copyParametersToContext(ContextImpl& context,
int
particle1
,
particle2
;
int
particle1
,
particle2
;
double
chargeProd
,
sigma
,
epsilon
;
double
chargeProd
,
sigma
,
epsilon
;
force
.
getExceptionParameters
(
i
,
particle1
,
particle2
,
chargeProd
,
sigma
,
epsilon
);
force
.
getExceptionParameters
(
i
,
particle1
,
particle2
,
chargeProd
,
sigma
,
epsilon
);
if
(
chargeProd
!=
0.0
||
epsilon
!=
0.0
||
exceptionsWithOffsets
.
find
(
i
)
!=
exceptionsWithOffsets
.
end
())
if
(
exceptionIndex
.
find
(
i
)
==
exceptionIndex
.
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
exceptions
.
push_back
(
i
);
exceptions
.
push_back
(
i
);
}
}
int
numContexts
=
cu
.
getPlatformData
().
contexts
.
size
();
int
numContexts
=
cu
.
getPlatformData
().
contexts
.
size
();
...
...
platforms/opencl/src/OpenCLKernels.cpp
View file @
a3628b48
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* 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 *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -1135,7 +1135,11 @@ void OpenCLCalcNonbondedForceKernel::copyParametersToContext(ContextImpl& contex
...
@@ -1135,7 +1135,11 @@ void OpenCLCalcNonbondedForceKernel::copyParametersToContext(ContextImpl& contex
int
particle1
,
particle2
;
int
particle1
,
particle2
;
double
chargeProd
,
sigma
,
epsilon
;
double
chargeProd
,
sigma
,
epsilon
;
force
.
getExceptionParameters
(
i
,
particle1
,
particle2
,
chargeProd
,
sigma
,
epsilon
);
force
.
getExceptionParameters
(
i
,
particle1
,
particle2
,
chargeProd
,
sigma
,
epsilon
);
if
(
chargeProd
!=
0.0
||
epsilon
!=
0.0
||
exceptionsWithOffsets
.
find
(
i
)
!=
exceptionsWithOffsets
.
end
())
if
(
exceptionIndex
.
find
(
i
)
==
exceptionIndex
.
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
exceptions
.
push_back
(
i
);
exceptions
.
push_back
(
i
);
}
}
int
numContexts
=
cl
.
getPlatformData
().
contexts
.
size
();
int
numContexts
=
cl
.
getPlatformData
().
contexts
.
size
();
...
...
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