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
862e6ac7
Unverified
Commit
862e6ac7
authored
Mar 04, 2025
by
Peter Eastman
Committed by
GitHub
Mar 04, 2025
Browse files
Fixed error in checking for circular virtual site definitions (#4822)
parent
8879bbf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
platforms/common/src/IntegrationUtilities.cpp
platforms/common/src/IntegrationUtilities.cpp
+2
-1
platforms/reference/src/SimTKReference/ReferenceVirtualSites.cpp
...ms/reference/src/SimTKReference/ReferenceVirtualSites.cpp
+2
-1
No files found.
platforms/common/src/IntegrationUtilities.cpp
View file @
862e6ac7
...
@@ -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) 2009-202
2
Stanford University and the Authors. *
* Portions copyright (c) 2009-202
5
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -543,6 +543,7 @@ IntegrationUtilities::IntegrationUtilities(ComputeContext& context, const System
...
@@ -543,6 +543,7 @@ IntegrationUtilities::IntegrationUtilities(ComputeContext& context, const System
while
(
sites
.
size
()
>
0
)
{
while
(
sites
.
size
()
>
0
)
{
if
(
sites
.
size
()
==
remainingSites
)
if
(
sites
.
size
()
==
remainingSites
)
throw
OpenMMException
(
"Virtual site definitions are circular"
);
throw
OpenMMException
(
"Virtual site definitions are circular"
);
remainingSites
=
sites
.
size
();
for
(
auto
index
=
sites
.
begin
();
index
!=
sites
.
end
();)
{
for
(
auto
index
=
sites
.
begin
();
index
!=
sites
.
end
();)
{
const
VirtualSite
&
site
=
system
.
getVirtualSite
(
*
index
);
const
VirtualSite
&
site
=
system
.
getVirtualSite
(
*
index
);
bool
canCompute
=
true
;
bool
canCompute
=
true
;
...
...
platforms/reference/src/SimTKReference/ReferenceVirtualSites.cpp
View file @
862e6ac7
...
@@ -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) 2012-20
17
Stanford University and the Authors. *
* Portions copyright (c) 2012-20
25
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -47,6 +47,7 @@ ReferenceVirtualSites::ReferenceVirtualSites(const System& system) {
...
@@ -47,6 +47,7 @@ ReferenceVirtualSites::ReferenceVirtualSites(const System& system) {
while
(
sites
.
size
()
>
0
)
{
while
(
sites
.
size
()
>
0
)
{
if
(
sites
.
size
()
==
remainingSites
)
if
(
sites
.
size
()
==
remainingSites
)
throw
OpenMMException
(
"Virtual site definitions are circular"
);
throw
OpenMMException
(
"Virtual site definitions are circular"
);
remainingSites
=
sites
.
size
();
for
(
auto
index
=
sites
.
begin
();
index
!=
sites
.
end
();)
{
for
(
auto
index
=
sites
.
begin
();
index
!=
sites
.
end
();)
{
const
VirtualSite
&
site
=
system
.
getVirtualSite
(
*
index
);
const
VirtualSite
&
site
=
system
.
getVirtualSite
(
*
index
);
bool
canCompute
=
true
;
bool
canCompute
=
true
;
...
...
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