Sampler¶
The sampler concerts the sampling of observables.
Example:
local sampler = require("halmd.observables.sampler")
sampler:sample()
sampler:run(1000)
-
halmd.observables.sampler.
sample
()¶ Sample current state.
-
halmd.observables.sampler.
run
(steps)¶ Run simulation for given number of steps.
This method invokes
halmd.mdsim.core.mdstep()
.
-
halmd.observables.sampler.
on_prepare
(slot, interval, start)¶ Connect slot to signal emitted just before sampling current state.
slot()
will be executed everyinterval
timesteps with the first time being executed at timestepstart
.start
must be greater or equal to zero.
-
halmd.observables.sampler.
on_sample
(slot, interval, start)¶ Connect slot to signal emitted to sample current state.
slot()
will be executed everyinterval
timesteps with the first time being executed at timestepstart
.start
must be greater or equal to zero.Returns: signal connection
-
halmd.observables.sampler.
on_start
(slot)¶ Connect slot to signal emitted before starting simulation run.
Returns: signal connection
-
halmd.observables.sampler.
on_finish
(slot)¶ Connect slot to signal emitted after finishing simulation run.
Returns: signal connection