Molecular dynamics simulations of single-walled carbon nanotubes and polymers