Purpose: The gradient optimization methods such as LBFGS are sensitive to starting conditions and can be trapped in local minima. Molecular dynamic (MD) simulation algorithm, a powerful computational technique used in material science, has the potential to overcome the local minima problem. The purpose of this study is to investigate whether MD algorithm can get out of the local minima, in which LBFGS will be trapped for the optimization problem in intensity modulated proton therapy (IMPT). Methods: A prostate cancer patient was selected for this study. Three different starting conditions was used to optimize the IMPT plans: (a) Forward wedge (FW), all beamlet weights are set to the same weight; (b) SOBP, beamlets weights are arranged to deliver a flat dose on the target; (c) Inverse wedge (IW), the weights are set to distal tracking like resulting very low dose on Femoral Heads. The dose‐based objective function, which only optimizes the uniformity of PTV dose, was used for both LBFGS and MD algorithms. Results: MD converged to the objective function value (OFV) of 3.46 regardless of different initial conditions. LBFGS converged to 3.68, 3.72 and 1082.6 starting with initial conditions FW, SOBP and IW, respectively. For PTV dose coverage, both MD and LBFGS achieved to similar results from FW and SOBP initial conditions. However, using IW initial condition, LBFGS was trapped into a local minimum reflected by a higher OFV and worse PTV coverage (D99=68.5 Gy) while MD converged to a lower OFV and better PTV coverage (D99=75.6 Gy). Conclusion: For the first time, we demonstrated that MD algorithm could be used in radiation therapy planning optimization to overcome the local minima problem which is a major shortcoming of gradient based algorithm widely adopted in radiation therapy optimization problem.