For each electronic state, an ML potential was trained using the ANI model through the TorchANI implementation provided in MLatom version 3.6.0. Energy gradients were computed with automatic differentiation of energy predictions with respect to the input molecular conformation. Further details regarding the training of the ML potentials are available in the Supporting Information.