Clock¶
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)
-
halmd.mdsim.clock.step¶ Current simulation step.
-
halmd.mdsim.clock.time¶ Current simulation time in MD units.
-
halmd.mdsim.clock.timestep¶ Integration time step in MD units.
-
halmd.mdsim.clock.advance()¶ Manually advance the clock by one step. The method should be used with care by experienced users only.
-
halmd.mdsim.clock.set_timestep(timestep)¶ Define integration time step.
The value of the time step is propagated to all integrators.
-
halmd.mdsim.clock.on_set_timestep(slot)¶ Connect a unary slot that accepts the integration time step.
This slot is called after setting the time step with
set_timestep().