A microscopic calculation of potentials and inertia parameters for heavy-ion collisions