Machine learning for atomic-scale simulations: balancing speed and physical laws