Supplementary Information A The principle of least action and the Euler-Lagrange equation Here, we review the principle of least action and the derivation of the Euler-Lagrange equation [