Ring formation mechanism of single-walled carbon nanotubes: Energy conservation between curvature elasticity and inter-tube adhesion