Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
actually use deq for the time estimate
  • Loading branch information
sroet committed Mar 2, 2021
commit babd276df8ae13454b47a44870d2233e0f85982b
8 changes: 5 additions & 3 deletions openpathsampling/pathsimulators/path_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,21 @@ def run(self, n_steps):
self.step += 1
logger.info("Beginning MC cycle " + str(self.step))
refresh = self.allow_refresh
now = time.time()
if nn > 0:
deq.append(now-time_start)

if self.step % self.status_update_frequency == 0:
# do we visualize this step?
if self.live_visualizer is not None and mcstep is not None:
# do we visualize at all?
self.live_visualizer.draw_ipynb(mcstep)
refresh = False

now = time.time()
elapsed = now - initial_time

if nn > 0:
deq.append(now-time_start)
time_per_step = elapsed / nn
time_per_step = sum(deq) / len(deq)
else:
time_per_step = 1.0

Expand Down