The mechanism underlying the functionalisation of cobalt nanoparticles by carboxylic acids: a first-principles computational study.