for k = 1, 2, . . . , N A , where R k indicates the location of the kth nucleus and N A is the number of atoms. The numerical value of W CAP (r) is taken to be the minimum value of all of the functions f CAP k (r), except that we impose a maximum value (E max = 10 Ha) in order to avoid numerical problems. The overall CAP function that appears in Eq. ( ) is given by