Electronic and thermal spin effect of molecular nanowires between graphene electrodes