Composition and temperature of the Earth's core constrained by combining ab initio calculations and seismic data