We showed how a structural modification of graphene, which gives a carbon allotrope graphyne, can induce an energy gap at the K point of the Brillouin zone. Upon adsorption on metallic surfaces, the same mechanism is responsible for the further modification of the energy gap which occurs via the charge transfer mechanism. We performed the calculation based on the density functional theory with the novel non-local vdW-DF correlation of the adsorption of graphyne on Cu(111), Ni(111) and Co(0001) surfaces and showed the dependence of the gap change on the charge transfer in the system. The binding of graphyne appears to be stronger than of graphene on the same surfaces.