Modeling elementary reactions in coke formation from first principles