Rational design of heterogeneous catalysts from first principles