Ab initio calculations of mean free paths and stopping powers