Equations‐of‐motion method: Potential energy curves for N2, CO, and C2H4