A factor to determine the direction of the proton transfer in bacteriorhodopsin