Real-space multiple scattering theory method: Formalism and applications