Equilibrium geometry and electronic properties of nanostructures