4 0 1 2 3 0 1 2 0 1 2 Total Density of States [eV -1 /TiO 2 ] 0 1 2 -1 0 1 2 3 $_{VB}$ [eV] 0 1 2 (d) (TiO$_{2}$)$_{8}$ (e) (TiO$_{2}$)$_{9}$ (a) (TiO$_{2}$)$_{5}$ (b) (TiO$_{2}$)$_{6}$ (c) (TiO$_{2}$)$_{7}$ 9 2 (TiO )  8 2 (TiO )  6 2 (TiO )  5 2 (TiO )  7 2 (TiO )  O Ti B N Cluster Undoped B−doped N−doped FIG. 4: Schematics of undoped (left), boron doped (middle), and ni- trogen doped (right) (TiO$_{2}$)$_{n}$ clusters for 5 ≤ n ≤ 9, with doping fractions of 1 / 2 n . Note the circled nitrogen-oxygen bonds in the ni- trogen doped structures for n = 7 and 8, where nitrogen acts as a donor [6]. FIG. 3: Total density of states in eV -1 per TiO$_{2}$ functional unit versus energy in eV for undoped (thin black solid line), boron doped (ma- genta dashed line) and nitrogen doped (blue thick solid line) (a–e) (TiO$_{2}$)$_{n}$ clusters for 5 ≤ n ≤ 9, with doping fractions of 1 / 2 n . Ener- gies are measured from the top of the valence bands of anatase TiO$_{2}$ ε$_{VB}$ , and the DOSs are shifted to align the lowest eigenstate with that for anatase TiO$_{2}$. Occupancy is denoted by curve filling for states in the band gap. For clusters where the nitrogen dopant’s oxygen neighbors occupy interior/bulk sites ( n = 7, 8), oxygen is more mo- bile, and may form new nitrogen-oxygen bonds, as shown in Fig. 4. Since oxygen is more electronegative than nitrogen, nitrogen may transfer charge to the bonding oxygen through these bonds. In this case, nitrogen instead acts as a donor, introducing occupied states near the LUMO. typically in a central location, and forms boron-oxygen bonds via oxygen dislocations, as shown in Fig. 4. Due to its elec- tropositive character, boron acts as a donor, introducing three occupied mid-gap states near the lowest unoccupied molecu- lar orbital (LUMO), as seen in Fig. 3. However, for (TiO$_{2}$)$_{n}$ clusters the influence of nitrogen dopants is not as straightforward. As with rutile TiO$_{2}$ surfaces[16, 17], nitrogen prefers to occupy sites which are 3-fold coordinated to titanium. For clusters consisting only of surface sites ( n = 5, 6, 9), oxygen is tightly constrained, and no significant changes in the cluster’s structure occur via oxygen dislocations, as shown in Fig. 4. As with rutile TiO$_{2}$ surfaces[16, 17], nitrogen acts as an acceptor, introducing an unoccupied mid-gap state near the highest occupied molecular orbital (HOMO). In general, we find when dopants form bonds with oxy- gen atoms via oxygen dislocations, they act as donor sites. On the other hand, when dopants such as nitrogen leave the TiO$_{2}$ structure unchanged, they act as acceptor sites, yield- ing a somewhat more stable structure. We shall find such a description useful in understanding why nitrogen dopants be- have differently in low dimensional systems and bulk systems.