Adhesion of single functional groups to individual carbon nanotubes: electronic effects probed by ab initio calculations