I will present numerical methods used in molecular dynamics to overcome sampling problems related to the metastability of the trajectories. The mathematical analysis of these techniques rely in particular on two techniques which will be introduced : entropy methods to analyze longtime behaviour of parabolic partial differential equations and the concept of quasi stationary distribution to relate continuous state space Markovian dynamics to discrete state space Markovian dynamics.