Quantum study of hydrogen–oxygen–graphite interactions