Computational simulation of metal nucleation on diamond electrodes