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
c099c6d5
Commit
c099c6d5
authored
Mar 27, 2014
by
Robert McGibbon
Browse files
changes based on responses from @swails and @jchodera
parent
1e7300bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
wrappers/python/simtk/openmm/app/checkpointreporter.py
wrappers/python/simtk/openmm/app/checkpointreporter.py
+9
-1
No files found.
wrappers/python/simtk/openmm/app/checkpointreporter.py
View file @
c099c6d5
...
@@ -78,9 +78,11 @@ class CheckpointReporter(object):
...
@@ -78,9 +78,11 @@ class CheckpointReporter(object):
self
.
_reportInterval
=
reportInterval
self
.
_reportInterval
=
reportInterval
if
isinstance
(
file
,
basestring
):
if
isinstance
(
file
,
basestring
):
self
.
_out
=
open
(
file
,
'w+b'
)
self
.
_own_handle
=
true
self
.
_out
=
open
(
file
,
'w+b'
,
0
)
else
:
else
:
self
.
_out
=
file
self
.
_out
=
file
self
.
_own_handle
=
False
def
describeNextReport
(
self
,
simulation
):
def
describeNextReport
(
self
,
simulation
):
"""Get information about the next report this object will generate.
"""Get information about the next report this object will generate.
...
@@ -105,3 +107,9 @@ class CheckpointReporter(object):
...
@@ -105,3 +107,9 @@ class CheckpointReporter(object):
self
.
_out
.
seek
(
0
)
self
.
_out
.
seek
(
0
)
chk
=
simulation
.
context
.
createCheckpoint
()
chk
=
simulation
.
context
.
createCheckpoint
()
self
.
_out
.
write
(
chk
)
self
.
_out
.
write
(
chk
)
self
.
_out
.
flush
()
def
__del__
(
self
):
if
self
.
_own_handle
:
self
.
_out
.
close
()
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