Simulation of deterministic and stochastic biochemical reaction