And this vibration is created due to repulsion and attraction of protons and electrons. Now, if we look at this diatomic oxygen molecule, we'll see that this is the case. This diatomic oxygen molecule is composed of two nuclei. These two nuclei repel each other because they are positively charged. So they want to move away from each other. But notice that each one has an electron cloud around it.