The geometries of neutral and charged carbon single-walled nanotubes (SWNTs) have been calculated using density functional theory. Periodic boundary conditions, a plane wave basis, and ultrasoft pseudopotentials are used in the generalized gradient approximation for isolated SWNTs with diameters of up to 20 and 12.5 A for armchair and zigzag nanotubes, respectively. Two different bond lengths and two different bond angles are present in these SWNTs. The largest calculated difference in these bond distances is 0.05 A, which is obtained for a small-diameter zigzag nanotube. The largest deviation from graphitic bond distances is 0.03 A for the zigzag series and 0.008 A for the armchair series. Interesting oscillations in bond lengths and nanotube repeat lengths, but not bond angles, are predicted as a function of n − m for (n, m) nanotubes. These oscillations have a periodicity of 3. The band gap of semiconducting tubes first tends to increase and then decrease with increasing nanotube diameter. The largest ...