Role of hysteresis in the molecular picture of friction