Machine learning for molecular and materials science