The integration of magnetic resonance imaging (MRI) and proton therapy for on-line image-guidance is expected to reduce dose delivery uncertainties during treatment. Yet, the proton beam experiences a Lorentz force induced deflection inside the magnetic field of the MRI scanner, and several methods have been proposed to quantify this effect. We analyze their structural differences and compare results of both analytical and Monte Carlo models. We find that existing analytical models are limited in accuracy and applicability due to critical approximations, especially including the assumption of a uniform magnetic field. As Monte Carlo simulations are too time-consuming for routine treatment planning and on-line plan adaption, we introduce a new method to quantify and correct for the beam deflection, which is optimized regarding accuracy, versatility and speed. We use it to predict the trajectory of a mono-energetic proton beam of energy E traversing a water phantom behind an air gap within an omnipresent uniform transverse magnetic flux density B. The magnetic field induced dislocation of the Bragg peak is calculated as function of E and B and compared to results obtained with existing analytical and Monte Carlo methods. The deviation from the Bragg peak position predicted by Monte Carlo simulations is smaller for the new model than for the analytical models by up to 2 cm. The model is faster than Monte Carlo methods, less assumptive than the analytical models and applicable to realistic magnetic fields. To compensate for the predicted Bragg peak dislocation, a numerical optimization strategy is introduced and evaluated. It includes an adjustment of both the proton beam entrance angle and energy of up to 25° and 5 MeV, depending on E and B. This strategy is shown to effectively reposition the Bragg peak to its intended location in the presence of a magnetic field.