Hydrogen storage of capped single-walled carbon nanotube via transition-metal doping