SimTk/openmm — pull request #278 by peastman (2014-01-08 22:54:32+00:00)
Title: StateDataReport can report % progress, speed, and time to completion

Here's an alternative to adding a ProgressReporter or StatusReporter class. I simply added the extra fields as options to StateDataReporter. We could potentially also add an option to use fixed width columns, but I'm not sure if that's really needed. When created like this

StateDataReporter(stdout, 10, temperature=True, progress=True, remainingTime=True, speed=True, separator='\t', totalSteps=300)

The output looks like this:

#"Progress (%)"	"Temperature (K)"	"Speed (ns/day)"	"Time Remaining"
3.3%	47.6999516577	0	--
6.7%	57.6880237988	1.15	0:42
10.0%	64.2181342215	1.15	0:40
13.3%	81.6017588277	1.16	0:38
16.7%	84.8008525003	1.15	0:37
20.0%	96.3196299228	1.16	0:35
23.3%	95.8799616015	1.16	0:34

Does that seem reasonable?