Computational Study of Polymerization in Carbon Nanotubes