First-principles electronic structure theory for semi-infinite semiconductors with applications to Ge(001)(2 x 1) and Si(001)(2 x 1).