TQDMReporter#

Displaying dynamic progress bars during OpenMM simulations.

The TQDMReporter class integrates tqdm progress bars with simulation time estimations and completion progress during OpenMM dynamics.

Added in version 1.0.0.

Basic usage#

Let’s attach a dynamic TQDM progress bar to an OpenMM simulation:

import molsysmt as msm

molsys = msm.convert(msm.systems['Trp-Cage']['1l2y.h5msm'], to_form='molsysmt.MolSys')
simulation = msm.convert(molsys, to_form='openmm.Simulation', temperature='300 K')

reporter = msm.third_party.openmm.reporters.TQDMReporter(reportInterval=10, total_n_steps=20)
simulation.reporters.append(reporter)
simulation.step(20)
print('Simulation step completed.')
Potential energy: -1240.53 kJ/mol ± 7.15 kJ/mol
Temperature: 15.80 K ± 12.68 K

Execution time: 0 days, 0 hours, 0 minutes, and 0.08 seconds (42.534 ns/day).

Simulation step completed.