Polarization of metallic carbon nanotubes from a model that includes both net charges and dipoles