Bionanofabrication of metallic and semiconductor nanoparticle arrays using S-layer protein lattices with different lateral spacings and geometries.