DNA deformation algorithm for the Monte Carlo algorithm