Modeling electrostatically induced collapse transitions in carbon nanotubes.