In this work, we have developed accurate and efficient methods for cal
culating the scattering angle, time integral and electronic energy los
s for binary collisions in matter. In contrast to the conventional int
egration and the hard sphere approximations, our new time integral is
obtained by calculating the difference between the distance to the tar
get atom and the ion path length. To compute the scattering angle and
time integral accurately and efficiently, an adaptive Simpson quadratu
re using a smoother integrand is adopted. The energy loss arising from
the local electron-concentration-dependent electronic stopping power
is obtained by tracing the ion trajectory. To reduce the computation t
ime, a second-order differential equation for the ion motion using an
adaptive Runge-Kutta-Fehlberg algorithm is developed.