<jupyter_start><jupyter_text>tqdm<jupyter_code>import numpy as np
import openmm as mm
from openmm import app
from openmm import unit
from uibcdf_systems import TwoLJParticles
from uibcdf_reporters import TQDMReporter
box=[[2.5, 0.0, 0.0], [0.0, 2.5, 0.0], [0.0, 0.0, 2.5]]*unit.nanometers
molecular_system = TwoLJParticles(atom_1='Ar', atom_2='Xe', box=box)

integrator = mm.LangevinIntegrator(300.0*unit.kelvin, 1.0/unit.picoseconds, 0.01*unit.picoseconds)
platform = mm.Platform.getPlatformByName('CUDA')
simulation = app.Simulation(molecular_system.topology, molecular_system.system, integrator, platform)

coordinates=[[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]]*unit.nanometers
simulation.context.setPositions(coordinates)

velocities = np.zeros([2, 3], np.float32) * unit.nanometers/unit.picoseconds
simulation.context.setVelocities(velocities)
n_steps = 20000
report_interval = 20

reporter = TQDMReporter(report_interval, n_steps)
simulation.reporters.append(reporter)

simulation.step(n_steps)

reporter.finalize()<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup