First-principles investigation of electrochemical properties of gold nanoparticles