SMS: Global differentiable dynamics