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
6c159d06
"platforms/cpu/src/CpuCustomNonbondedForceFvec.cpp" did not exist on "1f9d09d6d332381c6eb675784f6f533f406fd09c"
Commit
6c159d06
authored
Jan 09, 2012
by
Peter Eastman
Browse files
Made it easier to stop a simulation by pressing control-c
parent
01726081
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
wrappers/python/simtk/openmm/app/simulation.py
wrappers/python/simtk/openmm/app/simulation.py
+5
-1
No files found.
wrappers/python/simtk/openmm/app/simulation.py
View file @
6c159d06
...
...
@@ -67,7 +67,11 @@ class Simulation(object):
if
nextReport
[
i
][
0
]
>
0
and
nextReport
[
i
][
0
]
<=
nextSteps
:
nextSteps
=
nextReport
[
i
][
0
]
anyReport
=
True
self
.
integrator
.
step
(
nextSteps
)
stepsToGo
=
nextSteps
while
stepsToGo
>
10
:
self
.
integrator
.
step
(
10
)
# Only take 10 steps at a time, to give Python more chances to respond to a control-c.
stepsToGo
-=
10
self
.
integrator
.
step
(
stepsToGo
)
self
.
currentStep
+=
nextSteps
if
anyReport
:
getPositions
=
False
...
...
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