We give a general description of the large deviation algorithm; more
details are discussed in [1]} or in the original
papers [2]}, [3]}. We perform
simulations of an ensemble of \(N\)  trajectories \(\left\lbrace  X_{n}(t)\right\rbrace  \) 
(with \(n=1,2,...,N\) ) starting from different initial conditions.
The total integration time of the trajectories is denoted \(T_{a}\) .
We consider an observable \(A(X(t))\)  of which we want to compute the
large deviations. We define a resampling time \(\tau \) , and during
the evolution of the system we perform at times \(t_{i}=i\tau \)  (with
\(i=1,2,...,T_{a}/\tau \) ) a resampling procedure based on the past
values of the observable on the trajectories. At time \(t_{i}\)  we
assign to each trajectory \(n\)  a weight \(W_{n}^{i}\)  defined as
\(W_{n}^{i}=\frac{e^{k^{*}_{t_{i-1}}^{t_{i}}A(X_{n}(t))\,\text{d}t}}{R_{i}}\,\,\,\mbox{with}\,\,\,R_{i}=\frac{1}{N}\sum _{n=1}^{N}e^{k^{*}\int _{t_{i-1}}^{t_{i}}A(X(t))\,\text{d}t},\) 
