Machine learning speeds up simulations in material science