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
3f3bba3f
"docs-source/vscode:/vscode.git/clone" did not exist on "e1d679aa659afb5782ae0e02b5a3bd69798f28bf"
Unverified
Commit
3f3bba3f
authored
Jul 01, 2023
by
Peter Eastman
Committed by
GitHub
Jul 01, 2023
Browse files
Throw exception when specifying properties without a Platform (#4130)
parent
5e913400
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
wrappers/python/openmm/app/simulation.py
wrappers/python/openmm/app/simulation.py
+5
-2
No files found.
wrappers/python/openmm/app/simulation.py
View file @
3f3bba3f
...
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2012-202
0
Stanford University and the Authors.
Portions copyright (c) 2012-202
3
Stanford University and the Authors.
Authors: Peter Eastman
Contributors:
...
...
@@ -73,7 +73,8 @@ class Simulation(object):
If not None, the OpenMM Platform to use
platformProperties : map=None
If not None, a set of platform-specific properties to pass to the
Context's constructor
Context's constructor. This argument may only be used if a specific
Platform is specified.
state : XML file name=None
The name of an XML file containing a serialized State. If not None,
the information stored in state will be transferred to the generated
...
...
@@ -95,6 +96,8 @@ class Simulation(object):
## A list of reporters to invoke during the simulation
self
.
reporters
=
[]
if
platform
is
None
:
if
platformProperties
is
not
None
:
raise
ValueError
(
'Cannot specify platform-specific properties, because the Platform is not specified'
)
## The Context containing the current state of the simulation
self
.
context
=
mm
.
Context
(
self
.
system
,
self
.
integrator
)
elif
platformProperties
is
None
:
...
...
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