The clock tracks simulation step and time, and defines the integration time step.
Example:
local clock = require("halmd.mdsim.clock")
clock.on_set_timestep(function(timestep)
print(("time step has changed to %g"):format(timestep))
end)
Current simulation step.
Current simulation time in MD units.
Integration time step in MD units.
Define integration time step.
The value of the time step is propagated to all integrators.
Connect a unary slot that accepts the integration time step.
This slot is called after setting the time step with set_timestep().