Local structure of crystalline and amorphous materials using reverse Monte Carlo methods