MSL Curiosity did the most detailed geological research on Mars
Chemistry & Mineralogy X-Ray Diffraction is one of the most accurate methods of mineralogical analysis. Due to this method it is possible to find out the mineral composition, not the chemical. For example, diamond and graphite are identical in terms of chemistry, but the different formation conditions affected the crystal lattice structure and radically changed the mineral nature. The purpose of Curiosity was just to determine what conditions led to the mineral formation on Mars in the past.