First-principles study of electron and hole transfer properties in various polymers