How predictable is evolution? If we could travel back in time 4 billion years and make a few changes, what would remain the same upon our return? This is an enduring topic of evolutionary inquiry (and movies and sci-fi shorts for that matter).
In his book Life's Solution, Conway-Morris made the case for a semblance of predictability in evolution. He argued that convergence - the independent origin of similar traits - represents an element of predictability in evolution. Octopus and humans have outwardly similar eye designs, so if we reply animal history over and over, these camera-type eyes would likely evolve in most replays.
Here I'll describe a truly amazing molecular convergence that was not discussed by Conway-Morris: the independent evolution of opsin proteins (a protein responsible for light perception) in two different groups of organisms. It turns out that a 7-transmembrane protein (opsin), bound to a light reactive chemical on the 7th transmembrane domain, has evolved twice to sense light!
If we could go back a few billion years and replay the evolution of life on earth a few times, chances are, opsins would evolve in many of our replicates.
[Disclaimer - the following is text from an encyclopedia article I've been asked to write on opsin evolution, so the writing style is a bit terse from here on out. I will add a little bit though, specially for the blog. But since many people I know think opsin originated only once, I feel it's my duty to spread the word of opsin convergence, starting here, at Evolutionary Novelties].
What is opsin and rhodopsin?
Opsins are a group of proteins that underlie the molecular basis of various light sensing systems including phototaxis, circadian (daily) rhythms, eye sight, and a type of photosynthesis. Opsins are sometimes called retinylidene proteins because they bind to a light-activated, non-protein chromophore called retinal (retinaldehyde). Opsins are also in some cases called “rhodopsins”, a name originally given to isolated visual pigments that contained both opsin protein and non-protein chromophore in a time before the two separate components were known. Today, the term “Rhodopsin” is used commonly to describe the opsin expressed in vertebrate rod (dim-light) photoreceptors, and the opsins of certain organismal groups, like bacteria. All opsin proteins are embedded in cell membranes, crossing the membrane seven times.
Type I and Type II opsins
Two major classes of opsins are defined and differentiated based on primary protein sequence, chromophore chemistry, and signal transduction mechanisms. Several lines of evidence indicate that the two opsin classes evolved separately, illustrating an amazing case of convergent evolution.
Type I opsins are present in bacteria and algae and are referred to by various names, including bacteriorhodopsin, bacterial sensory rhodopsins, channelrhodopsin, halorhodopsin, and proteorhodopsin. Type I opsins have varied function, including bacterial photosynthesis (bacteriorhodopsin), which is mediated by pumping protons into the cell, and phototaxis (channelrhodopsin), which is mediated by depolarizing the cell membrane. Type II opsins are present in eumetazoans (animals not including sponges), but are unknown from sponges or any non-animals. Because opsins are known from cnidarians and bilaterian animals (animals with bilateral symmetry, including humans, flies, and earthworms), Type II opsins are inferred to have been present in their common ancestor, which lived about 600 million years ago. Type II opsins have varied function, including phototransduction and vision, circadian rhythm entrainment, mediating papillary light reflex (pupil constriction), and photoisomerization (recycling the chromophore).
Despite their functional similarity and despite both being 7-transmembrane proteins, multiple lines of evidence indicate that Type I and Type II opsins evolved independently. First, the primary amino acid sequences of Type I and Type II opsins are no more similar than expected by chance. For example, try to align a Type I (say bacteriorhodopsin) and Type II opsin together. I just tried this with blastalign, with the following result:
Exhibit A. Blast search find "no significant similarity" of the amino acid sequences.
Sequence 1: gi|163443|rhodopsin
Length = 348
Sequence 2: gi|208055|bacteriorhodopsin >gi|208057|gb|AAA72603.1| bacteriorhodopsin
Length = 249
No significant similarity was found
CPU time: 0.04 user secs. 0.02 sys. secs 0.06 total secs.
Second, the orientation of the transmembrane domains differs between the major groups. We now have crystal structure data for both Type I and Type II opsins, and the arrangements of the parts of the protein that are stuck in the cell membrane are quite different, inconsistent with a single origin of opsins (unless this changed a lot during evolution, which is not impossible).
Exhibit B. Type I on the left, Type 2 on the right. Denser lines are positions of transmembrane domains. Figure is from Spudich et al (2000)

Third, the major opsin groups differ in chromophore chemistry. Prior to light activation, the chromophore of Type I opsins is an all-trans isomer. Light activation then involves isomerization of the chromophore to 13-cis retinal. In contrast, prior to light activation, the chromophore of type II opsins is 11-cis retinal. Light activation of Type II opsins involves isomerization to all-trans retinal.
Exhibit C. Type I on the left, Type 2 on the right. Chromophore chemistry differs. Figure is from Spudich et al (2000)

Fourth, Type II opsins belong to the larger protein family called G-protein coupled receptors (GPCRs), which transmit varied signals from outside to inside cells by activating GTPase proteins, which in turn signal to second messengers that affect the state of the cell in various ways. Type I opsins do not activate G-proteins. Furthermore, Type II opsins are more closely related to non-opsin, light insenstive GPCR’s than they are to Type I opsins. So even if there is some very, very distant and *undetectable* common origin of Type I and Type II opsins, chromophore binding likely evolved twice. Since chromophore binding is what allows photosensitivity, it is the crux of being an opsin (but see), and the realization that Type II opsins are closer to non-opsin GPCR's than Type I opsins is strong support for two separate origins.
Exhibit D. (Dashed lines mean no sequence similarity beyond random. Light bulbs mean origin of chromophore binding=light sensitivity=opsin.)

Finally, with two CS students, I tested the single origin hypothesis in a different way and found no support. Type I opsins show similarity of membrane domains 1-2-3 and 5-6-7, consistent with an origin by duplicating a 3-domain protein (and adding one). However, Type II opsins show no such similarity. If they Type I and Type II share a single origin, the duplication pattern of the domains should be shared too (unless there were drastically different rates of evolution in the 2 lineages, which is not impossible). This work is described here: Larusso et al (2008) J Mol Ev.
John L. Spudich, Chii-Shen Yang, Kwang-Hwan Jung, Elena N. Spudich (2000). RETINYLIDENE PROTEINS: Structures and Functions from Archaea to Humans Annual Review of Cell and Developmental Biology, 16 (1), 365-392 DOI: 10.1146/annurev.cellbio.16.1.365