A first-principles simulation of the semiconductor/water interface