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
822cc987
Commit
822cc987
authored
Jan 27, 2016
by
Jason Swails
Browse files
Fix Simulation construction.
parent
b4488289
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
wrappers/python/simtk/openmm/app/simulation.py
wrappers/python/simtk/openmm/app/simulation.py
+4
-4
No files found.
wrappers/python/simtk/openmm/app/simulation.py
View file @
822cc987
...
...
@@ -95,17 +95,17 @@ class Simulation(object):
self
.
reporters
=
[]
if
platform
is
None
:
## The Context containing the current state of the simulation
self
.
context
=
mm
.
Context
(
system
,
integrator
)
self
.
context
=
mm
.
Context
(
self
.
system
,
self
.
integrator
)
elif
platformProperties
is
None
:
self
.
context
=
mm
.
Context
(
system
,
integrator
,
platform
)
self
.
context
=
mm
.
Context
(
self
.
system
,
self
.
integrator
,
platform
)
else
:
self
.
context
=
mm
.
Context
(
system
,
integrator
,
platform
,
platformProperties
)
self
.
context
=
mm
.
Context
(
self
.
system
,
self
.
integrator
,
platform
,
platformProperties
)
if
state
is
not
None
:
with
open
(
state
,
'r'
)
as
f
:
self
.
context
.
setState
(
mm
.
XmlSerializer
.
deserialize
(
f
.
read
()))
## Determines whether or not we are using PBC. If no Topology is provided, take it from the System
if
topology
is
None
:
self
.
_usesPBC
=
system
.
usesPeriodicBoundaryConditions
()
self
.
_usesPBC
=
self
.
system
.
usesPeriodicBoundaryConditions
()
else
:
self
.
_usesPBC
=
topology
.
getUnitCellDimensions
()
is
not
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