Spontaneously forming nanostructures: Quantum dot molecules and rings