Theoretical study of adsorption of hydrocarbons on graphite