Computational chemistry for rational design of functional materials