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
b4a98238
Commit
b4a98238
authored
Mar 27, 2014
by
Robert McGibbon
Browse files
typo fix -- thanks @peastman
parent
a584bc96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
wrappers/python/simtk/openmm/app/checkpointreporter.py
wrappers/python/simtk/openmm/app/checkpointreporter.py
+2
-2
wrappers/python/tests/TestCheckpointReporter.py
wrappers/python/tests/TestCheckpointReporter.py
+4
-1
No files found.
wrappers/python/simtk/openmm/app/checkpointreporter.py
View file @
b4a98238
...
@@ -37,11 +37,11 @@ __all__ = ['CheckpointReporter']
...
@@ -37,11 +37,11 @@ __all__ = ['CheckpointReporter']
class
CheckpointReporter
(
object
):
class
CheckpointReporter
(
object
):
"""CheckpointReporter saves periodic checkpoints of a simulation.
"""CheckpointReporter saves periodic checkpoints of a simulation.
The checkpoints will overwrite one an
d
other -- only the last checkpoint
The checkpoints will overwrite one another -- only the last checkpoint
will be saved in the file.
will be saved in the file.
To use it, create a CheckpointReporter, then add it to the Simulation's
To use it, create a CheckpointReporter, then add it to the Simulation's
list of reporters. To load a checkpoint file a continue a simulation,
list of reporters. To load a checkpoint file a
nd
continue a simulation,
use the following recipe:
use the following recipe:
>>> with open('checkput.chk', 'rb') as f:
>>> with open('checkput.chk', 'rb') as f:
...
...
wrappers/python/tests/TestCheckpointReporter.py
View file @
b4a98238
...
@@ -20,7 +20,10 @@ class TestCheckpointReporter(unittest.TestCase):
...
@@ -20,7 +20,10 @@ class TestCheckpointReporter(unittest.TestCase):
self
.
simulation
.
reporters
.
append
(
app
.
CheckpointReporter
(
file
,
1
))
self
.
simulation
.
reporters
.
append
(
app
.
CheckpointReporter
(
file
,
1
))
self
.
simulation
.
step
(
1
)
self
.
simulation
.
step
(
1
)
with
open
(
file
.
name
,
'rb'
)
as
f
:
self
.
simulation
.
context
.
loadCheckpoint
(
f
.
read
())
file
.
close
()
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
\ No newline at end of file
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