Quasi‐Hamiltonian equations of motion for internal coordinate molecular dynamics of polymers