A nearly perfect spin filter and a spin logic gate based on a porphyrin/graphene hybrid material.